Header menu logo FsLexYacc

Position Type

Position information stored for lexing tokens

Record fields

Record Field Description

pos_bol

Full Usage: pos_bol

Field type: int

The absolute offset of the beginning of the line

Field type: int

pos_cnum

Full Usage: pos_cnum

Field type: int

The absolute offset of the column for the position

Field type: int

pos_fname

Full Usage: pos_fname

Field type: string

The file name for the position

Field type: string

pos_lnum

Full Usage: pos_lnum

Field type: int

The line number for the position

Field type: int

pos_orig_lnum

Full Usage: pos_orig_lnum

Field type: int

The line number for the position in the original source file

Field type: int

Instance members

Instance member Description

this.AbsoluteOffset

Full Usage: this.AbsoluteOffset

Returns: int

The character number in the input stream

Returns: int

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.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.FileName

Full Usage: this.FileName

Returns: string

The file name associated with the input stream.

Returns: string

this.Line

Full Usage: this.Line

Returns: int

The line number in the input stream, assuming fresh positions have been updated using AsNewLinePos() and by modifying the EndPos property of the LexBuffer.

Returns: int

this.NextLine

Full Usage: this.NextLine

Returns: Position
Returns: Position

this.OriginalLine

Full Usage: this.OriginalLine

Returns: int

The line number for the position in the input stream, assuming fresh positions have been updated using AsNewLinePos()

Returns: int

this.ShiftColumnBy

Full Usage: this.ShiftColumnBy

Parameters:
    by : int

Returns: Position

Gives a position shifted by specified number of characters

by : int
Returns: Position

this.StartOfLineAbsoluteOffset

Full Usage: this.StartOfLineAbsoluteOffset

Returns: int

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

Returns: int

Static members

Static member Description

Position.Empty

Full Usage: Position.Empty

Returns: Position

Get an arbitrary position, with the empty string as filename, and

Returns: Position

Position.FirstLine(filename)

Full Usage: Position.FirstLine(filename)

Parameters:
    filename : string

Returns: Position

Get a position corresponding to the first line (line number 1) in a given file

filename : string
Returns: Position

Type something to start searching.