Header menu logo fantomas

Position Type

Position information stored for lexing tokens

Record fields

Record Field Description

AbsoluteOffset

Full Usage: AbsoluteOffset

Field type: int

The character number in the input stream.

Field type: int

FileIndex

Full Usage: FileIndex

Field type: int

The file index for the file associated with the input stream, use fileOfFileIndex to decode

Field type: int

Line

Full Usage: Line

Field type: int

The line number in the input stream, assuming fresh positions have been updated for the new line by modifying the EndPos property of the LexBuffer.

Field type: int

OriginalLine

Full Usage: OriginalLine

Field type: int

The line number for the position in the input stream, assuming fresh positions have been updated using for the new line.

Field type: int

StartOfLineAbsoluteOffset

Full Usage: StartOfLineAbsoluteOffset

Field type: int

Return absolute offset of the start of the line marked by the position.

Field type: int

Instance members

Instance member Description

this.ApplyLineDirective

Full Usage: this.ApplyLineDirective

Parameters:
    fileIdx : int
    line : int

Returns: Position

Apply a #line directive.

fileIdx : int
line : int
Returns: Position

this.Column

Full Usage: this.Column

Returns: int

Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset

Returns: int

this.ColumnMinusOne

Full Usage: this.ColumnMinusOne

Returns: Position

Same line, column -1.

Returns: Position

this.EndOfToken

Full Usage: this.EndOfToken

Parameters:
    n : int

Returns: Position

Given a position at the start of a token of length n, return a position just beyond the end of the token.

n : int
Returns: Position

this.NextLine

Full Usage: this.NextLine

Returns: Position

Given a position just beyond the end of a line, return a position at the start of the next line.

Returns: Position

this.ShiftColumnBy

Full Usage: this.ShiftColumnBy

Parameters:
    by : int

Returns: Position

Gives a position shifted by specified number of characters.

by : int
Returns: Position

Static members

Static member Description

Position.Empty

Full Usage: Position.Empty

Returns: Position

Get an arbitrary position, with the empty string as file name.

Returns: Position

Position.FirstLine(fileIdx)

Full Usage: Position.FirstLine(fileIdx)

Parameters:
    fileIdx : int

Returns: Position
fileIdx : int
Returns: Position

Type something to start searching.