Token

This only represents terminals. Nonterminals aren't constructed since the AST is directly built during parsing.

Constructors

this
this()
Undocumented in source.
this
this(Symbol symbol, Location location, Value value, string data)
Undocumented in source.

Members

Functions

matches
bool matches()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Token b)

Tokens with differing symbols are always unequal. Tokens with differing values are always unequal. Tokens with differing Value types are always unequal. Member location is always ignored for comparison. Member data is ignored for comparison *EXCEPT* when the symbol is Ident.

opEquals
bool opEquals(Token b)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

data
string data;

Original text from source

location
Location location;
Undocumented in source.
symbol
Symbol symbol;

The "type" of this token

value
Value value;

Only valid when symbol is symbol!"Value", otherwise null

Meta