TokenType class abstract

A type of token, it is used to know exactly when to create the token.

Implementers

Constructors

TokenType()
Creates the token type.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isMultiChar bool
Can the token be composed of multiple characters.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createToken(ComputeContext ctx, String rawValue, int globalOffset) Token<TokenType>
Creates the token.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(ComputeContext ctx, Token<TokenType>? previousToken, String rawBuildingToken, Token<TokenType>? nextToken) bool
Signals the caller if the token type is compatible with the next and previous tokens.
validateNext(ComputeContext ctx, String rawBuildingToken, Token<TokenType>? nextToken) bool
Signals the caller if the token type is compatible with the next token.
validateNextType(ComputeContext ctx, String rawBuildingToken, TokenType? nextTokenType) bool
Signals the caller if the token type is compatible with the next type of token.
validatePrevious(ComputeContext ctx, String rawBuildingToken, Token<TokenType>? previousToken) bool
Signals the caller if the token type is compatible with the previous token.
validatePreviousType(ComputeContext ctx, String rawBuildingToken, TokenType? previousTokenType) bool
Signals the caller is the token type is compatible with the previous type of token.
validateType(ComputeContext ctx, TokenType? previousTokenType, String rawBuildingToken, TokenType? nextTokenType) bool
Signals the caller if the token type is compatible with the next and previous types of tokens.

Operators

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