statements: add statement-in-elif test case#10
Open
lheckemann wants to merge 2 commits into
Open
Conversation
Owner
|
It appears to happen with any statement (paired or unpaired) located inside an |
lheckemann
force-pushed
the
push-pqytnxoptyvk
branch
from
May 18, 2026 09:01
ba15741 to
11a2ef2
Compare
Contributor
Author
|
I took a stab in the dark and found that making the body of the elif clause mandatory "fixes" the test case, though it isn't really correct either. See latest commit in this PR. EDIT: this doesn't help much, since it chokes in the same way on an elif clause containing |
The {% token at the beginning of an {% elif %} or {% endif %} cannot be
told apart from that at the beginning of any other statement, so it's
a conflict.
lheckemann
force-pushed
the
push-pqytnxoptyvk
branch
from
May 18, 2026 10:17
c5c4111 to
966ae54
Compare
Contributor
Author
|
Introducing a conflict instead of the precedence on elif seems to fix this properly. I'm not super confident in this, so a close look would be appreciated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This produces a parse error in spite of being a valid template, and I don't quite understand why. Any help or a fix would be much appreciated :)