Parse Java 25: module imports, flexible constructor bodies, and two pattern forms - #233
Closed
arraypress wants to merge 1 commit into
Closed
arraypress wants to merge 1 commit into
arraypress wants to merge 1 commit into
Conversation
…attern forms - `import module java.base;` (JEP 511) - Statements before `this(…)` / `super(…)` in a constructor (JEP 513) - A qualified type in a record pattern: `o instanceof Shapes.Point(var x, var y)` (as in tree-sitter#231) - `final` on a type pattern: `case final String s ->` (as in tree-sitter#230) New corpus: test/corpus/java25.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @arraypress, If you encounter any issue switching to our fork as a user or contributor, I would be happy to hear what we could improve to enable that. |
Author
|
Thank you @wetneb, that's very helpful. I checked the fork: it parses our whole Java 25 test file without errors and our highlight queries work on it unchanged, so we've switched our vendored Java grammar to tree-sitter-java-orchard and dropped this patch. Closing this in its favour. |
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.
Parses Java 25 syntax that currently produces
ERRORnodes.Added
import module java.base;(JEP 511).this(…)/super(…)in a constructor (JEP 513).o instanceof Shapes.Point(var x, var y)(as in fix(grammar): allow a qualified type name in a record pattern #231).finalon a type pattern:case final String s ->(as in fix: allow a final modifier on a switch pattern's type pattern #230).Tests: all existing corpus tests pass unchanged. New
test/corpus/java25.txtcovers each construct.Generated with tree-sitter-cli 0.24.7, which regenerates the current
src/parser.cbyte for byte, so the ABI stays at 14.If you'd rather merge #230 and #231 on their own, I'll drop those two parts.
🤖 Generated with Claude Code