LatexTokenStream class

Encapsulates operations on the Token stream, such as peek, advance, and expect

Constructors

LatexTokenStream(List<LatexToken> initialTokens)

Properties

hashCode → int
The hash code for this object.
no setterinherited
initialTokens → List<LatexToken>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

advance() → LatexToken?
consumeTextAtom() → TextToken?
Consumes one Unicode character of the current text token
currentSourceOffset() → int
Gets the starting offset of the current token's source position Used by the Parser to record the node's sourceRange.start
expect(String type, [String? message]) → LatexToken
isEOF() → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek([int offset = 0]) → LatexToken?
peekSkipping(bool skip(LatexToken)) → LatexToken?
Looks ahead and skips tokens that satisfy the condition, returning the first non-matching token Does not change the current position
previousEndOffset() → int
Gets the ending offset of the previously consumed token Used by the Parser to record the node's sourceRange.end
rangeFrom(int startOffset) → SourceRange
Builds a SourceRange from the startOffset to the current consumed position
reset() → void
toString() → String
A string representation of this object.
inherited

Operators

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