![]() |
Paradox Game Engine
v1.0.0 beta06
|
Interface for Terminals to access the source stream and produce tokens. More...
Public Member Functions | |
Token | CreateToken (Terminal terminal) |
Creates a new token based on current preview position. More... | |
Token | CreateToken (Terminal terminal, object value) |
Creates a new token based on current preview position and sets its Value field. More... | |
Token | CreateErrorToken (string message, params object[] args) |
Creates error token with custom error message as its Value. More... | |
bool | MatchSymbol (string symbol, bool ignoreCase) |
Tries to match the symbol with the text at current preview position. More... | |
bool | EOF () |
Properties | |
string | Text [get] |
Returns the source text More... | |
SourceLocation | Location [get, set] |
Current start location (position, row, column) of the new token More... | |
int | PreviewPosition [get, set] |
Gets or sets the current preview position in the source file. Must be greater or equal to Location.Position More... | |
char | PreviewChar [get] |
Gets a char at preview position More... | |
char | NextPreviewChar [get] |
Gets the char at position next after the PrevewPosition More... | |
int | TabWidth [get, set] |
Interface for Terminals to access the source stream and produce tokens.
Definition at line 23 of file _ISourceStream.cs.
Token Irony.Parsing.ISourceStream.CreateErrorToken | ( | string | message, |
params object[] | args | ||
) |
Creates error token with custom error message as its Value.
message | Message template, can contain placeholder like {0} to be filled by values from args . |
args | A list of message arguments |
Implemented in Irony.Parsing.SourceStream.
Referenced by Irony.Parsing.RegExLiteral.TryMatch().
Creates a new token based on current preview position.
terminal | A terminal associated with the token. |
Implemented in Irony.Parsing.SourceStream.
Creates a new token based on current preview position and sets its Value field.
terminal | A terminal associated with the token. |
value | The value associated with the token. |
Implemented in Irony.Parsing.SourceStream.
bool Irony.Parsing.ISourceStream.EOF | ( | ) |
Implemented in Irony.Parsing.SourceStream.
Referenced by Irony.Parsing.IdentifierTerminal.ReadBody().
bool Irony.Parsing.ISourceStream.MatchSymbol | ( | string | symbol, |
bool | ignoreCase | ||
) |
Tries to match the symbol with the text at current preview position.
symbol | A symbol to match |
ignoreCase | True if char casing should be ignored. |
Implemented in Irony.Parsing.SourceStream.
Referenced by Irony.Parsing.QuotedValueLiteral.ReadBody(), Irony.Parsing.WikiTagTerminal.TryMatch(), Irony.Parsing.WikiBlockTerminal.TryMatch(), and Irony.Parsing.KeyTerm.TryMatch().
|
getset |
Current start location (position, row, column) of the new token
Definition at line 32 of file _ISourceStream.cs.
Referenced by Irony.Parsing.WikiTextTerminal.TryMatch().
|
get |
Gets the char at position next after the PrevewPosition
Definition at line 45 of file _ISourceStream.cs.
|
get |
Gets a char at preview position
Definition at line 41 of file _ISourceStream.cs.
Referenced by Irony.Parsing.IdentifierTerminal.QuickParse(), Irony.Parsing.DsvLiteral.ReadBody(), Irony.Parsing.CompoundTerminalBase.ReadPrefix(), Irony.Parsing.CompoundTerminalBase.ReadSuffix(), Irony.Parsing.WikiTagTerminal.TryMatch(), and Irony.Parsing.RegExLiteral.TryMatch().
|
getset |
Gets or sets the current preview position in the source file. Must be greater or equal to Location.Position
Definition at line 37 of file _ISourceStream.cs.
Referenced by Irony.Parsing.IdentifierTerminal.ReadBody(), and Irony.Parsing.RegexBasedTerminal.TryMatch().
|
getset |
Definition at line 78 of file _ISourceStream.cs.
|
get |
Returns the source text
Definition at line 28 of file _ISourceStream.cs.