-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implemented error recovery support in parametric language servers #511
base: error-recovery/rascal
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The analyzer runs on parse trees with errors! 😲 That's beyond my expectations. Really cool 🙂 There are some inconsistencies between analyzer diagnostics and the outline, though, so that requires some additional tweaking. I suspect it might be a bug in version management of diagnostics; see the comment below for more details.
I fixed the analyzer issue (see comment), but I'm not sure if it addresses all potential issues in the analyzer. Remaining questions:
|
I think in this case everything works becuase lexicals can never be error trees. |
This PR leverages the error recovery support in
TextDocumentService
to also support error recovery for parametric language services.The Pico demo has been extended with error recovery support.
The first step when supporting error recovery is to change the parser to do error recovery:
After that, the individual services need to be able to work even when error trees are present. In case of Pico, only a small change was needed to
picoDocumentSymbolService
, all other services kept working without changes.