You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the last character examined by the expression is inside multiple nested lookaheads, the engine only “unwinds” the innermost lookahead before marking the end of the match.
The bug occurs for rules with push, but not for rules that don't use the stack. (I haven't tested set, pop, or embed.)
@deathaxe noticed a bug with nested lookaheads in sublimehq/Packages#2044. I think I've nailed down the problem.
Description
When the last character examined by the expression is inside multiple nested lookaheads, the engine only “unwinds” the innermost lookahead before marking the end of the match.
The bug occurs for rules with
push
, but not for rules that don't use the stack. (I haven't testedset
,pop
, orembed
.)Steps to reproduce
Use the following syntax definition:
And the following test file:
Expected behavior
No characters in the test file should be green because every rule matches zero characters.
Actual behavior
Many characters are green.
Environment
The text was updated successfully, but these errors were encountered: