-
Notifications
You must be signed in to change notification settings - Fork 78
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
Support for parsing input that forms a valid prefix #2053
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/error-recovery #2053 +/- ##
=====================================================
Coverage 49% 49%
- Complexity 6581 6582 +1
=====================================================
Files 685 685
Lines 61102 61127 +25
Branches 8835 8840 +5
=====================================================
+ Hits 30174 30197 +23
- Misses 28715 28723 +8
+ Partials 2213 2207 -6 ☔ View full report in Codecov by Sentry. |
src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc
Outdated
Show resolved
Hide resolved
src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/RecoveryTestSupport.rsc
Outdated
Show resolved
Hide resolved
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.
LGTM
…RecoveryTestSupport.rsc Co-authored-by: sungshik <[email protected]>
…RecoveryTestSupport.rsc Co-authored-by: sungshik <[email protected]>
Support for parsing input that forms a valid prefix
Support for parsing input that forms a valid prefix
Support for parsing input that forms a valid prefix
Previously, if an input string was a valid prefix parsing would fail. This was often the case after error recovery, especially in Rascal files.
This PR adds support for recovering from such a parse error. When this situation is encountered, an error node is generated that skips zero characters at the end of the file.
This PR also adds support in the Rascal error recovery api to access multiple error nodes after disambiguation.
It also refactores and extends the test code.