@willbooster/tree-sitter-java 3.0.3 → 3.0.4

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 CHANGED
@@ -102,7 +102,6 @@ module.exports = grammar({
102
102
  $.method_declaration,
103
103
  ),
104
104
 
105
- // Literals
106
105
 
107
106
  _literal: $ => choice(
108
107
  $.decimal_integer_literal,
@@ -227,7 +226,6 @@ module.exports = grammar({
227
226
 
228
227
  null_literal: _ => 'null',
229
228
 
230
- // Expressions
231
229
 
232
230
  expression: $ => choice(
233
231
  $.assignment_expression,
@@ -540,7 +538,6 @@ module.exports = grammar({
540
538
 
541
539
  guard: $ => seq('when', $.expression),
542
540
 
543
- // Statements
544
541
 
545
542
  statement: $ => choice(
546
543
  $.declaration,
@@ -709,7 +706,6 @@ module.exports = grammar({
709
706
  field('body', $.statement),
710
707
  ),
711
708
 
712
- // Annotations
713
709
 
714
710
  _annotation: $ => choice(
715
711
  $.marker_annotation,
@@ -755,7 +751,6 @@ module.exports = grammar({
755
751
  '}',
756
752
  ),
757
753
 
758
- // Declarations
759
754
 
760
755
  declaration: $ => prec(PREC.DECL, choice(
761
756
  $.module_declaration,
@@ -1136,7 +1131,6 @@ module.exports = grammar({
1136
1131
  '}',
1137
1132
  ),
1138
1133
 
1139
- // Types
1140
1134
 
1141
1135
  _type: $ => choice(
1142
1136
  $._unannotated_type,
@@ -1238,12 +1232,12 @@ module.exports = grammar({
1238
1232
  $._variable_declarator_id,
1239
1233
  ),
1240
1234
 
1241
- receiver_parameter: $ => seq(
1235
+ receiver_parameter: $ => prec.dynamic(1, seq(
1242
1236
  repeat($._annotation),
1243
1237
  $._unannotated_type,
1244
1238
  repeat(seq($.identifier, '.')),
1245
1239
  $.this,
1246
- ),
1240
+ )),
1247
1241
 
1248
1242
  spread_parameter: $ => seq(
1249
1243
  optional($.modifiers),
@@ -1311,8 +1305,6 @@ module.exports = grammar({
1311
1305
  });
1312
1306
 
1313
1307
  /**
1314
- * Creates a rule to match one or more of the rules separated by `separator`
1315
- *
1316
1308
  * @param {RuleOrLiteral} rule
1317
1309
  *
1318
1310
  * @param {RuleOrLiteral} separator
@@ -1324,8 +1316,6 @@ function sep1(rule, separator) {
1324
1316
  }
1325
1317
 
1326
1318
  /**
1327
- * Creates a rule to match one or more of the rules separated by a comma
1328
- *
1329
1319
  * @param {RuleOrLiteral} rule
1330
1320
  *
1331
1321
  * @returns {SeqRule}
@@ -1335,8 +1325,6 @@ function commaSep1(rule) {
1335
1325
  }
1336
1326
 
1337
1327
  /**
1338
- * Creates a rule to optionally match one or more of the rules separated by a comma
1339
- *
1340
1328
  * @param {RuleOrLiteral} rule
1341
1329
  *
1342
1330
  * @returns {ChoiceRule}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-java",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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": "3.0.3",
17
+ "version": "3.0.4",
18
18
  "license": "MIT",
19
19
  "description": "Java grammar for tree-sitter",
20
20
  "authors": [