tree-sitter-java-orchard 0.5.9 → 0.5.15
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 +9 -7
- package/package.json +1 -1
- package/src/grammar.json +15 -7
- package/src/node-types.json +5 -5
- package/src/parser.c +54418 -48561
- package/tree-sitter-java_orchard.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -242,7 +242,7 @@ export default grammar({
|
|
|
242
242
|
$.switch_expression,
|
|
243
243
|
),
|
|
244
244
|
|
|
245
|
-
cast_expression: $ => prec(PREC.CAST, choice(
|
|
245
|
+
cast_expression: $ => prec.right(PREC.CAST, choice(
|
|
246
246
|
seq(
|
|
247
247
|
'(',
|
|
248
248
|
field('type', $._type),
|
|
@@ -269,6 +269,7 @@ export default grammar({
|
|
|
269
269
|
$._reserved_identifier,
|
|
270
270
|
$.field_access,
|
|
271
271
|
$.array_access,
|
|
272
|
+
$.parenthesized_expression,
|
|
272
273
|
)),
|
|
273
274
|
field('operator', choice('=', '+=', '-=', '*=', '/=', '&=', '|=', '^=', '%=', '<<=', '>>=', '>>>=')),
|
|
274
275
|
field('right', $.expression),
|
|
@@ -352,12 +353,12 @@ export default grammar({
|
|
|
352
353
|
field('operand', $.expression),
|
|
353
354
|
)),
|
|
354
355
|
|
|
355
|
-
update_expression: $ => prec.
|
|
356
|
+
update_expression: $ => prec.right(PREC.UNARY, choice(
|
|
356
357
|
// Post (in|de)crement is evaluated before pre (in|de)crement
|
|
357
|
-
seq($.
|
|
358
|
-
seq($.
|
|
359
|
-
seq('++', $.
|
|
360
|
-
seq('--', $.
|
|
358
|
+
seq($.primary_expression, '++'),
|
|
359
|
+
seq($.primary_expression, '--'),
|
|
360
|
+
seq('++', $.primary_expression),
|
|
361
|
+
seq('--', $.primary_expression),
|
|
361
362
|
)),
|
|
362
363
|
|
|
363
364
|
primary_expression: $ => choice(
|
|
@@ -1081,7 +1082,8 @@ export default grammar({
|
|
|
1081
1082
|
|
|
1082
1083
|
annotation_type_declaration: $ => seq(
|
|
1083
1084
|
optional($.modifiers),
|
|
1084
|
-
'@
|
|
1085
|
+
'@',
|
|
1086
|
+
'interface',
|
|
1085
1087
|
field('name', $.identifier),
|
|
1086
1088
|
field('body', $.annotation_type_body),
|
|
1087
1089
|
),
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -1362,7 +1362,7 @@
|
|
|
1362
1362
|
]
|
|
1363
1363
|
},
|
|
1364
1364
|
"cast_expression": {
|
|
1365
|
-
"type": "
|
|
1365
|
+
"type": "PREC_RIGHT",
|
|
1366
1366
|
"value": 14,
|
|
1367
1367
|
"content": {
|
|
1368
1368
|
"type": "CHOICE",
|
|
@@ -1506,6 +1506,10 @@
|
|
|
1506
1506
|
{
|
|
1507
1507
|
"type": "SYMBOL",
|
|
1508
1508
|
"name": "array_access"
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"type": "SYMBOL",
|
|
1512
|
+
"name": "parenthesized_expression"
|
|
1509
1513
|
}
|
|
1510
1514
|
]
|
|
1511
1515
|
}
|
|
@@ -2520,7 +2524,7 @@
|
|
|
2520
2524
|
}
|
|
2521
2525
|
},
|
|
2522
2526
|
"update_expression": {
|
|
2523
|
-
"type": "
|
|
2527
|
+
"type": "PREC_RIGHT",
|
|
2524
2528
|
"value": 15,
|
|
2525
2529
|
"content": {
|
|
2526
2530
|
"type": "CHOICE",
|
|
@@ -2530,7 +2534,7 @@
|
|
|
2530
2534
|
"members": [
|
|
2531
2535
|
{
|
|
2532
2536
|
"type": "SYMBOL",
|
|
2533
|
-
"name": "
|
|
2537
|
+
"name": "primary_expression"
|
|
2534
2538
|
},
|
|
2535
2539
|
{
|
|
2536
2540
|
"type": "STRING",
|
|
@@ -2543,7 +2547,7 @@
|
|
|
2543
2547
|
"members": [
|
|
2544
2548
|
{
|
|
2545
2549
|
"type": "SYMBOL",
|
|
2546
|
-
"name": "
|
|
2550
|
+
"name": "primary_expression"
|
|
2547
2551
|
},
|
|
2548
2552
|
{
|
|
2549
2553
|
"type": "STRING",
|
|
@@ -2560,7 +2564,7 @@
|
|
|
2560
2564
|
},
|
|
2561
2565
|
{
|
|
2562
2566
|
"type": "SYMBOL",
|
|
2563
|
-
"name": "
|
|
2567
|
+
"name": "primary_expression"
|
|
2564
2568
|
}
|
|
2565
2569
|
]
|
|
2566
2570
|
},
|
|
@@ -2573,7 +2577,7 @@
|
|
|
2573
2577
|
},
|
|
2574
2578
|
{
|
|
2575
2579
|
"type": "SYMBOL",
|
|
2576
|
-
"name": "
|
|
2580
|
+
"name": "primary_expression"
|
|
2577
2581
|
}
|
|
2578
2582
|
]
|
|
2579
2583
|
}
|
|
@@ -6524,7 +6528,11 @@
|
|
|
6524
6528
|
},
|
|
6525
6529
|
{
|
|
6526
6530
|
"type": "STRING",
|
|
6527
|
-
"value": "@
|
|
6531
|
+
"value": "@"
|
|
6532
|
+
},
|
|
6533
|
+
{
|
|
6534
|
+
"type": "STRING",
|
|
6535
|
+
"value": "interface"
|
|
6528
6536
|
},
|
|
6529
6537
|
{
|
|
6530
6538
|
"type": "FIELD",
|
package/src/node-types.json
CHANGED
|
@@ -766,6 +766,10 @@
|
|
|
766
766
|
{
|
|
767
767
|
"type": "identifier",
|
|
768
768
|
"named": true
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"type": "parenthesized_expression",
|
|
772
|
+
"named": true
|
|
769
773
|
}
|
|
770
774
|
]
|
|
771
775
|
},
|
|
@@ -4001,7 +4005,7 @@
|
|
|
4001
4005
|
"required": true,
|
|
4002
4006
|
"types": [
|
|
4003
4007
|
{
|
|
4004
|
-
"type": "
|
|
4008
|
+
"type": "primary_expression",
|
|
4005
4009
|
"named": true
|
|
4006
4010
|
}
|
|
4007
4011
|
]
|
|
@@ -4312,10 +4316,6 @@
|
|
|
4312
4316
|
"type": "@",
|
|
4313
4317
|
"named": false
|
|
4314
4318
|
},
|
|
4315
|
-
{
|
|
4316
|
-
"type": "@interface",
|
|
4317
|
-
"named": false
|
|
4318
|
-
},
|
|
4319
4319
|
{
|
|
4320
4320
|
"type": "[",
|
|
4321
4321
|
"named": false
|