Token class

A Token has a type and a literal. It is the intermediate form of the source that is used by things like the Formatter or Session to understand how to interpret the source.

Constructors

Token(TokenType tokenType, String literal)

Properties

hashCode int
The hash code for this object.
no setterinherited
isMovement bool
True if the Token has to do with Movements.
no setter
isPerformance bool
True if the Token has to do with Performances.
no setter
literal String
The snippet of the source material.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
Returns the Stringified version of a Token.
no setter
tokenType TokenType
The kind of token.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object t) bool
Tokens are consider equivilent if both the type and the literal match.
override

Static Properties

EOF String
Null terminator
final

Static Methods

tokensFromString(String tokensString) List<Token>
Useful for debugging purposes. Accepts a stringified list of Tokens and returns back a List

Constants

DateTime → const String
Fail → const String
Load → const String
MetaKey → const String
MetaValue → const String
Movement → const String
Note → const String
Rep → const String
Set → const String
StringTokenType → const Map<TokenType, String>
Exchange your TokenType for a String.
SupersetMovement → const String
TokenTypeString → const Map<String, TokenType>
Exchange your String for a TokenType.