intellij-haxe icon indicating copy to clipboard operation
intellij-haxe copied to clipboard

An incomplete line causes all code below to become unparseable

Open CanIGetaPR opened this issue 4 years ago • 2 comments

CanIGetaPR avatar Sep 26 '20 13:09 CanIGetaPR

Well, "fixing" this requires tuning the parser (via recoverWhile rules in the BNF) to swallow fewer tokens once it sees an error. Determining where the next useful line of code starts is not straightforward when keywords can be used as identifiers. (In Haxe, most can't, but there are several that are allowed.)

There will never be a case (using the IDEA dev kit and Grammar-Kit parsers) where you won't have this issue. The trick is in figuring out how to minimize it.

EricBishton avatar Sep 26 '20 14:09 EricBishton

The next release will most likely improve on the experience of this problem as the default highlighting will remain visible while the background is darkened where the parser fails to parse. image

m0rkeulv avatar Oct 26 '20 20:10 m0rkeulv