-
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
Error recovery for Rascal #490
base: main
Are you sure you want to change the base?
Conversation
This reverts commit 9643852.
…nce-parser Debounce the parser
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/TextDocumentState.java
Outdated
Show resolved
Hide resolved
Show skipped part and use error tree for outlining
…ense-fixes Both outline and codelenses support can now handle error trees
…ostics-in-document-state
…ostics-in-document-state Process parse errors (including error nodes) in `TextDocumentState`
children += [symbol("<u.name>", struct(), u@\loc, detail="data <u> <kws>", children=kwlist)]; | ||
top-down-break visit (m) { | ||
case decl: (Declaration) `<Tags _> <Visibility _> <Type t> <{Variable ","}+ vars>;`: | ||
if (!hasErrors(decl)) { |
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.
I'm missing something here. If a node like this matches then it has enough structure to produce the symbol. What does it matter if there are errors inside?
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 point of the error trees is that they will be there but won't match with any of the expected language constructs. So you can ignore them typically.
For the case where you encounter one during recursion, a match on the error tree has to be added that ignores it or does something useful like a short yield: "<error tree>"[..25]
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.
Yield of an error tree is guaranteed to work: "<myStat>"
will yield the entire string that was accepted to fill in for a real statement.
…er-debouncer Simplify the debouncer
History
TextDocumentState
#492Building a VSIX package
Run the following script: