@hew-lang/tree-sitter-hew 1.2.2 → 1.2.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 +53 -17
- package/package.json +1 -1
- package/queries/highlights.scm +5 -0
- package/src/grammar.json +381 -128
- package/src/node-types.json +181 -11
- package/src/parser.c +206070 -125473
- package/tree-sitter.json +1 -1
package/src/grammar.json
CHANGED
|
@@ -1080,27 +1080,6 @@
|
|
|
1080
1080
|
{
|
|
1081
1081
|
"type": "SYMBOL",
|
|
1082
1082
|
"name": "reserved_declaration"
|
|
1083
|
-
},
|
|
1084
|
-
{
|
|
1085
|
-
"type": "SEQ",
|
|
1086
|
-
"members": [
|
|
1087
|
-
{
|
|
1088
|
-
"type": "CHOICE",
|
|
1089
|
-
"members": [
|
|
1090
|
-
{
|
|
1091
|
-
"type": "SYMBOL",
|
|
1092
|
-
"name": "visibility"
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
"type": "BLANK"
|
|
1096
|
-
}
|
|
1097
|
-
]
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
"type": "SYMBOL",
|
|
1101
|
-
"name": "function_declaration"
|
|
1102
|
-
}
|
|
1103
|
-
]
|
|
1104
1083
|
}
|
|
1105
1084
|
]
|
|
1106
1085
|
}
|
|
@@ -1336,8 +1315,17 @@
|
|
|
1336
1315
|
{
|
|
1337
1316
|
"type": "REPEAT",
|
|
1338
1317
|
"content": {
|
|
1339
|
-
"type": "
|
|
1340
|
-
"
|
|
1318
|
+
"type": "CHOICE",
|
|
1319
|
+
"members": [
|
|
1320
|
+
{
|
|
1321
|
+
"type": "SYMBOL",
|
|
1322
|
+
"name": "variant"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"type": "SYMBOL",
|
|
1326
|
+
"name": "reserved_declaration"
|
|
1327
|
+
}
|
|
1328
|
+
]
|
|
1341
1329
|
}
|
|
1342
1330
|
},
|
|
1343
1331
|
{
|
|
@@ -3429,6 +3417,10 @@
|
|
|
3429
3417
|
"type": "SYMBOL",
|
|
3430
3418
|
"name": "machine_state"
|
|
3431
3419
|
},
|
|
3420
|
+
{
|
|
3421
|
+
"type": "SYMBOL",
|
|
3422
|
+
"name": "machine_parallel_state"
|
|
3423
|
+
},
|
|
3432
3424
|
{
|
|
3433
3425
|
"type": "SYMBOL",
|
|
3434
3426
|
"name": "machine_transition"
|
|
@@ -3539,6 +3531,18 @@
|
|
|
3539
3531
|
"machine_state": {
|
|
3540
3532
|
"type": "SEQ",
|
|
3541
3533
|
"members": [
|
|
3534
|
+
{
|
|
3535
|
+
"type": "CHOICE",
|
|
3536
|
+
"members": [
|
|
3537
|
+
{
|
|
3538
|
+
"type": "STRING",
|
|
3539
|
+
"value": "final"
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
"type": "BLANK"
|
|
3543
|
+
}
|
|
3544
|
+
]
|
|
3545
|
+
},
|
|
3542
3546
|
{
|
|
3543
3547
|
"type": "STRING",
|
|
3544
3548
|
"value": "state"
|
|
@@ -3568,72 +3572,59 @@
|
|
|
3568
3572
|
{
|
|
3569
3573
|
"type": "REPEAT",
|
|
3570
3574
|
"content": {
|
|
3571
|
-
"type": "
|
|
3572
|
-
"
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3575
|
+
"type": "CHOICE",
|
|
3576
|
+
"members": [
|
|
3577
|
+
{
|
|
3578
|
+
"type": "SYMBOL",
|
|
3579
|
+
"name": "struct_field"
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
"type": "SEQ",
|
|
3583
|
+
"members": [
|
|
3584
|
+
{
|
|
3585
|
+
"type": "STRING",
|
|
3586
|
+
"value": "entry"
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
"type": "FIELD",
|
|
3590
|
+
"name": "entry_body",
|
|
3591
|
+
"content": {
|
|
3592
|
+
"type": "SYMBOL",
|
|
3593
|
+
"name": "block"
|
|
3594
|
+
}
|
|
3591
3595
|
}
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
"value": "exit"
|
|
3609
|
-
},
|
|
3610
|
-
{
|
|
3611
|
-
"type": "FIELD",
|
|
3612
|
-
"name": "exit_body",
|
|
3613
|
-
"content": {
|
|
3614
|
-
"type": "SYMBOL",
|
|
3615
|
-
"name": "block"
|
|
3596
|
+
]
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
"type": "SEQ",
|
|
3600
|
+
"members": [
|
|
3601
|
+
{
|
|
3602
|
+
"type": "STRING",
|
|
3603
|
+
"value": "exit"
|
|
3604
|
+
},
|
|
3605
|
+
{
|
|
3606
|
+
"type": "FIELD",
|
|
3607
|
+
"name": "exit_body",
|
|
3608
|
+
"content": {
|
|
3609
|
+
"type": "SYMBOL",
|
|
3610
|
+
"name": "block"
|
|
3611
|
+
}
|
|
3616
3612
|
}
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
{
|
|
3633
|
-
"type": "REPEAT",
|
|
3634
|
-
"content": {
|
|
3635
|
-
"type": "SYMBOL",
|
|
3636
|
-
"name": "machine_transition"
|
|
3613
|
+
]
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"type": "SYMBOL",
|
|
3617
|
+
"name": "machine_composite_member"
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
"type": "SYMBOL",
|
|
3621
|
+
"name": "machine_initial"
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
"type": "SYMBOL",
|
|
3625
|
+
"name": "machine_transition"
|
|
3626
|
+
}
|
|
3627
|
+
]
|
|
3637
3628
|
}
|
|
3638
3629
|
},
|
|
3639
3630
|
{
|
|
@@ -3662,26 +3653,193 @@
|
|
|
3662
3653
|
]
|
|
3663
3654
|
},
|
|
3664
3655
|
{
|
|
3665
|
-
"type": "
|
|
3666
|
-
"
|
|
3656
|
+
"type": "CHOICE",
|
|
3657
|
+
"members": [
|
|
3658
|
+
{
|
|
3659
|
+
"type": "SYMBOL",
|
|
3660
|
+
"name": "machine_state"
|
|
3661
|
+
},
|
|
3662
|
+
{
|
|
3663
|
+
"type": "SYMBOL",
|
|
3664
|
+
"name": "machine_parallel_state"
|
|
3665
|
+
}
|
|
3666
|
+
]
|
|
3667
3667
|
}
|
|
3668
3668
|
]
|
|
3669
3669
|
},
|
|
3670
|
-
"
|
|
3670
|
+
"machine_parallel_state": {
|
|
3671
3671
|
"type": "SEQ",
|
|
3672
3672
|
"members": [
|
|
3673
3673
|
{
|
|
3674
3674
|
"type": "STRING",
|
|
3675
|
-
"value": "
|
|
3675
|
+
"value": "parallel"
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
"type": "STRING",
|
|
3679
|
+
"value": "state"
|
|
3676
3680
|
},
|
|
3677
3681
|
{
|
|
3678
3682
|
"type": "FIELD",
|
|
3679
|
-
"name": "
|
|
3683
|
+
"name": "name",
|
|
3684
|
+
"content": {
|
|
3685
|
+
"type": "SYMBOL",
|
|
3686
|
+
"name": "identifier"
|
|
3687
|
+
}
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"type": "STRING",
|
|
3691
|
+
"value": "{"
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"type": "REPEAT",
|
|
3695
|
+
"content": {
|
|
3696
|
+
"type": "CHOICE",
|
|
3697
|
+
"members": [
|
|
3698
|
+
{
|
|
3699
|
+
"type": "SYMBOL",
|
|
3700
|
+
"name": "struct_field"
|
|
3701
|
+
},
|
|
3702
|
+
{
|
|
3703
|
+
"type": "SEQ",
|
|
3704
|
+
"members": [
|
|
3705
|
+
{
|
|
3706
|
+
"type": "STRING",
|
|
3707
|
+
"value": "entry"
|
|
3708
|
+
},
|
|
3709
|
+
{
|
|
3710
|
+
"type": "FIELD",
|
|
3711
|
+
"name": "entry_body",
|
|
3712
|
+
"content": {
|
|
3713
|
+
"type": "SYMBOL",
|
|
3714
|
+
"name": "block"
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
]
|
|
3718
|
+
},
|
|
3719
|
+
{
|
|
3720
|
+
"type": "SEQ",
|
|
3721
|
+
"members": [
|
|
3722
|
+
{
|
|
3723
|
+
"type": "STRING",
|
|
3724
|
+
"value": "exit"
|
|
3725
|
+
},
|
|
3726
|
+
{
|
|
3727
|
+
"type": "FIELD",
|
|
3728
|
+
"name": "exit_body",
|
|
3729
|
+
"content": {
|
|
3730
|
+
"type": "SYMBOL",
|
|
3731
|
+
"name": "block"
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
]
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"type": "SYMBOL",
|
|
3738
|
+
"name": "machine_region"
|
|
3739
|
+
},
|
|
3740
|
+
{
|
|
3741
|
+
"type": "SYMBOL",
|
|
3742
|
+
"name": "machine_transition"
|
|
3743
|
+
}
|
|
3744
|
+
]
|
|
3745
|
+
}
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"type": "STRING",
|
|
3749
|
+
"value": "}"
|
|
3750
|
+
}
|
|
3751
|
+
]
|
|
3752
|
+
},
|
|
3753
|
+
"machine_region": {
|
|
3754
|
+
"type": "SEQ",
|
|
3755
|
+
"members": [
|
|
3756
|
+
{
|
|
3757
|
+
"type": "STRING",
|
|
3758
|
+
"value": "region"
|
|
3759
|
+
},
|
|
3760
|
+
{
|
|
3761
|
+
"type": "FIELD",
|
|
3762
|
+
"name": "name",
|
|
3680
3763
|
"content": {
|
|
3681
3764
|
"type": "SYMBOL",
|
|
3682
3765
|
"name": "identifier"
|
|
3683
3766
|
}
|
|
3684
3767
|
},
|
|
3768
|
+
{
|
|
3769
|
+
"type": "STRING",
|
|
3770
|
+
"value": "{"
|
|
3771
|
+
},
|
|
3772
|
+
{
|
|
3773
|
+
"type": "REPEAT",
|
|
3774
|
+
"content": {
|
|
3775
|
+
"type": "CHOICE",
|
|
3776
|
+
"members": [
|
|
3777
|
+
{
|
|
3778
|
+
"type": "SYMBOL",
|
|
3779
|
+
"name": "machine_composite_member"
|
|
3780
|
+
},
|
|
3781
|
+
{
|
|
3782
|
+
"type": "SYMBOL",
|
|
3783
|
+
"name": "machine_initial"
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
"type": "SYMBOL",
|
|
3787
|
+
"name": "machine_transition"
|
|
3788
|
+
}
|
|
3789
|
+
]
|
|
3790
|
+
}
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"type": "STRING",
|
|
3794
|
+
"value": "}"
|
|
3795
|
+
}
|
|
3796
|
+
]
|
|
3797
|
+
},
|
|
3798
|
+
"machine_initial": {
|
|
3799
|
+
"type": "SEQ",
|
|
3800
|
+
"members": [
|
|
3801
|
+
{
|
|
3802
|
+
"type": "STRING",
|
|
3803
|
+
"value": "initial"
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
"type": "FIELD",
|
|
3807
|
+
"name": "value",
|
|
3808
|
+
"content": {
|
|
3809
|
+
"type": "CHOICE",
|
|
3810
|
+
"members": [
|
|
3811
|
+
{
|
|
3812
|
+
"type": "SYMBOL",
|
|
3813
|
+
"name": "identifier"
|
|
3814
|
+
},
|
|
3815
|
+
{
|
|
3816
|
+
"type": "SYMBOL",
|
|
3817
|
+
"name": "struct_init"
|
|
3818
|
+
},
|
|
3819
|
+
{
|
|
3820
|
+
"type": "SYMBOL",
|
|
3821
|
+
"name": "generic_struct_init"
|
|
3822
|
+
},
|
|
3823
|
+
{
|
|
3824
|
+
"type": "SYMBOL",
|
|
3825
|
+
"name": "contextual_variant_expression"
|
|
3826
|
+
},
|
|
3827
|
+
{
|
|
3828
|
+
"type": "SYMBOL",
|
|
3829
|
+
"name": "contextual_variant_record_init"
|
|
3830
|
+
}
|
|
3831
|
+
]
|
|
3832
|
+
}
|
|
3833
|
+
},
|
|
3834
|
+
{
|
|
3835
|
+
"type": "STRING",
|
|
3836
|
+
"value": ";"
|
|
3837
|
+
}
|
|
3838
|
+
]
|
|
3839
|
+
},
|
|
3840
|
+
"machine_transition": {
|
|
3841
|
+
"type": "SEQ",
|
|
3842
|
+
"members": [
|
|
3685
3843
|
{
|
|
3686
3844
|
"type": "CHOICE",
|
|
3687
3845
|
"members": [
|
|
@@ -3690,57 +3848,105 @@
|
|
|
3690
3848
|
"members": [
|
|
3691
3849
|
{
|
|
3692
3850
|
"type": "STRING",
|
|
3693
|
-
"value": "
|
|
3851
|
+
"value": "on"
|
|
3694
3852
|
},
|
|
3695
3853
|
{
|
|
3696
|
-
"type": "
|
|
3697
|
-
"
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3854
|
+
"type": "CHOICE",
|
|
3855
|
+
"members": [
|
|
3856
|
+
{
|
|
3857
|
+
"type": "SEQ",
|
|
3858
|
+
"members": [
|
|
3859
|
+
{
|
|
3860
|
+
"type": "FIELD",
|
|
3861
|
+
"name": "event",
|
|
3862
|
+
"content": {
|
|
3863
|
+
"type": "SYMBOL",
|
|
3864
|
+
"name": "identifier"
|
|
3865
|
+
}
|
|
3866
|
+
},
|
|
3867
|
+
{
|
|
3868
|
+
"type": "CHOICE",
|
|
3709
3869
|
"members": [
|
|
3710
3870
|
{
|
|
3711
|
-
"type": "
|
|
3712
|
-
"
|
|
3871
|
+
"type": "SEQ",
|
|
3872
|
+
"members": [
|
|
3873
|
+
{
|
|
3874
|
+
"type": "STRING",
|
|
3875
|
+
"value": "{"
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
"type": "FIELD",
|
|
3879
|
+
"name": "payload_bindings",
|
|
3880
|
+
"content": {
|
|
3881
|
+
"type": "SEQ",
|
|
3882
|
+
"members": [
|
|
3883
|
+
{
|
|
3884
|
+
"type": "SYMBOL",
|
|
3885
|
+
"name": "identifier"
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"type": "REPEAT",
|
|
3889
|
+
"content": {
|
|
3890
|
+
"type": "SEQ",
|
|
3891
|
+
"members": [
|
|
3892
|
+
{
|
|
3893
|
+
"type": "STRING",
|
|
3894
|
+
"value": ","
|
|
3895
|
+
},
|
|
3896
|
+
{
|
|
3897
|
+
"type": "SYMBOL",
|
|
3898
|
+
"name": "identifier"
|
|
3899
|
+
}
|
|
3900
|
+
]
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
]
|
|
3904
|
+
}
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"type": "CHOICE",
|
|
3908
|
+
"members": [
|
|
3909
|
+
{
|
|
3910
|
+
"type": "STRING",
|
|
3911
|
+
"value": ","
|
|
3912
|
+
},
|
|
3913
|
+
{
|
|
3914
|
+
"type": "BLANK"
|
|
3915
|
+
}
|
|
3916
|
+
]
|
|
3917
|
+
},
|
|
3918
|
+
{
|
|
3919
|
+
"type": "STRING",
|
|
3920
|
+
"value": "}"
|
|
3921
|
+
}
|
|
3922
|
+
]
|
|
3713
3923
|
},
|
|
3714
3924
|
{
|
|
3715
|
-
"type": "
|
|
3716
|
-
"name": "identifier"
|
|
3925
|
+
"type": "BLANK"
|
|
3717
3926
|
}
|
|
3718
3927
|
]
|
|
3719
3928
|
}
|
|
3720
|
-
|
|
3721
|
-
]
|
|
3722
|
-
}
|
|
3723
|
-
},
|
|
3724
|
-
{
|
|
3725
|
-
"type": "CHOICE",
|
|
3726
|
-
"members": [
|
|
3727
|
-
{
|
|
3728
|
-
"type": "STRING",
|
|
3729
|
-
"value": ","
|
|
3929
|
+
]
|
|
3730
3930
|
},
|
|
3731
3931
|
{
|
|
3732
|
-
"type": "
|
|
3932
|
+
"type": "FIELD",
|
|
3933
|
+
"name": "trigger",
|
|
3934
|
+
"content": {
|
|
3935
|
+
"type": "STRING",
|
|
3936
|
+
"value": "completion"
|
|
3937
|
+
}
|
|
3733
3938
|
}
|
|
3734
3939
|
]
|
|
3735
|
-
},
|
|
3736
|
-
{
|
|
3737
|
-
"type": "STRING",
|
|
3738
|
-
"value": "}"
|
|
3739
3940
|
}
|
|
3740
3941
|
]
|
|
3741
3942
|
},
|
|
3742
3943
|
{
|
|
3743
|
-
"type": "
|
|
3944
|
+
"type": "FIELD",
|
|
3945
|
+
"name": "trigger",
|
|
3946
|
+
"content": {
|
|
3947
|
+
"type": "STRING",
|
|
3948
|
+
"value": "always"
|
|
3949
|
+
}
|
|
3744
3950
|
}
|
|
3745
3951
|
]
|
|
3746
3952
|
},
|
|
@@ -3836,8 +4042,51 @@
|
|
|
3836
4042
|
"type": "CHOICE",
|
|
3837
4043
|
"members": [
|
|
3838
4044
|
{
|
|
3839
|
-
"type": "
|
|
3840
|
-
"
|
|
4045
|
+
"type": "CHOICE",
|
|
4046
|
+
"members": [
|
|
4047
|
+
{
|
|
4048
|
+
"type": "SEQ",
|
|
4049
|
+
"members": [
|
|
4050
|
+
{
|
|
4051
|
+
"type": "STRING",
|
|
4052
|
+
"value": "reenter"
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
"type": "CHOICE",
|
|
4056
|
+
"members": [
|
|
4057
|
+
{
|
|
4058
|
+
"type": "STRING",
|
|
4059
|
+
"value": "history"
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
"type": "BLANK"
|
|
4063
|
+
}
|
|
4064
|
+
]
|
|
4065
|
+
}
|
|
4066
|
+
]
|
|
4067
|
+
},
|
|
4068
|
+
{
|
|
4069
|
+
"type": "SEQ",
|
|
4070
|
+
"members": [
|
|
4071
|
+
{
|
|
4072
|
+
"type": "STRING",
|
|
4073
|
+
"value": "history"
|
|
4074
|
+
},
|
|
4075
|
+
{
|
|
4076
|
+
"type": "CHOICE",
|
|
4077
|
+
"members": [
|
|
4078
|
+
{
|
|
4079
|
+
"type": "STRING",
|
|
4080
|
+
"value": "reenter"
|
|
4081
|
+
},
|
|
4082
|
+
{
|
|
4083
|
+
"type": "BLANK"
|
|
4084
|
+
}
|
|
4085
|
+
]
|
|
4086
|
+
}
|
|
4087
|
+
]
|
|
4088
|
+
}
|
|
4089
|
+
]
|
|
3841
4090
|
},
|
|
3842
4091
|
{
|
|
3843
4092
|
"type": "BLANK"
|
|
@@ -4715,6 +4964,10 @@
|
|
|
4715
4964
|
{
|
|
4716
4965
|
"type": "STRING",
|
|
4717
4966
|
"value": "instant"
|
|
4967
|
+
},
|
|
4968
|
+
{
|
|
4969
|
+
"type": "STRING",
|
|
4970
|
+
"value": "timestamp"
|
|
4718
4971
|
}
|
|
4719
4972
|
]
|
|
4720
4973
|
},
|