Skip to content

Pattern for matching brackets in multimode lexer #2001

Answered by msujew
dhowe asked this question in Q&A
Discussion options

You must be logged in to vote

@dhowe You can push another mode to the mode stack (even the same mode) and keep the pop_mode: true for }. That way, you will only leave the mode when encountering a corresponding } for the first @{ that entered the mode.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@dhowe
Comment options

@msujew
Comment options

@dhowe
Comment options

Answer selected by dhowe
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants