Class IndentationAwareLexer

A lexer that is aware of indentation in the input text. The only purpose of this lexer is to reset the internal state of the IndentationAwareTokenBuilder between the tokenization of different text inputs.

In your module, you can override the default lexer with this one as such:

parser: {
TokenBuilder: () => new IndentationAwareTokenBuilder(),
Lexer: (services) => new IndentationAwareLexer(services),
}

Hierarchy (view full)

Constructors

Properties

chevrotainLexer: Lexer
indentationTokenBuilder: IndentationAwareTokenBuilder<string, string>
tokenBuilder: TokenBuilder
tokenTypes: TokenTypeDictionary

Accessors

Methods