Refering to Sublime 3 syntax definition file:
Sometimes, while within a context you encounter a match that signals the end of this context. This match, however, might not belong to the current context, but to another context.
Is there a way not to “consume” a match? That is, if a context encounter this match it can act upon it (for example poping itself), but leave it on the input stream for another context to deal with?
Thanks
Syntax context: matching without consuming?
Yuval
#1
1 Like
kingkeith
#2
of course, just look a regex lookahead (?=match)
most famous example, HTML pushing into JavaScript and popping back to HTML at </script
:
5 Likes