-
It can be used to tokenize some markup language references: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
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 However, there's no way to create a lexer definition like required for Chevrotains lexer because the return type of the |
Beta Was this translation helpful? Give feedback.
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 thebuildKeywordToken
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