A token type. Access token types via the static fields.

For example, to access the token type PLUS:

plusType = TokenType.PLUS;

The type defines the priority (precedence) of the token.

(+,-) < (*,/) < (^) < functions < (-u)

It also defines the associativity of the token. True stands for left-associative, false for right-associative.

Constants

ABS TokenType

const const TokenType._internal("ABS", 4, function: true)
COS TokenType

const const TokenType._internal("COS", 4, function: true)
DIV TokenType

const const TokenType._internal("DIV", 2, operator: true)
EFUNC TokenType

const const TokenType._internal("EFUNC", 4, function: true)
LBRACE TokenType

const const TokenType._internal("LBRACE", -1)
LN TokenType

const const TokenType._internal("LN", 4, function: true)
LOG TokenType

const const TokenType._internal("LOG", 4, function: true)
MINUS TokenType

const const TokenType._internal("MINUS", 1, operator: true)
PLUS TokenType

const const TokenType._internal("PLUS", 1, operator: true)
POW TokenType

const const TokenType._internal("POW", 3, leftAssociative: false, operator: true)
RBRACE TokenType

const const TokenType._internal("RBRACE", -1)
ROOT TokenType

const const TokenType._internal("ROOT", 4, function: true)
SEPAR TokenType

const const TokenType._internal("SEPAR", -1)
SGN TokenType

const const TokenType._internal("SGN", 4, function: true)
SIN TokenType

const const TokenType._internal("SIN", 4, function: true)
SQRT TokenType

const const TokenType._internal("SQRT", 4, function: true)
TAN TokenType

const const TokenType._internal("TAN", 4, function: true)
TIMES TokenType

const const TokenType._internal("TIMES", 2, operator: true)
UNMINUS TokenType

const const TokenType._internal("UNMINUS", 5, leftAssociative: false, operator: true)
VAL TokenType

const const TokenType._internal("VAL", 10)
VAR TokenType

const const TokenType._internal("VAR", 10)

Properties

function → bool

True, if this token is a function.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
leftAssociative → bool

Associativity of this token type. true = left.

read-only
operator → bool

True, if this token is an operator.

read-only
priority → int

The priority of this token type.

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
value → String

The string value of this token type.

read-only

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

noSuchMethod is invoked when users invoke a non-existent method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

inherited
toString() → String

Returns a string representation of this object.