Skip to content

How can I prioritize breaking out of a "repeat", when continued repeating is also valid? #2410

Closed Answered by Hubro
Hubro asked this question in Q&A
Discussion options

You must be logged in to vote

Dang, turns out I just banged my head against this problem for too long. After a good night's sleep, it seemed obvious immediately. This grammar matches leading indentation as a token, and I forgot to match one before the "END" rule. Replacing "END" with seq($._indentation, "END") fixes the problem.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Hubro
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