Token class final

One lexical token.

Constructors

Token(TokenKind kind, String text, SourceSpan span, {bool noexpand = false, bool incomplete = false})
Creates a token.
const
Token.eof(int offset)
End-of-input token at offset.

Properties

hashCode → int
The hash code for this object.
no setteroverride
incomplete → bool
The token was cut off by the end of input (an unterminated \verb).
final
isControl → bool
Whether this is a control word or control symbol.
no setter
isEof → bool
Whether this is end of input.
no setter
kind → TokenKind
The kind of token.
final
noexpand → bool
Set by \noexpand: this control sequence must not be expanded.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
span → SourceSpan
Where the token came from. Tokens produced by expanding a macro carry the span of the macro call.
final
text → String
The token text. Control sequences include the backslash.
final

Methods

asNoexpand() → Token
A copy marked as not expandable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override
withSpan(SourceSpan span) → Token
A copy with a different span.

Operators

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