use the same token to change lexer modes #1984
-
Hi there, is it possible to use the same token (or at least the same pattern) to change lexer modes? What I'm referring to is changing mode according to previous tokens, not just the current one. For example, I want to use regular tokens
--- # push yaml mode
yaml mode tokens
--- # pop yaml mode
regular tokens |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Sep 4, 2023
Replies: 1 comment 1 reply
-
@Yokozuna59 You need to create two tokens for that. One push token and a pop token with the same pattern. Put the push token in the default mode and the pop token into the yaml mode. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Yokozuna59
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Yokozuna59 You need to create two tokens for that. One push token and a pop token with the same pattern. Put the push token in the default mode and the pop token into the yaml mode.