tree-sitter-java-orchard 0.5.5 → 0.5.6
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 +4 -3
- package/package.json +1 -1
- package/src/grammar.json +18 -3
- package/src/node-types.json +15 -1
- package/src/parser.c +32684 -32777
- package/tree-sitter-java_orchard.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -73,6 +73,7 @@ module.exports = grammar({
|
|
|
73
73
|
],
|
|
74
74
|
|
|
75
75
|
conflicts: $ => [
|
|
76
|
+
[$.modifiers],
|
|
76
77
|
[$.modifiers, $.annotated_type, $.receiver_parameter],
|
|
77
78
|
[$.modifiers, $.annotated_type, $.module_declaration, $.package_declaration],
|
|
78
79
|
[$._unannotated_type, $.primary_expression, $.inferred_parameters],
|
|
@@ -306,10 +307,10 @@ module.exports = grammar({
|
|
|
306
307
|
instanceof_expression: $ => prec(PREC.REL, seq(
|
|
307
308
|
field('left', $.expression),
|
|
308
309
|
'instanceof',
|
|
309
|
-
optional(
|
|
310
|
+
optional($.modifiers),
|
|
310
311
|
choice(
|
|
311
312
|
seq(
|
|
312
|
-
field('right', $.
|
|
313
|
+
field('right', $._unannotated_type),
|
|
313
314
|
optional(field('name', choice($.identifier, $._reserved_identifier))),
|
|
314
315
|
),
|
|
315
316
|
field('pattern', $.record_pattern),
|
|
@@ -528,7 +529,7 @@ module.exports = grammar({
|
|
|
528
529
|
$.type_pattern,
|
|
529
530
|
$.record_pattern,
|
|
530
531
|
),
|
|
531
|
-
type_pattern: $ => seq($._unannotated_type, choice($.identifier, $._reserved_identifier)),
|
|
532
|
+
type_pattern: $ => seq(optional($.modifiers), $._unannotated_type, choice($.identifier, $._reserved_identifier)),
|
|
532
533
|
record_pattern: $ => seq(choice($.identifier, $._reserved_identifier, $.generic_type, $.scoped_type_identifier), $.record_pattern_body),
|
|
533
534
|
record_pattern_body: $ => seq('(', commaSep(choice($.record_pattern_component, $.record_pattern)), ')'),
|
|
534
535
|
record_pattern_component: $ => choice(
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -2232,8 +2232,8 @@
|
|
|
2232
2232
|
"type": "CHOICE",
|
|
2233
2233
|
"members": [
|
|
2234
2234
|
{
|
|
2235
|
-
"type": "
|
|
2236
|
-
"
|
|
2235
|
+
"type": "SYMBOL",
|
|
2236
|
+
"name": "modifiers"
|
|
2237
2237
|
},
|
|
2238
2238
|
{
|
|
2239
2239
|
"type": "BLANK"
|
|
@@ -2251,7 +2251,7 @@
|
|
|
2251
2251
|
"name": "right",
|
|
2252
2252
|
"content": {
|
|
2253
2253
|
"type": "SYMBOL",
|
|
2254
|
-
"name": "
|
|
2254
|
+
"name": "_unannotated_type"
|
|
2255
2255
|
}
|
|
2256
2256
|
},
|
|
2257
2257
|
{
|
|
@@ -3595,6 +3595,18 @@
|
|
|
3595
3595
|
"type_pattern": {
|
|
3596
3596
|
"type": "SEQ",
|
|
3597
3597
|
"members": [
|
|
3598
|
+
{
|
|
3599
|
+
"type": "CHOICE",
|
|
3600
|
+
"members": [
|
|
3601
|
+
{
|
|
3602
|
+
"type": "SYMBOL",
|
|
3603
|
+
"name": "modifiers"
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
"type": "BLANK"
|
|
3607
|
+
}
|
|
3608
|
+
]
|
|
3609
|
+
},
|
|
3598
3610
|
{
|
|
3599
3611
|
"type": "SYMBOL",
|
|
3600
3612
|
"name": "_unannotated_type"
|
|
@@ -7742,6 +7754,9 @@
|
|
|
7742
7754
|
}
|
|
7743
7755
|
],
|
|
7744
7756
|
"conflicts": [
|
|
7757
|
+
[
|
|
7758
|
+
"modifiers"
|
|
7759
|
+
],
|
|
7745
7760
|
[
|
|
7746
7761
|
"modifiers",
|
|
7747
7762
|
"annotated_type",
|
package/src/node-types.json
CHANGED
|
@@ -2258,11 +2258,21 @@
|
|
|
2258
2258
|
"required": false,
|
|
2259
2259
|
"types": [
|
|
2260
2260
|
{
|
|
2261
|
-
"type": "
|
|
2261
|
+
"type": "_unannotated_type",
|
|
2262
2262
|
"named": true
|
|
2263
2263
|
}
|
|
2264
2264
|
]
|
|
2265
2265
|
}
|
|
2266
|
+
},
|
|
2267
|
+
"children": {
|
|
2268
|
+
"multiple": false,
|
|
2269
|
+
"required": false,
|
|
2270
|
+
"types": [
|
|
2271
|
+
{
|
|
2272
|
+
"type": "modifiers",
|
|
2273
|
+
"named": true
|
|
2274
|
+
}
|
|
2275
|
+
]
|
|
2266
2276
|
}
|
|
2267
2277
|
},
|
|
2268
2278
|
{
|
|
@@ -3898,6 +3908,10 @@
|
|
|
3898
3908
|
{
|
|
3899
3909
|
"type": "identifier",
|
|
3900
3910
|
"named": true
|
|
3911
|
+
},
|
|
3912
|
+
{
|
|
3913
|
+
"type": "modifiers",
|
|
3914
|
+
"named": true
|
|
3901
3915
|
}
|
|
3902
3916
|
]
|
|
3903
3917
|
}
|