@willbooster/tree-sitter-java 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/grammar.js +1 -1
- package/package.json +1 -1
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -12,8 +12,8 @@ Java grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), fork
|
|
|
12
12
|
[tree-sitter/tree-sitter-java](https://github.com/tree-sitter/tree-sitter-java). We are grateful
|
|
13
13
|
to its authors and contributors. This is not an official release of that project.
|
|
14
14
|
|
|
15
|
-
This fork
|
|
16
|
-
|
|
15
|
+
This fork is based on tree-sitter-java 0.23.5 and accepts `final` modifiers on switch type patterns.
|
|
16
|
+
The extension preserves the existing node types. It ships the parser as the compact tables that the
|
|
17
17
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator emits under that fork's own ABI number
|
|
18
18
|
(`0x57420001`), so the parser loads only with that runtime, version 2.0.0 or later, and not with upstream's tree-sitter.
|
|
19
19
|
|
package/grammar.js
CHANGED
|
@@ -519,7 +519,7 @@ module.exports = grammar({
|
|
|
519
519
|
$.type_pattern,
|
|
520
520
|
$.record_pattern,
|
|
521
521
|
),
|
|
522
|
-
type_pattern: $ => seq($._unannotated_type, choice($.identifier, $._reserved_identifier)),
|
|
522
|
+
type_pattern: $ => seq(optional('final'), $._unannotated_type, choice($.identifier, $._reserved_identifier)),
|
|
523
523
|
record_pattern: $ => seq(choice($.identifier, $._reserved_identifier, $.generic_type), $.record_pattern_body),
|
|
524
524
|
record_pattern_body: $ => seq('(', commaSep(choice($.record_pattern_component, $.record_pattern)), ')'),
|
|
525
525
|
record_pattern_component: $ => choice(
|
package/package.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|