tree-sitter-java-orchard 0.5.6 → 0.5.7
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 +26 -4
- package/package.json +1 -1
- package/src/grammar.json +99 -8
- package/src/node-types.json +55 -17
- package/src/parser.c +30934 -30404
- package/tree-sitter-java_orchard.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -518,7 +518,16 @@ module.exports = grammar({
|
|
|
518
518
|
seq('case',
|
|
519
519
|
choice(
|
|
520
520
|
commaSep1($.pattern),
|
|
521
|
-
commaSep1(
|
|
521
|
+
commaSep1(
|
|
522
|
+
choice(
|
|
523
|
+
$.binary_expression,
|
|
524
|
+
$.instanceof_expression,
|
|
525
|
+
$.ternary_expression,
|
|
526
|
+
$.primary_expression,
|
|
527
|
+
$.unary_expression,
|
|
528
|
+
$.cast_expression,
|
|
529
|
+
),
|
|
530
|
+
),
|
|
522
531
|
),
|
|
523
532
|
optional($.guard),
|
|
524
533
|
),
|
|
@@ -543,7 +552,20 @@ module.exports = grammar({
|
|
|
543
552
|
|
|
544
553
|
underscore_pattern: _ => '_',
|
|
545
554
|
|
|
546
|
-
guard: $ => seq(
|
|
555
|
+
guard: $ => seq(
|
|
556
|
+
'when',
|
|
557
|
+
choice(
|
|
558
|
+
$.assignment_expression,
|
|
559
|
+
$.binary_expression,
|
|
560
|
+
$.instanceof_expression,
|
|
561
|
+
$.ternary_expression,
|
|
562
|
+
$.update_expression,
|
|
563
|
+
$.primary_expression,
|
|
564
|
+
$.unary_expression,
|
|
565
|
+
$.cast_expression,
|
|
566
|
+
$.switch_expression,
|
|
567
|
+
),
|
|
568
|
+
),
|
|
547
569
|
|
|
548
570
|
// Statements
|
|
549
571
|
|
|
@@ -839,8 +861,8 @@ module.exports = grammar({
|
|
|
839
861
|
'provides',
|
|
840
862
|
field('provided', $._name),
|
|
841
863
|
'with',
|
|
842
|
-
$._name,
|
|
843
|
-
repeat(seq(',',
|
|
864
|
+
field('provider', $._name),
|
|
865
|
+
repeat(seq(',', field('provider', $._name))),
|
|
844
866
|
';',
|
|
845
867
|
),
|
|
846
868
|
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -3536,8 +3536,33 @@
|
|
|
3536
3536
|
"type": "SEQ",
|
|
3537
3537
|
"members": [
|
|
3538
3538
|
{
|
|
3539
|
-
"type": "
|
|
3540
|
-
"
|
|
3539
|
+
"type": "CHOICE",
|
|
3540
|
+
"members": [
|
|
3541
|
+
{
|
|
3542
|
+
"type": "SYMBOL",
|
|
3543
|
+
"name": "binary_expression"
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
"type": "SYMBOL",
|
|
3547
|
+
"name": "instanceof_expression"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
"type": "SYMBOL",
|
|
3551
|
+
"name": "ternary_expression"
|
|
3552
|
+
},
|
|
3553
|
+
{
|
|
3554
|
+
"type": "SYMBOL",
|
|
3555
|
+
"name": "primary_expression"
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"type": "SYMBOL",
|
|
3559
|
+
"name": "unary_expression"
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
"type": "SYMBOL",
|
|
3563
|
+
"name": "cast_expression"
|
|
3564
|
+
}
|
|
3565
|
+
]
|
|
3541
3566
|
},
|
|
3542
3567
|
{
|
|
3543
3568
|
"type": "REPEAT",
|
|
@@ -3549,8 +3574,33 @@
|
|
|
3549
3574
|
"value": ","
|
|
3550
3575
|
},
|
|
3551
3576
|
{
|
|
3552
|
-
"type": "
|
|
3553
|
-
"
|
|
3577
|
+
"type": "CHOICE",
|
|
3578
|
+
"members": [
|
|
3579
|
+
{
|
|
3580
|
+
"type": "SYMBOL",
|
|
3581
|
+
"name": "binary_expression"
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
"type": "SYMBOL",
|
|
3585
|
+
"name": "instanceof_expression"
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"type": "SYMBOL",
|
|
3589
|
+
"name": "ternary_expression"
|
|
3590
|
+
},
|
|
3591
|
+
{
|
|
3592
|
+
"type": "SYMBOL",
|
|
3593
|
+
"name": "primary_expression"
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
"type": "SYMBOL",
|
|
3597
|
+
"name": "unary_expression"
|
|
3598
|
+
},
|
|
3599
|
+
{
|
|
3600
|
+
"type": "SYMBOL",
|
|
3601
|
+
"name": "cast_expression"
|
|
3602
|
+
}
|
|
3603
|
+
]
|
|
3554
3604
|
}
|
|
3555
3605
|
]
|
|
3556
3606
|
}
|
|
@@ -3775,8 +3825,45 @@
|
|
|
3775
3825
|
"value": "when"
|
|
3776
3826
|
},
|
|
3777
3827
|
{
|
|
3778
|
-
"type": "
|
|
3779
|
-
"
|
|
3828
|
+
"type": "CHOICE",
|
|
3829
|
+
"members": [
|
|
3830
|
+
{
|
|
3831
|
+
"type": "SYMBOL",
|
|
3832
|
+
"name": "assignment_expression"
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"type": "SYMBOL",
|
|
3836
|
+
"name": "binary_expression"
|
|
3837
|
+
},
|
|
3838
|
+
{
|
|
3839
|
+
"type": "SYMBOL",
|
|
3840
|
+
"name": "instanceof_expression"
|
|
3841
|
+
},
|
|
3842
|
+
{
|
|
3843
|
+
"type": "SYMBOL",
|
|
3844
|
+
"name": "ternary_expression"
|
|
3845
|
+
},
|
|
3846
|
+
{
|
|
3847
|
+
"type": "SYMBOL",
|
|
3848
|
+
"name": "update_expression"
|
|
3849
|
+
},
|
|
3850
|
+
{
|
|
3851
|
+
"type": "SYMBOL",
|
|
3852
|
+
"name": "primary_expression"
|
|
3853
|
+
},
|
|
3854
|
+
{
|
|
3855
|
+
"type": "SYMBOL",
|
|
3856
|
+
"name": "unary_expression"
|
|
3857
|
+
},
|
|
3858
|
+
{
|
|
3859
|
+
"type": "SYMBOL",
|
|
3860
|
+
"name": "cast_expression"
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
"type": "SYMBOL",
|
|
3864
|
+
"name": "switch_expression"
|
|
3865
|
+
}
|
|
3866
|
+
]
|
|
3780
3867
|
}
|
|
3781
3868
|
]
|
|
3782
3869
|
},
|
|
@@ -5274,8 +5361,12 @@
|
|
|
5274
5361
|
"value": "with"
|
|
5275
5362
|
},
|
|
5276
5363
|
{
|
|
5277
|
-
"type": "
|
|
5278
|
-
"name": "
|
|
5364
|
+
"type": "FIELD",
|
|
5365
|
+
"name": "provider",
|
|
5366
|
+
"content": {
|
|
5367
|
+
"type": "SYMBOL",
|
|
5368
|
+
"name": "_name"
|
|
5369
|
+
}
|
|
5279
5370
|
},
|
|
5280
5371
|
{
|
|
5281
5372
|
"type": "REPEAT",
|
package/src/node-types.json
CHANGED
|
@@ -2139,7 +2139,39 @@
|
|
|
2139
2139
|
"required": true,
|
|
2140
2140
|
"types": [
|
|
2141
2141
|
{
|
|
2142
|
-
"type": "
|
|
2142
|
+
"type": "assignment_expression",
|
|
2143
|
+
"named": true
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
"type": "binary_expression",
|
|
2147
|
+
"named": true
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"type": "cast_expression",
|
|
2151
|
+
"named": true
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"type": "instanceof_expression",
|
|
2155
|
+
"named": true
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
"type": "primary_expression",
|
|
2159
|
+
"named": true
|
|
2160
|
+
},
|
|
2161
|
+
{
|
|
2162
|
+
"type": "switch_expression",
|
|
2163
|
+
"named": true
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
"type": "ternary_expression",
|
|
2167
|
+
"named": true
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"type": "unary_expression",
|
|
2171
|
+
"named": true
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"type": "update_expression",
|
|
2143
2175
|
"named": true
|
|
2144
2176
|
}
|
|
2145
2177
|
]
|
|
@@ -2971,7 +3003,7 @@
|
|
|
2971
3003
|
},
|
|
2972
3004
|
"provider": {
|
|
2973
3005
|
"multiple": true,
|
|
2974
|
-
"required":
|
|
3006
|
+
"required": true,
|
|
2975
3007
|
"types": [
|
|
2976
3008
|
{
|
|
2977
3009
|
"type": "identifier",
|
|
@@ -2983,20 +3015,6 @@
|
|
|
2983
3015
|
}
|
|
2984
3016
|
]
|
|
2985
3017
|
}
|
|
2986
|
-
},
|
|
2987
|
-
"children": {
|
|
2988
|
-
"multiple": false,
|
|
2989
|
-
"required": true,
|
|
2990
|
-
"types": [
|
|
2991
|
-
{
|
|
2992
|
-
"type": "identifier",
|
|
2993
|
-
"named": true
|
|
2994
|
-
},
|
|
2995
|
-
{
|
|
2996
|
-
"type": "scoped_identifier",
|
|
2997
|
-
"named": true
|
|
2998
|
-
}
|
|
2999
|
-
]
|
|
3000
3018
|
}
|
|
3001
3019
|
},
|
|
3002
3020
|
{
|
|
@@ -3573,16 +3591,36 @@
|
|
|
3573
3591
|
"required": false,
|
|
3574
3592
|
"types": [
|
|
3575
3593
|
{
|
|
3576
|
-
"type": "
|
|
3594
|
+
"type": "binary_expression",
|
|
3595
|
+
"named": true
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"type": "cast_expression",
|
|
3577
3599
|
"named": true
|
|
3578
3600
|
},
|
|
3579
3601
|
{
|
|
3580
3602
|
"type": "guard",
|
|
3581
3603
|
"named": true
|
|
3582
3604
|
},
|
|
3605
|
+
{
|
|
3606
|
+
"type": "instanceof_expression",
|
|
3607
|
+
"named": true
|
|
3608
|
+
},
|
|
3583
3609
|
{
|
|
3584
3610
|
"type": "pattern",
|
|
3585
3611
|
"named": true
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
"type": "primary_expression",
|
|
3615
|
+
"named": true
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
"type": "ternary_expression",
|
|
3619
|
+
"named": true
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
"type": "unary_expression",
|
|
3623
|
+
"named": true
|
|
3586
3624
|
}
|
|
3587
3625
|
]
|
|
3588
3626
|
}
|