@willbooster/tree-sitter-java 2.0.1 → 2.0.3
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 +3 -2
- package/grammar.js +2 -1
- package/package.json +1 -1
- package/src/node-types.json +4 -0
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -12,8 +12,9 @@ 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 is based on tree-sitter-java 0.23.5 and accepts `final` modifiers on switch type patterns
|
|
16
|
-
|
|
15
|
+
This fork is based on tree-sitter-java 0.23.5 and accepts `final` modifiers on switch type patterns
|
|
16
|
+
and typed record-pattern components, plus qualified names in record patterns. These extensions preserve the existing
|
|
17
|
+
node types. It ships the parser as the compact tables that the
|
|
17
18
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator emits under that fork's own ABI number
|
|
18
19
|
(`0x57420001`), so the parser loads only with that runtime, version 2.0.0 or later, and not with upstream's tree-sitter.
|
|
19
20
|
|
package/grammar.js
CHANGED
|
@@ -520,11 +520,12 @@ module.exports = grammar({
|
|
|
520
520
|
$.record_pattern,
|
|
521
521
|
),
|
|
522
522
|
type_pattern: $ => seq(optional('final'), $._unannotated_type, choice($.identifier, $._reserved_identifier)),
|
|
523
|
-
record_pattern: $ => seq(choice($.identifier, $._reserved_identifier, $.generic_type), $.record_pattern_body),
|
|
523
|
+
record_pattern: $ => seq(choice($.identifier, $._reserved_identifier, $.generic_type, $.scoped_type_identifier), $.record_pattern_body),
|
|
524
524
|
record_pattern_body: $ => seq('(', commaSep(choice($.record_pattern_component, $.record_pattern)), ')'),
|
|
525
525
|
record_pattern_component: $ => choice(
|
|
526
526
|
$.underscore_pattern,
|
|
527
527
|
seq(
|
|
528
|
+
optional('final'),
|
|
528
529
|
$._unannotated_type,
|
|
529
530
|
choice($.identifier, $._reserved_identifier),
|
|
530
531
|
),
|
package/package.json
CHANGED
package/src/node-types.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|