Token class

Constructors

Token.new(TokenType type, int position, {String name = "", String text = "", Map<String, String>? attributes, bool selfClosing = false})

Properties

attributes Map<String, String>?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name String
getter/setter pair
position int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selfClosing bool
getter/setter pair
tagContent String
If this is a tag, get this tag's content (between the open/close brackets.)
no setter
text String
getter/setter pair
type TokenType
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSource() String
Convert this token to its source representation.
toString() String
Convert this token to an annotated source representation.
override

Operators

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

Static Methods

tokenize(Scanner scanner) List<Token>
Parse tokens from a string.