Position
Namespace: Microsoft.FSharp.Text.Lexing
Position information stored for lexing tokens
Record Fields
Record Field | Description |
pos_bol
Signature: int
|
The absolute offset of the beginning of the line
|
pos_cnum
Signature: int
|
The absolute offset of the column for the position
|
pos_fname
Signature: string
|
The file name for the position
|
pos_lnum
Signature: int
|
The line number for the position
|
Instance members
Instance member | Description |
AbsoluteOffset
Signature: int
|
The character number in the input stream
CompiledName: get_AbsoluteOffset
|
AsNewLinePos()
Signature: unit -> Position
|
|
Char
Signature: int
|
CompiledName: get_Char
|
Column
Signature: int
|
Return the column number marked by the position, i.e. the difference between the AbsoluteOffset and the StartOfLineAbsoluteOffset
CompiledName: get_Column
|
EndOfToken(n)
Signature: n:int -> Position
|
Given a position at the start of a token of length n, return a position just beyond the end of the token
|
FileName
Signature: string
|
The file name associated with the input stream.
CompiledName: get_FileName
|
Line
Signature: 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.
CompiledName: get_Line
|
NextLine
Signature: Position
|
CompiledName: get_NextLine
|
ShiftColumnBy(by)
Signature: by:int -> Position
|
Gives a position shifted by specified number of characters
|
StartOfLineAbsoluteOffset
Signature: int
|
Return absolute offset of the start of the line marked by the position
CompiledName: get_StartOfLineAbsoluteOffset
|
Static members
Static member | Description |
Empty
Signature: Position
|
Get an arbitrary position, with the empty string as filename, and
CompiledName: get_Empty
|
FirstLine(filename)
Signature: filename:string -> Position
|
Get a position corresponding to the first line (line number 1) in a given file
|