Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IToken

* Things to note:

  • "do" {
       startColumn : 1, endColumn: 2,
       startOffset: x, endOffset: x +1} --> 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).
    

Hierarchy

  • IToken

Implemented by

Index

Properties

Optional endColumn

endColumn: number

Column of the last character of the Token.

Optional endLine

endLine: number

Line of the last character of the Token.

Optional endOffset

endOffset: number

Offset of the last character of the Token.

image

image: string

The textual representation of the Token as it appeared in the text.

Optional isInsertedInRecovery

isInsertedInRecovery: boolean

this marks if a Token does not really exist and has been inserted "artificially" during parsing in rule error recovery.

Optional startColumn

startColumn: number

Column of the first character of the Token.

Optional startLine

startLine: number

Line of the first character of the Token.

startOffset

startOffset: number

Offset of the first character of the Token.

Optional tokenClassName

tokenClassName: number

A human readable name of the Token Class, This property will only be avilaible if the Lexer has run in @see {ILexerConfig} debug flag.

This property should not be used in productive flows as it will not always exist!

Optional tokenType

tokenType: number

An number index representing the type of the Token use to get the Token Type from a token "instance"

Generated using TypeDoc