@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 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 keeps the grammar rules, the queries, and the corpus of tree-sitter-java 0.23.5, so it parses the same
16
- language into the same 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
+ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-java",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Java grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -14,7 +14,7 @@
14
14
  }
15
15
  ],
16
16
  "metadata": {
17
- "version": "2.0.0",
17
+ "version": "2.0.1",
18
18
  "license": "MIT",
19
19
  "description": "Java grammar for tree-sitter",
20
20
  "authors": [