Enhanced C#
Language of your choice: library documentation
|
A standard interface for lexers. More...
A standard interface for lexers.
Token | Type of tokens produced by the lexer (usually Loyc.Syntax.Lexing.Token). |
Properties | |
ISourceFile | SourceFile [get] |
The file being lexed. More... | |
IMessageSink | ErrorSink [get, set] |
Event handler for errors. More... | |
int | IndentLevel [get] |
Indentation level of the current line. This is updated after scanning the first whitespaces on a new line, and may be reset to zero when NextToken() returns a newline. More... | |
UString | IndentString [get] |
Gets a string slice that holds the spaces or tabs that were used to indent the current line. More... | |
int | LineNumber [get] |
Current line number (1 for the first line). More... | |
int | InputPosition [get] |
Current input position (an index into SourceFile.Text). More... | |
Public Member Functions | |
Maybe< Token > | NextToken () |
Scans the next token and returns information about it. More... | |
Public Member Functions inherited from Loyc.Syntax.IIndexToLine | |
SourcePos | IndexToLine (int index) |
Returns the position in a source file of the specified index. More... | |
Scans the next token and returns information about it.
Implemented in Loyc.Syntax.Les.LesLexer, Loyc.Ecs.Parser.CommentSaver, Loyc.Syntax.Lexing.IndentTokenGenerator< Token >, Loyc.Syntax.Lexing.BaseILexer< CharSrc, Token >, Loyc.Ecs.Parser.EcsPreprocessor, Loyc.Ecs.Parser.EcsLexer, Loyc.Syntax.Lexing.TokensToTree, Loyc.Syntax.Lexing.LexerWrapper< Token >, Loyc.Syntax.Lexing.TokenListAsLexer, and Loyc.Syntax.Lexing.WhitespaceFilter< Token >.
|
getset |
Event handler for errors.
|
get |
Indentation level of the current line. This is updated after scanning the first whitespaces on a new line, and may be reset to zero when NextToken() returns a newline.
Gets a string slice that holds the spaces or tabs that were used to indent the current line.
|
get |
Current input position (an index into SourceFile.Text).
|
get |
Current line number (1 for the first line).
|
get |
The file being lexed.