@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 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
- The extension preserves the existing node types. It ships the parser as the compact tables that the
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-java",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Java grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -3126,6 +3126,10 @@
3126
3126
  {
3127
3127
  "type": "record_pattern_body",
3128
3128
  "named": true
3129
+ },
3130
+ {
3131
+ "type": "scoped_type_identifier",
3132
+ "named": true
3129
3133
  }
3130
3134
  ]
3131
3135
  }
Binary file
package/tree-sitter.json CHANGED
@@ -14,7 +14,7 @@
14
14
  }
15
15
  ],
16
16
  "metadata": {
17
- "version": "2.0.1",
17
+ "version": "2.0.3",
18
18
  "license": "MIT",
19
19
  "description": "Java grammar for tree-sitter",
20
20
  "authors": [