13 using System.Collections.Generic;
131 public int Length {
get;
private set; }
139 public string SourceCode {
get;
private set; }
150 text = SourceCode.Substring(Location.Position, Length);
164 public string ValueString
168 return Value == null ? string.Empty : Value.ToString();
187 get {
return Terminal.Category; }
193 public Token OtherBrace
213 EditorInfo = Terminal.EditorInfo;
225 return (
Flags & flag) != 0;
237 return Category == TokenCategory.Error;
247 openingBrace.OtherBrace = closingBrace;
248 closingBrace.OtherBrace = openingBrace;
252 [System.Diagnostics.DebuggerStepThrough]
255 return Terminal.TokenToString(
this);
277 ChildTokens = childTokens;
TokenCategory
Token category.
Token(Terminal term, SourceLocation location, string text, object value)
Initializes a new instance of the Token class.
void SetTerminal(Terminal terminal)
Sets the terminal.
TokenFlags Flags
Get the flags
MultiToken(Terminal term, SourceLocation location, TokenList childTokens)
Initializes a new instance of the MultiToken class.
override string ToString()
short ScannerState
Scanner state after producing token
TokenList ChildTokens
List of child tokens
static void LinkMatchingBraces(Token openingBrace, Token closingBrace)
Links the matching braces.
Flags
Enumeration of the new Assimp's flags.
readonly SourceLocation Location
Location in the source code.
object Value
Get the Value associated with this token.
bool IsError()
Determines whether this instance is error.
TokenEditorInfo EditorInfo
Gets the Editor info.
Tokens are produced by scanner and fed to parser, optionally passing through Token filters in between...
Token(Terminal term, SourceLocation location, int length, string source, object value)
Initializes a new instance of the Token class.
bool IsSet(TokenFlags flag)
Determines whether the specified flag is set.
Some terminals may need to return a bunch of tokens in one call to TryMatch; MultiToken is a containe...