TokenIterator class

Iterator that turns SGF input text into a stream of tokens.

Whitespace is skipped. Parentheses, semicolons, property identifiers, and bracketed property values are recognized. Property values follow SGF's backslash-escape rules and may contain ] and newlines as part of a single token.

Inheritance

Constructors

TokenIterator(String text)

Properties

current Token
The current element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
final

Methods

moveNext() bool
Advances the iterator to the next element of the iteration.
inherited
next() Token?
Advances one and returns it, or null at end.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek() Token?
Returns next element without consuming, or null at end.
inherited
toList() List<Token>
Expands all tokens into a list.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

reParen RegExp
final
rePropertyIdentifier RegExp
final
rePropertyValue RegExp
final
reSemicolon RegExp
final
reWhitespace RegExp
final