the textual representation of the Token as it appeared in the text
offset of the first character of the Token
line of the first character of the Token
column of the first character of the Token
line of the last character of the Token
column of the last character of the Token
Things to note:
(unicode escaping is untouched).
column of the last character of the Token
Things to note: "do" {startColumn : 1, endColumn: 2} --> the range is inclusive to exclusive 1...2 (2 chars long). "\n" {startLine : 1, endLine: 1} --> a lineTerminator as the last character does not effect the Token's line numbering. "'hello\tworld\uBBBB'" {image: "'hello\tworld\uBBBB'"} --> a Token's image is the "literal" text (unicode escaping is untouched).
line of the last character of the Token
the textual representation of the Token as it appeared in the text
offset of the first character of the Token
column of the first character of the Token
line of the first character of the Token
A "human readable" Label for a Token. Subclasses of Token may define their own static LABEL property. This label will be used in error messages and drawing syntax diagrams.
For example a Token constructor may be called LCurly, which is short for LeftCurlyBrackets, These names are either too short or too unwieldy to be used in error messages.
Imagine : "expecting LCurly but found ')'" or "expecting LeftCurlyBrackets but found ')'"
However if a static property LABEL with the value '{' exists on LCurly class, that error message will be: "expecting '{' but found ')'"
Generated using TypeDoc