-
Notifications
You must be signed in to change notification settings - Fork 9
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
Draft
sungshik
wants to merge
39
commits into
main
Choose a base branch
from
error-recovery/rascal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
20948c6
Update `parse` call to use error recovery
sungshik ea87d9e
Update `pom.xml` for development
sungshik 6fa7a82
Add reporting of diagnostics for error nodes
sungshik 1aa3634
Make error recovery backward-compatible
sungshik 35a3b02
Add flag to `loadParser` call to set allowRecovery to false for now
sungshik ea9919f
Fix a bug that adds irrelevant diagnostics
sungshik 2d5dc04
Add exception handler when the location of a parse error is malformed
sungshik 9643852
Add first version parse debouncing
sungshik f94f08f
Merge branch 'main' into error-recovery/rascal
PieterOlivier 04eaedd
Revert "Add first version parse debouncing"
PieterOlivier a3dbfbd
Show skipped part and use error tree for outlining
PieterOlivier 17bcab1
Add debounce to parsing in `TextDocumentState`
sungshik b085657
Merge branch 'error-recovery/rascal' into error-recovery/rascal-debou…
sungshik 6b35288
Use `compareAndSet` instead of `weak...`
sungshik 2749e49
Fix typos in documentation
sungshik f1bacae
Merge pull request #475 from usethesource/error-recovery/rascal-debou…
sungshik 9d803d0
Merge pull request #476 from usethesource/recovery/skipped
PieterOlivier b947d04
Upgrade `pom.xml` and `package.sh`
sungshik 073b675
Both outline and codelenses support can now handle error trees
PieterOlivier 5d60fde
Removed spurious hasErrors
PieterOlivier 91d0e6b
Merge pull request #491 from usethesource/recovery/outline-and-code-l…
PieterOlivier a9d5a06
Move parse error processing (including error nodes) completely to `Te…
sungshik 770561e
Merge branch 'error-recovery/rascal' into error-recovery/rascal-diagn…
sungshik aeb1a9f
Refine parse error messages
sungshik 90ab10c
Remove unused imports
sungshik d86c659
Move class `Debouncer` to its own file
sungshik b095617
Merge pull request #492 from usethesource/error-recovery/rascal-diagn…
sungshik ea02b93
Merge branch 'main' into error-recovery/rascal
PieterOlivier 92cc913
Remove function that should have been deleted during merge from main
PieterOlivier 066c5df
Bumped rascal version number
PieterOlivier ed3dd87
Simplify debouncer (joint with @PieterOlivier)
sungshik 7f16037
Improve API of `DebouncedSupplier`
sungshik 761ab06
Add tests for `DebouncedSupplier`
sungshik 15aaa0f
Improve documentations of `DebouncedSupplier`
sungshik b81dfc4
Revert signature change to `parseIfNotParsing`
sungshik 87e5959
Rename methods to make the names more precise
sungshik 9653e26
Merge branch 'main' into error-recovery/rascal
PieterOlivier 5a123b2
Merge pull request #512 from usethesource/error-recovery/rascal-simpl…
sungshik 819d7a3
Merge branch 'main' into error-recovery/rascal
PieterOlivier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.