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
Let's say I'm translating the EBNF grammar and what to keep the structure as close as possible. So I end up with a non-starter rule that can match empty input, so tree-sitter complains about it. That's actually super easily solvable, KUDOs for using a programming language to write a grammar, I can just turn these rules into functions.
But there is also this inline feature, that looks appealing, so I though I should be able to just inline these rules. Unfortunately that doesn't work: the check for rules matching an empty input is done before inlining, so tree-sitter still complains.
So, my question is: is there a particular reason for this ordering? Could we do inlining first, and then probably some bad rules will go away already?
Expected behavior
No response
The text was updated successfully, but these errors were encountered:
Problem
It's more a question than a FR.
Let's say I'm translating the EBNF grammar and what to keep the structure as close as possible. So I end up with a non-starter rule that can match empty input, so tree-sitter complains about it. That's actually super easily solvable, KUDOs for using a programming language to write a grammar, I can just turn these rules into functions.
But there is also this
inline
feature, that looks appealing, so I though I should be able to just inline these rules. Unfortunately that doesn't work: the check for rules matching an empty input is done before inlining, so tree-sitter still complains.So, my question is: is there a particular reason for this ordering? Could we do inlining first, and then probably some bad rules will go away already?
Expected behavior
No response
The text was updated successfully, but these errors were encountered: