@willbooster/tree-sitter-java 7.0.1 → 7.0.2
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/grammar.js +3 -3
- package/package.json +1 -1
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -388,7 +388,7 @@ module.exports = grammar({
|
|
|
388
388
|
seq(
|
|
389
389
|
repeat(choice($._annotation, 'final')),
|
|
390
390
|
field('right', $._unannotated_type),
|
|
391
|
-
field('name', choice($.identifier, $._reserved_identifier, $.underscore_pattern)),
|
|
391
|
+
field('name', choice($.identifier, $._reserved_identifier, alias('when', $.identifier), $.underscore_pattern)),
|
|
392
392
|
),
|
|
393
393
|
field('right', $._type),
|
|
394
394
|
field('pattern', $.record_pattern),
|
|
@@ -615,7 +615,7 @@ module.exports = grammar({
|
|
|
615
615
|
$.type_pattern,
|
|
616
616
|
$.record_pattern,
|
|
617
617
|
),
|
|
618
|
-
type_pattern: $ => seq(repeat(choice($._annotation, 'final')), $._unannotated_type, choice($.identifier, $._reserved_identifier, $.underscore_pattern)),
|
|
618
|
+
type_pattern: $ => seq(repeat(choice($._annotation, 'final')), $._unannotated_type, choice($.identifier, $._reserved_identifier, alias('when', $.identifier), $.underscore_pattern)),
|
|
619
619
|
record_pattern: $ => seq(choice($.identifier, $._reserved_identifier, $.generic_type, $.scoped_type_identifier), $.record_pattern_body),
|
|
620
620
|
record_pattern_body: $ => seq('(', commaSep(choice($.record_pattern_component, $.record_pattern)), ')'),
|
|
621
621
|
record_pattern_component: $ => choice(
|
|
@@ -623,7 +623,7 @@ module.exports = grammar({
|
|
|
623
623
|
seq(
|
|
624
624
|
repeat(choice($._annotation, 'final')),
|
|
625
625
|
$._unannotated_type,
|
|
626
|
-
choice($.identifier, $._reserved_identifier, $.underscore_pattern),
|
|
626
|
+
choice($.identifier, $._reserved_identifier, alias('when', $.identifier), $.underscore_pattern),
|
|
627
627
|
),
|
|
628
628
|
),
|
|
629
629
|
|
package/package.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|