Various fixes for parsing type use annotations#206
Open
theawless wants to merge 3 commits intotree-sitter:masterfrom
Open
Various fixes for parsing type use annotations#206theawless wants to merge 3 commits intotree-sitter:masterfrom
theawless wants to merge 3 commits intotree-sitter:masterfrom
Conversation
1418c63 to
14a8c10
Compare
jackschu
approved these changes
Jun 9, 2025
|
I'll note that youre upgrading the ABI here, from my POV thats fine, its likely the next release should include ABI 15 anyways (?), but the maintainers know better or feel differently. It might be worth keeping the ABI at 14 to play it safe ( |
|
Yes, keep commits (and PRs) atomic. Bumping ABI can be a breaking change for consumers stuck on an older version of the library. |
This comment was marked as outdated.
This comment was marked as outdated.
jackschu
approved these changes
Jun 12, 2025
jackschu
left a comment
There was a problem hiding this comment.
Reasoning for the catch type extension seems legit, again though I'm no maintainer (sorry)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix type use annotations before spread parameter
Closes #205
The original fix was here 0d79d9f but there's a typo in that. Java doesn't allow annotations after the ellipsis at all. The original issue #184 as well as the minimal sample found by the maintainer #184 (comment) is for annotations before the ellipsis.
Fix type use annotations in catch types
Closes #208
According to the spec https://docs.oracle.com/javase/specs/jls/se24/html/jls-14.html#jls-CatchType, catch types can be annotated. Note that modifiers and _type can both accept annotations, but I have maintained the existing behaviour - by parsing annotations as part of the modifiers for the first type.