Skip to content
Discussion options

You must be logged in to vote

Hi @yuyiRai thank you for your question.

I just wrote up a long-winded answer, until I noticed that our API currently does not allow to construct a multi mode lexer definition...

You can theoretically assign push/pop modes to different token types like this by overriding the DefaultTokenBuilder class. In particular, you can override the buildKeywordToken method.

However, there's no way to create a lexer definition like required for Chevrotains lexer because the return type of the buildTokens method is an array of tokens. I created a new issue for this #320

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@luiz290788
Comment options

@msujew
Comment options

@msujew
Comment options

@luiz290788
Comment options

Answer selected by yuyi919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #318 on December 10, 2021 13:49.