Scanner class
A scanner that reads a string of Unicode characters and emits Tokens.
This is based on the libyaml scanner, available at https://github.com/yaml/libyaml/blob/master/src/scanner.c. The license for that is available in ../../libyaml-license.txt.
Constructors
- Scanner(String source, {Uri? sourceUrl, bool recover = false, ErrorListener? errorListener})
-
Creates a scanner that scans
source.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
advance(
) → Token? - Consumes the next token and returns the one after that.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peek(
) → Token? - Returns the next token without consuming it.
-
scan(
) → Token - Consumes and returns the next token.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- AMPERSAND → const int
- ASTERISK → const int
- AT → const int
- BACKSLASH → const int
- BACKSPACE → const int
- BELL → const int
- BOM → const int
- COLON → const int
- COMMA → const int
- CR → const int
- DOLLAR → const int
- DOUBLE_QUOTE → const int
- EQUALS → const int
- ESCAPE → const int
- EXCLAMATION → const int
- FORM_FEED → const int
- GRAVE_ACCENT → const int
- HASH → const int
- HYPHEN → const int
- LEFT_ANGLE → const int
- LEFT_CURLY → const int
- LEFT_PAREN → const int
- LEFT_SQUARE → const int
- LETTER_A → const int
- LETTER_B → const int
- LETTER_CAP_A → const int
- LETTER_CAP_F → const int
- LETTER_CAP_L → const int
- LETTER_CAP_N → const int
- LETTER_CAP_P → const int
- LETTER_CAP_U → const int
- LETTER_CAP_X → const int
- LETTER_CAP_Z → const int
- LETTER_E → const int
- LETTER_F → const int
- LETTER_N → const int
- LETTER_R → const int
- LETTER_T → const int
- LETTER_U → const int
- LETTER_V → const int
- LETTER_X → const int
- LETTER_Z → const int
- LF → const int
- LINE_SEPARATOR → const int
- NBSP → const int
- NEL → const int
- NULL → const int
- NUMBER_0 → const int
- NUMBER_9 → const int
- PARAGRAPH_SEPARATOR → const int
- PERCENT → const int
- PERIOD → const int
- PLUS → const int
- QUESTION → const int
- RIGHT_ANGLE → const int
- RIGHT_CURLY → const int
- RIGHT_PAREN → const int
- RIGHT_SQUARE → const int
- SEMICOLON → const int
- SINGLE_QUOTE → const int
- SLASH → const int
- SP → const int
- TAB → const int
- TILDE → const int
- UNDERSCORE → const int
- VERTICAL_BAR → const int
- VERTICAL_TAB → const int