@willbooster/tree-sitter-java 3.0.4 → 3.1.0
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 +5 -10
- package/package.json +1 -1
- package/tree-sitter-java.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -102,7 +102,6 @@ module.exports = grammar({
|
|
|
102
102
|
$.method_declaration,
|
|
103
103
|
),
|
|
104
104
|
|
|
105
|
-
|
|
106
105
|
_literal: $ => choice(
|
|
107
106
|
$.decimal_integer_literal,
|
|
108
107
|
$.hex_integer_literal,
|
|
@@ -226,7 +225,6 @@ module.exports = grammar({
|
|
|
226
225
|
|
|
227
226
|
null_literal: _ => 'null',
|
|
228
227
|
|
|
229
|
-
|
|
230
228
|
expression: $ => choice(
|
|
231
229
|
$.assignment_expression,
|
|
232
230
|
$.binary_expression,
|
|
@@ -538,7 +536,6 @@ module.exports = grammar({
|
|
|
538
536
|
|
|
539
537
|
guard: $ => seq('when', $.expression),
|
|
540
538
|
|
|
541
|
-
|
|
542
539
|
statement: $ => choice(
|
|
543
540
|
$.declaration,
|
|
544
541
|
$.expression_statement,
|
|
@@ -706,7 +703,6 @@ module.exports = grammar({
|
|
|
706
703
|
field('body', $.statement),
|
|
707
704
|
),
|
|
708
705
|
|
|
709
|
-
|
|
710
706
|
_annotation: $ => choice(
|
|
711
707
|
$.marker_annotation,
|
|
712
708
|
$.annotation,
|
|
@@ -751,7 +747,6 @@ module.exports = grammar({
|
|
|
751
747
|
'}',
|
|
752
748
|
),
|
|
753
749
|
|
|
754
|
-
|
|
755
750
|
declaration: $ => prec(PREC.DECL, choice(
|
|
756
751
|
$.module_declaration,
|
|
757
752
|
$.package_declaration,
|
|
@@ -843,9 +838,10 @@ module.exports = grammar({
|
|
|
843
838
|
|
|
844
839
|
import_declaration: $ => seq(
|
|
845
840
|
'import',
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
841
|
+
choice(
|
|
842
|
+
seq('module', $._name),
|
|
843
|
+
seq(optional('static'), $._name, optional(seq('.', $.asterisk))),
|
|
844
|
+
),
|
|
849
845
|
';',
|
|
850
846
|
),
|
|
851
847
|
|
|
@@ -981,8 +977,8 @@ module.exports = grammar({
|
|
|
981
977
|
|
|
982
978
|
constructor_body: $ => seq(
|
|
983
979
|
'{',
|
|
984
|
-
optional($.explicit_constructor_invocation),
|
|
985
980
|
repeat($.statement),
|
|
981
|
+
optional(seq($.explicit_constructor_invocation, repeat($.statement))),
|
|
986
982
|
'}',
|
|
987
983
|
),
|
|
988
984
|
|
|
@@ -1131,7 +1127,6 @@ module.exports = grammar({
|
|
|
1131
1127
|
'}',
|
|
1132
1128
|
),
|
|
1133
1129
|
|
|
1134
|
-
|
|
1135
1130
|
_type: $ => choice(
|
|
1136
1131
|
$._unannotated_type,
|
|
1137
1132
|
$.annotated_type,
|
package/package.json
CHANGED
package/tree-sitter-java.wasm
CHANGED
|
Binary file
|