Closed davidhorac3 closed 2 years ago
Ah... finally after another try i figured it out.
Just at the rule above classVarDecl_tl
I had a syntax error... kind of. I had twice on the same row code like this:
{pin=1 recoverWhile=topLevelDecl_r} {pin=1 recoverWhile=topLevelDecl_r}
And it caused that weird behaviour without giving a syntax error.
Hello, After a year I've started language plugin again and I've hit an issue after updating grammar-kit in Intellij.
I have rules (shortened versions):
Issue seems to be, that this pin/recoverWhile of parent rule is now applied to child as well.
In the generated parser it now creates a line at the end of
classVarId_nmi
rule:Which results in exiting the whole section, until recover_while hits so the remaining rules like
typed?
for example are never parsed and it simply results in unexpected token.I've also looked into gitlab on older codes -> those a year back and the generated parser looks little bit different and does not have that exit_section code.
For comparison, there a new generated Parser code:
And there's the old one:
The newly generated parser falls too early into recover_while branch... even though the rule
classVarId_nmi
exits with true result, sucessfully parsing but as it falls into recover, it eats a lot more tokens, than it's suppose to.Is there some new approach or what might be causing this issue?
There's also possibility that I've messed something a long ago and didn't commit...