Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An incomplete line causes all code below to become unparseable #1024

Open
CanIGetaPR opened this issue Sep 26, 2020 · 2 comments
Open

An incomplete line causes all code below to become unparseable #1024

CanIGetaPR opened this issue Sep 26, 2020 · 2 comments

Comments

@CanIGetaPR
Copy link
Collaborator

@EricBishton
Copy link
Member

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.

@m0rkeulv
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants