Grammar-Kit
Grammar-Kit copied to clipboard
Syntax error ruining the parsing of the rest of the file
Hi,
I'm really trying to wrap my head around pin and recover_while but I don't think I've been able to use it properly.
My issue is that I have a simple script e.g. like this:
function Foo() {}
Now I want to write function call above function Foo that refers to Foo:
Fo
function Foo() {}
I'd expect this to give me auto-completion in IntelliJ, but it doesn't because the syntax error that arises from the function call not being finished prevents the function Foo from being parsed properly.
I have tried using recover_while and pinning, and I can get it to report the correct error, but no matter what I try, the error will always break the parsing.
What functionality should I use to prevent the parsing from breaking down? Is it recover_while?