EndMarker
and how to handle it
#313
Unanswered
KaranAhlawat
asked this question in
Q&A
Replies: 2 comments
-
Deviations from the ebnf are okay. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I haven't been able to make them optional and parse them correctly. Also, wasn't able to figure out how to capture those correctly for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, for a while, I've been trying to bend
EndMarker
s to my will, since I opened #275. But, unfortunately, it has escaped me how we can group them. I think, looking at the EBNF grammar, it's not really possible to group them with their corresponding openings.At least not if we implement the tree-sitter grammar according to the EBNF. But, even if we do deviate from it, we still run into issues because we can't really figure out which statement an
end
marker might belong to, without the rest of the parse tree.So, my question is, should I just fall back to using regexp to determine the correct indentation for a
end
marker? Or is there something we can do on the parser level for this?Beta Was this translation helpful? Give feedback.
All reactions