Logo fantomas

LexBuffer<'Char> Type

Input buffers consumed by lexers generated by fslex.exe. The type must be generic to match the code generated by FsLex and FsYacc (if you would like to fix this, please submit a PR to the FsLexYacc repository allowing for optional emit of a non-generic type reference).

Instance members

Instance member Description

this.BufferLocalStore

Full Usage: this.BufferLocalStore

Returns: IDictionary<string, obj>

Dynamically typed, non-lexically scoped parameter table.

Returns: IDictionary<string, obj>

this.CheckLanguageFeatureAndRecover

Full Usage: this.CheckLanguageFeatureAndRecover

Parameters:

Logs a recoverable error if a language feature is unsupported, at the specified range.

arg0 : LanguageFeature
arg1 : range

this.EndPos

Full Usage: this.EndPos

Returns: Position

The end position for the lexeme.

Returns: Position

this.IsPastEndOfStream

Full Usage: this.IsPastEndOfStream

Returns: bool

True if the refill of the buffer ever failed , or if explicitly set to True.

Returns: bool

this.LanguageVersion

Full Usage: this.LanguageVersion

Returns: LanguageVersion

Get the language version being supported

Returns: LanguageVersion

this.LexemeChar

Full Usage: this.LexemeChar

Parameters:
    arg0 : int

Returns: 'Char

Get single character of matched string

arg0 : int
Returns: 'Char

this.LexemeContains

Full Usage: this.LexemeContains

Parameters:
    arg0 : 'Char

Returns: bool

Determine if Lexeme contains a specific character

arg0 : 'Char
Returns: bool

this.LexemeLength

Full Usage: this.LexemeLength

Returns: int

Length of the currently matched lexeme, in characters. Setting this to a value smaller than the actual match effectively rewinds the scanner: the next token will start LexemeLength characters into the previously-matched lexeme. Use with caution.

Returns: int

this.LexemeView

Full Usage: this.LexemeView

Returns: ReadOnlySpan<'Char>

The currently matched text as a Span, it is only valid until the lexer is advanced

Returns: ReadOnlySpan<'Char>

this.ReportLibraryOnlyFeatures

Full Usage: this.ReportLibraryOnlyFeatures

Returns: bool

Determines if the parser can report FSharpCore library-only features.

Returns: bool

this.StartPos

Full Usage: this.StartPos

Returns: Position

The start position for the lexeme.

Returns: Position

this.SupportsFeature

Full Usage: this.SupportsFeature

Parameters:
Returns: bool

True if the specified language feature is supported.

arg0 : LanguageFeature
Returns: bool

Static members

Static member Description

LexBuffer.FromChars(reportLibraryOnlyFeatures, langVersion, arg1)

Full Usage: LexBuffer.FromChars(reportLibraryOnlyFeatures, langVersion, arg1)

Parameters:
    reportLibraryOnlyFeatures : bool
    langVersion : LanguageVersion
    arg2 : char[]

Returns: LexBuffer<char>

Create a lex buffer suitable for Unicode lexing that reads characters from the given array. Important: does take ownership of the array.

reportLibraryOnlyFeatures : bool
langVersion : LanguageVersion
arg2 : char[]
Returns: LexBuffer<char>

LexBuffer.FromFunction(reportLibraryOnlyFeatures, langVersion, arg1)

Full Usage: LexBuffer.FromFunction(reportLibraryOnlyFeatures, langVersion, arg1)

Parameters:
    reportLibraryOnlyFeatures : bool
    langVersion : LanguageVersion
    arg2 : 'Char[] * int * int -> int

Returns: LexBuffer<'Char>

Create a lex buffer that reads character or byte inputs by using the given function.

reportLibraryOnlyFeatures : bool
langVersion : LanguageVersion
arg2 : 'Char[] * int * int -> int
Returns: LexBuffer<'Char>

LexBuffer.FromSourceText(reportLibraryOnlyFeatures, langVersion, arg1)

Full Usage: LexBuffer.FromSourceText(reportLibraryOnlyFeatures, langVersion, arg1)

Parameters:
Returns: LexBuffer<char>

Create a lex buffer backed by source text.

reportLibraryOnlyFeatures : bool
langVersion : LanguageVersion
arg2 : ISourceText
Returns: LexBuffer<char>

LexBuffer.LexemeString(arg1)

Full Usage: LexBuffer.LexemeString(arg1)

Parameters:
Returns: string

Fast helper to turn the matched characters into a string, avoiding an intermediate array.

arg0 : LexBuffer<char>
Returns: string

Type something to start searching.