TokenCursor class

Constructors

TokenCursor(List<Token> tokens)

Properties

counter int
getter/setter pair
current Token
no setter
eofToken Token
final
hashCode int
The hash code for this object.
no setterinherited
reachedEOF bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokens List<Token>
The last Token must be an EOF token for the TokenCursor to work. Always add a Token with the TokenType.eof type at the end of the tokenisation process.
final

Methods

advance() Token
errorToken(ParseResult parseResult) → void
nextMatchesAnyType(List<TokenType> types) bool
nextMatchesType(TokenType type) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek({int lookAhead = 1}) List<Token>
skip(ParseResult parseResult) → void
This method is strictly used to skip insignificant tokens, typically whitespace, which will not end up in the actual AST.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited