C# Class Lex.LexerState

Mostra file Open project: YourLocalFax/OLD-Score Class Usage Examples

Private Properties

Property Type Description
Advance void
Bump void
Bump void
Bump void
EatBlockComment void
EatLineComment void
ExpectAndAdvance void
GetLocation Source.Location
GetSpan Source.Span
GetString string
IsCommentStart bool
IsNotIdentStart bool
IsOpIdentStart bool
LexCharLiteral uint
LexCharLiteralOrSymbol Token
LexEscapeSequence uint
LexIdentOperator Token
LexIdentStr string
LexNumLiteral Token
LexOperator Token
LexOptionalNumSuffix string
LexPrefixedInt string
LexStrLiteral string
Peek char
Peek char

Public Methods

Method Description
GetToken ( ) : Token
LexerState ( DetailLogger log, string fileName, Encoding encoding ) : System

Private Methods

Method Description
Advance ( ) : void
Bump ( ) : void

Appends the current character to the string builder and advances to the next character.

Bump ( char c ) : void

Appends the given character and does not advance to the next character.

Bump ( uint c ) : void

Appends the given character as utf-32 and does not advance to the next character.

EatBlockComment ( ) : void
EatLineComment ( ) : void
ExpectAndAdvance ( char e ) : void
GetLocation ( ) : Location
GetSpan ( ) : Span
GetString ( ) : string
IsCommentStart ( ) : bool
IsNotIdentStart ( ) : bool
IsOpIdentStart ( ) : bool
LexCharLiteral ( bool &fail ) : uint
LexCharLiteralOrSymbol ( ) : Token
LexEscapeSequence ( bool &fail ) : uint
LexIdentOperator ( ) : Token
LexIdentStr ( ) : string
LexNumLiteral ( ) : Token
LexOperator ( ) : Token
LexOptionalNumSuffix ( ) : string

Optionally lexes a suffix (basically, just an identifier) after a number. This is used to determine the type of the literal. The built in numeric types are the only types that expect suffixes by default. Those types are ((u|i)(8|16|32|64))|f(16|32|64)).

LexPrefixedInt ( int radix ) : string
LexStrLiteral ( bool verbatim ) : string
Peek ( ) : char
Peek ( int offset ) : char

Method Details

GetToken() public method

public GetToken ( ) : Token
return Token

LexerState() public method

public LexerState ( DetailLogger log, string fileName, Encoding encoding ) : System
log Log.DetailLogger
fileName string
encoding System.Text.Encoding
return System