TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface ICodeInput in Tinman.Core.Parsing

Base interface for classes that provide input source code for parsing.

interface ICodeInput base of CodeInputBase

Attributes

CharCount

Returns the number of input tokens.

property CharCount { get }
type int32
value [>=0] The number of input token.

RowCount

Returns the number of rows in the input.

property RowCount { get }
type int32
value [>=0] The number of rows.

Extensions

RangeAst

Extracts the token sequence for the given AST node.

[Pure]
method RangeAst (AstNode node)
type string
params node [not-null] The AST node.
returns The extracted tokens.

RangeInterval

Extracts a sequence of tokens.

[Pure]
method RangeInterval (int32 start, int32 end)
type string
params start [>=0] Index of first input token to extract (inclusive).
  end [>=start] Index of last input token to extract (exclusive).
returns The extracted tokens.

Methods

CharAt

Returns the index-th token.

method CharAt (int32 index)
type char
params index [0..CharCount-1] Index of input token to return.
returns The input token.

ColumnCount

Returns the number of columns in the given input row.

[Pure]
method ColumnCount (int32 row)
type int32
params row [0..RowCount-1] Index of input row.
returns [>=0] The number of columns in input row.

OffsetToRowColumn

Translates the given absolute token offset into row and column numbers.

[Pure]
method OffsetToRowColumn (int32 offset)
type Vec2I
params offset [0..CharCount] The token offset.
returns The zero-based row and column numbers (stored in Y and X respectively).

Range

Extracts a sequence of tokens.

[Pure]
method Range (RangeI range)
type string
params range The token range to extract.
returns The extracted tokens.

Row

Returns a single row of the input.

[Pure]
method Row (int32 lineIdx)
type string
params lineIdx [0..RowCount-1] The row index.
returns [not-null] The input row.

RowColumnToOffset

Translates the given row and column number to an absolute token offset.

[Pure]
method RowColumnToOffset (int32 row, int32 column)
type int32
params row [0..RowCount-1] The row number.
  column [>=0] The column number.
returns [0..CharCount] The token offset.