-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add/update categories to Rascal grammar #2083
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2083 +/- ##
=======================================
- Coverage 49% 49% -1%
+ Complexity 6330 6322 -8
=======================================
Files 666 666
Lines 59680 59689 +9
Branches 8668 8668
=======================================
- Hits 29616 29607 -9
- Misses 27831 27849 +18
Partials 2233 2233 ☔ View full report in Codecov by Sentry. |
I do not think we want the lsp strings in this grammar, I get where you are coming from, but I think in that PR I didn't understand all the concerns. I think the #1928 issue would be more a preferred path. Whats your take @jurgenvinju ? I remember you had a strong desire not to put more strings in the rascal grammar, and instead move to these ADTs instead. Or do you think it's wise to -- for now -- add the lsp categories in the rascal grammar, as an example for other users? |
The issue is that we have not changed the Rascal grammar at all for fear of interaction with the bootstrapping of the compiler. In the time of the RVM compiler (Rascal Virtual Machine), this was essential as it already went through the second and third cycles in bootstrapping, and there production tags like So my question would be to @PaulKlint: what is the current expected impact of productions in the Rascal bootstrap parser ( If it is low, then we can do this now, and we can do it again when we change the contract of highlight categories. If it is high, then we should consider waiting until the compiler is ready for such changes. |
This PR is missing:
Both can be called directly from
|
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 do think this PR will help make the highlighting better.
See earlier comments about required parser and AST code (re)generation.
Thank you, @jurgenvinju, for the bootstrapping instructions 🙂 I regenerated the parser and the AST classes. The diff consists of 109 files, which was a bit unexpected, so I moved the commit to a separate branch (#2091). After looking at the changes in more detail, though, they seem harmless:
If you agree with this analysis, I'll merge that bootstrap branch into this one. Subsequently, this branch can be merged into |
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.
Yes. Your analysis looks good. Thanks
…o-rascal-grammar-bootstrap
…rammar-bootstrap Add categories to Rascal grammar - Regenerate parser and AST
This PR:
(Outside the scope of this PR: #1928)