Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LazyToken

see

IToken

see

Token

Same API as a IToken, using a Lazy implementation, with most properties being immutable. See related doc in: https://github.com/SAP/chevrotain/blob/startO/docs/faq.md#-how-do-i-maximize-my-parsers-performance ("Use Lazy Tokens" section)

Hierarchy

  • LazyToken

Implements

Index

Constructors

constructor

Properties

Protected cacheData

endOffset

endOffset: number

isInsertedInRecovery

isInsertedInRecovery: boolean

startOffset

startOffset: number

Static LABEL

LABEL: string = undefined

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 ')'"

Accessors

endColumn

  • get endColumn(): number

endLine

  • get endLine(): number

image

  • get image(): string

startColumn

  • get startColumn(): number

startLine

  • get startLine(): number

Generated using TypeDoc