@acristoffers/tree-sitter-matlab 1.2.4 → 1.2.13

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/src/grammar.json CHANGED
@@ -3,38 +3,50 @@
3
3
  "name": "matlab",
4
4
  "rules": {
5
5
  "source_file": {
6
- "type": "CHOICE",
6
+ "type": "SEQ",
7
7
  "members": [
8
+ {
9
+ "type": "REPEAT",
10
+ "content": {
11
+ "type": "SYMBOL",
12
+ "name": "_end_of_line"
13
+ }
14
+ },
8
15
  {
9
16
  "type": "CHOICE",
10
17
  "members": [
11
18
  {
12
- "type": "SEQ",
19
+ "type": "CHOICE",
13
20
  "members": [
14
21
  {
15
- "type": "SYMBOL",
16
- "name": "_block"
22
+ "type": "SEQ",
23
+ "members": [
24
+ {
25
+ "type": "SYMBOL",
26
+ "name": "_block"
27
+ },
28
+ {
29
+ "type": "REPEAT",
30
+ "content": {
31
+ "type": "SYMBOL",
32
+ "name": "function_definition"
33
+ }
34
+ }
35
+ ]
17
36
  },
18
37
  {
19
- "type": "REPEAT",
20
- "content": {
21
- "type": "SYMBOL",
22
- "name": "function_definition"
23
- }
38
+ "type": "BLANK"
24
39
  }
25
40
  ]
26
41
  },
27
42
  {
28
- "type": "BLANK"
43
+ "type": "REPEAT1",
44
+ "content": {
45
+ "type": "SYMBOL",
46
+ "name": "function_definition"
47
+ }
29
48
  }
30
49
  ]
31
- },
32
- {
33
- "type": "REPEAT1",
34
- "content": {
35
- "type": "SYMBOL",
36
- "name": "function_definition"
37
- }
38
50
  }
39
51
  ]
40
52
  },
@@ -886,6 +898,10 @@
886
898
  {
887
899
  "type": "SYMBOL",
888
900
  "name": "unary_operator"
901
+ },
902
+ {
903
+ "type": "SYMBOL",
904
+ "name": "not_operator"
889
905
  }
890
906
  ]
891
907
  },
@@ -980,8 +996,65 @@
980
996
  "value": "~"
981
997
  },
982
998
  {
983
- "type": "SYMBOL",
984
- "name": "_expression"
999
+ "type": "CHOICE",
1000
+ "members": [
1001
+ {
1002
+ "type": "SYMBOL",
1003
+ "name": "cell"
1004
+ },
1005
+ {
1006
+ "type": "SYMBOL",
1007
+ "name": "function_call"
1008
+ },
1009
+ {
1010
+ "type": "SYMBOL",
1011
+ "name": "handle_operator"
1012
+ },
1013
+ {
1014
+ "type": "SYMBOL",
1015
+ "name": "identifier"
1016
+ },
1017
+ {
1018
+ "type": "SYMBOL",
1019
+ "name": "matrix"
1020
+ },
1021
+ {
1022
+ "type": "SYMBOL",
1023
+ "name": "metaclass_operator"
1024
+ },
1025
+ {
1026
+ "type": "SYMBOL",
1027
+ "name": "not_operator"
1028
+ },
1029
+ {
1030
+ "type": "SYMBOL",
1031
+ "name": "number"
1032
+ },
1033
+ {
1034
+ "type": "SYMBOL",
1035
+ "name": "parenthesis"
1036
+ },
1037
+ {
1038
+ "type": "SYMBOL",
1039
+ "name": "postfix_operator"
1040
+ },
1041
+ {
1042
+ "type": "SYMBOL",
1043
+ "name": "range"
1044
+ },
1045
+ {
1046
+ "type": "SYMBOL",
1047
+ "name": "string"
1048
+ },
1049
+ {
1050
+ "type": "SYMBOL",
1051
+ "name": "unary_operator"
1052
+ },
1053
+ {
1054
+ "type": "SYMBOL",
1055
+ "name": "field_expression"
1056
+ }
1057
+ ]
985
1058
  }
986
1059
  ]
987
1060
  }
@@ -1430,8 +1503,17 @@
1430
1503
  {
1431
1504
  "type": "REPEAT",
1432
1505
  "content": {
1433
- "type": "STRING",
1434
- "value": "\n"
1506
+ "type": "CHOICE",
1507
+ "members": [
1508
+ {
1509
+ "type": "PATTERN",
1510
+ "value": "[,]*;[ ,;]*"
1511
+ },
1512
+ {
1513
+ "type": "PATTERN",
1514
+ "value": "[\\r\\n]"
1515
+ }
1516
+ ]
1435
1517
  }
1436
1518
  },
1437
1519
  {
@@ -1453,8 +1535,8 @@
1453
1535
  "type": "CHOICE",
1454
1536
  "members": [
1455
1537
  {
1456
- "type": "STRING",
1457
- "value": ";"
1538
+ "type": "PATTERN",
1539
+ "value": "[,]*;[ ,;]*"
1458
1540
  },
1459
1541
  {
1460
1542
  "type": "PATTERN",
@@ -1500,8 +1582,17 @@
1500
1582
  {
1501
1583
  "type": "REPEAT",
1502
1584
  "content": {
1503
- "type": "STRING",
1504
- "value": "\n"
1585
+ "type": "CHOICE",
1586
+ "members": [
1587
+ {
1588
+ "type": "PATTERN",
1589
+ "value": "[,]*;[ ,;]*"
1590
+ },
1591
+ {
1592
+ "type": "PATTERN",
1593
+ "value": "[\\r\\n]"
1594
+ }
1595
+ ]
1505
1596
  }
1506
1597
  },
1507
1598
  {
@@ -1523,8 +1614,8 @@
1523
1614
  "type": "CHOICE",
1524
1615
  "members": [
1525
1616
  {
1526
- "type": "STRING",
1527
- "value": ";"
1617
+ "type": "PATTERN",
1618
+ "value": "[,]*;[ ,;]*"
1528
1619
  },
1529
1620
  {
1530
1621
  "type": "PATTERN",
@@ -2077,12 +2168,22 @@
2077
2168
  "type": "CHOICE",
2078
2169
  "members": [
2079
2170
  {
2080
- "type": "STRING",
2081
- "value": ".'"
2171
+ "type": "ALIAS",
2172
+ "content": {
2173
+ "type": "SYMBOL",
2174
+ "name": "_transpose"
2175
+ },
2176
+ "named": false,
2177
+ "value": "'"
2082
2178
  },
2083
2179
  {
2084
- "type": "STRING",
2085
- "value": "'"
2180
+ "type": "ALIAS",
2181
+ "content": {
2182
+ "type": "SYMBOL",
2183
+ "name": "_ctranspose"
2184
+ },
2185
+ "named": false,
2186
+ "value": ".'"
2086
2187
  }
2087
2188
  ]
2088
2189
  }
@@ -2420,6 +2521,10 @@
2420
2521
  "type": "SYMBOL",
2421
2522
  "name": "function_call"
2422
2523
  },
2524
+ {
2525
+ "type": "SYMBOL",
2526
+ "name": "handle_operator"
2527
+ },
2423
2528
  {
2424
2529
  "type": "SYMBOL",
2425
2530
  "name": "identifier"
@@ -2428,6 +2533,10 @@
2428
2533
  "type": "SYMBOL",
2429
2534
  "name": "cell"
2430
2535
  },
2536
+ {
2537
+ "type": "SYMBOL",
2538
+ "name": "lambda"
2539
+ },
2431
2540
  {
2432
2541
  "type": "ALIAS",
2433
2542
  "content": {
@@ -2437,6 +2546,10 @@
2437
2546
  "named": true,
2438
2547
  "value": "matrix"
2439
2548
  },
2549
+ {
2550
+ "type": "SYMBOL",
2551
+ "name": "metaclass_operator"
2552
+ },
2440
2553
  {
2441
2554
  "type": "ALIAS",
2442
2555
  "content": {
@@ -3042,25 +3155,8 @@
3042
3155
  "name": "spread_operator"
3043
3156
  },
3044
3157
  {
3045
- "type": "CHOICE",
3046
- "members": [
3047
- {
3048
- "type": "PREC_DYNAMIC",
3049
- "value": 1,
3050
- "content": {
3051
- "type": "SYMBOL",
3052
- "name": "_index_expression"
3053
- }
3054
- },
3055
- {
3056
- "type": "PREC_DYNAMIC",
3057
- "value": -1,
3058
- "content": {
3059
- "type": "SYMBOL",
3060
- "name": "_expression"
3061
- }
3062
- }
3063
- ]
3158
+ "type": "SYMBOL",
3159
+ "name": "_index_expression"
3064
3160
  }
3065
3161
  ]
3066
3162
  },
@@ -3852,6 +3948,10 @@
3852
3948
  "type": "SYMBOL",
3853
3949
  "name": "identifier"
3854
3950
  },
3951
+ {
3952
+ "type": "SYMBOL",
3953
+ "name": "field_expression"
3954
+ },
3855
3955
  {
3856
3956
  "type": "SYMBOL",
3857
3957
  "name": "function_call"
@@ -4377,27 +4477,27 @@
4377
4477
  {
4378
4478
  "type": "REPEAT",
4379
4479
  "content": {
4380
- "type": "CHOICE",
4480
+ "type": "SEQ",
4381
4481
  "members": [
4382
4482
  {
4383
- "type": "SYMBOL",
4384
- "name": "property"
4385
- },
4386
- {
4387
- "type": "SEQ",
4483
+ "type": "CHOICE",
4388
4484
  "members": [
4389
4485
  {
4390
4486
  "type": "SYMBOL",
4391
- "name": "class_property"
4487
+ "name": "property"
4392
4488
  },
4393
4489
  {
4394
- "type": "REPEAT1",
4395
- "content": {
4396
- "type": "SYMBOL",
4397
- "name": "_end_of_line"
4398
- }
4490
+ "type": "SYMBOL",
4491
+ "name": "class_property"
4399
4492
  }
4400
4493
  ]
4494
+ },
4495
+ {
4496
+ "type": "REPEAT1",
4497
+ "content": {
4498
+ "type": "SYMBOL",
4499
+ "name": "_end_of_line"
4500
+ }
4401
4501
  }
4402
4502
  ]
4403
4503
  }
@@ -4473,7 +4573,7 @@
4473
4573
  ]
4474
4574
  },
4475
4575
  "function_definition": {
4476
- "type": "PREC_RIGHT",
4576
+ "type": "PREC_DYNAMIC",
4477
4577
  "value": 0,
4478
4578
  "content": {
4479
4579
  "type": "SEQ",
@@ -4560,22 +4660,45 @@
4560
4660
  {
4561
4661
  "type": "REPEAT",
4562
4662
  "content": {
4563
- "type": "SYMBOL",
4564
- "name": "arguments_statement"
4565
- }
4566
- },
4567
- {
4568
- "type": "REPEAT",
4569
- "content": {
4570
- "type": "SYMBOL",
4571
- "name": "comment"
4663
+ "type": "SEQ",
4664
+ "members": [
4665
+ {
4666
+ "type": "REPEAT",
4667
+ "content": {
4668
+ "type": "CHOICE",
4669
+ "members": [
4670
+ {
4671
+ "type": "SYMBOL",
4672
+ "name": "comment"
4673
+ },
4674
+ {
4675
+ "type": "SYMBOL",
4676
+ "name": "_end_of_line"
4677
+ }
4678
+ ]
4679
+ }
4680
+ },
4681
+ {
4682
+ "type": "SYMBOL",
4683
+ "name": "arguments_statement"
4684
+ }
4685
+ ]
4572
4686
  }
4573
4687
  },
4574
4688
  {
4575
4689
  "type": "REPEAT",
4576
4690
  "content": {
4577
- "type": "SYMBOL",
4578
- "name": "_end_of_line"
4691
+ "type": "CHOICE",
4692
+ "members": [
4693
+ {
4694
+ "type": "SYMBOL",
4695
+ "name": "comment"
4696
+ },
4697
+ {
4698
+ "type": "SYMBOL",
4699
+ "name": "_end_of_line"
4700
+ }
4701
+ ]
4579
4702
  }
4580
4703
  },
4581
4704
  {
@@ -4637,8 +4760,8 @@
4637
4760
  }
4638
4761
  },
4639
4762
  "_function_definition_with_end": {
4640
- "type": "PREC_RIGHT",
4641
- "value": 0,
4763
+ "type": "PREC_DYNAMIC",
4764
+ "value": 1,
4642
4765
  "content": {
4643
4766
  "type": "SEQ",
4644
4767
  "members": [
@@ -4717,37 +4840,73 @@
4717
4840
  }
4718
4841
  ]
4719
4842
  },
4720
- {
4721
- "type": "SYMBOL",
4722
- "name": "_end_of_line"
4723
- },
4724
- {
4725
- "type": "REPEAT",
4726
- "content": {
4727
- "type": "SYMBOL",
4728
- "name": "arguments_statement"
4729
- }
4730
- },
4731
- {
4732
- "type": "REPEAT",
4733
- "content": {
4734
- "type": "SYMBOL",
4735
- "name": "comment"
4736
- }
4737
- },
4738
- {
4739
- "type": "REPEAT",
4740
- "content": {
4741
- "type": "SYMBOL",
4742
- "name": "_end_of_line"
4743
- }
4744
- },
4745
4843
  {
4746
4844
  "type": "CHOICE",
4747
4845
  "members": [
4748
4846
  {
4749
- "type": "SYMBOL",
4750
- "name": "block"
4847
+ "type": "SEQ",
4848
+ "members": [
4849
+ {
4850
+ "type": "SYMBOL",
4851
+ "name": "_end_of_line"
4852
+ },
4853
+ {
4854
+ "type": "REPEAT",
4855
+ "content": {
4856
+ "type": "SEQ",
4857
+ "members": [
4858
+ {
4859
+ "type": "REPEAT",
4860
+ "content": {
4861
+ "type": "CHOICE",
4862
+ "members": [
4863
+ {
4864
+ "type": "SYMBOL",
4865
+ "name": "comment"
4866
+ },
4867
+ {
4868
+ "type": "SYMBOL",
4869
+ "name": "_end_of_line"
4870
+ }
4871
+ ]
4872
+ }
4873
+ },
4874
+ {
4875
+ "type": "SYMBOL",
4876
+ "name": "arguments_statement"
4877
+ }
4878
+ ]
4879
+ }
4880
+ },
4881
+ {
4882
+ "type": "REPEAT",
4883
+ "content": {
4884
+ "type": "CHOICE",
4885
+ "members": [
4886
+ {
4887
+ "type": "SYMBOL",
4888
+ "name": "comment"
4889
+ },
4890
+ {
4891
+ "type": "SYMBOL",
4892
+ "name": "_end_of_line"
4893
+ }
4894
+ ]
4895
+ }
4896
+ },
4897
+ {
4898
+ "type": "CHOICE",
4899
+ "members": [
4900
+ {
4901
+ "type": "SYMBOL",
4902
+ "name": "block"
4903
+ },
4904
+ {
4905
+ "type": "BLANK"
4906
+ }
4907
+ ]
4908
+ }
4909
+ ]
4751
4910
  },
4752
4911
  {
4753
4912
  "type": "BLANK"
@@ -4782,31 +4941,58 @@
4782
4941
  ]
4783
4942
  }
4784
4943
  },
4785
- "attribute": {
4944
+ "_negated_attribute": {
4786
4945
  "type": "SEQ",
4787
4946
  "members": [
4947
+ {
4948
+ "type": "STRING",
4949
+ "value": "~"
4950
+ },
4788
4951
  {
4789
4952
  "type": "SYMBOL",
4790
4953
  "name": "identifier"
4954
+ }
4955
+ ]
4956
+ },
4957
+ "attribute": {
4958
+ "type": "CHOICE",
4959
+ "members": [
4960
+ {
4961
+ "type": "ALIAS",
4962
+ "content": {
4963
+ "type": "SYMBOL",
4964
+ "name": "_negated_attribute"
4965
+ },
4966
+ "named": true,
4967
+ "value": "not_operator"
4791
4968
  },
4792
4969
  {
4793
- "type": "CHOICE",
4970
+ "type": "SEQ",
4794
4971
  "members": [
4795
4972
  {
4796
- "type": "SEQ",
4973
+ "type": "SYMBOL",
4974
+ "name": "identifier"
4975
+ },
4976
+ {
4977
+ "type": "CHOICE",
4797
4978
  "members": [
4798
4979
  {
4799
- "type": "STRING",
4800
- "value": "="
4980
+ "type": "SEQ",
4981
+ "members": [
4982
+ {
4983
+ "type": "STRING",
4984
+ "value": "="
4985
+ },
4986
+ {
4987
+ "type": "SYMBOL",
4988
+ "name": "_expression"
4989
+ }
4990
+ ]
4801
4991
  },
4802
4992
  {
4803
- "type": "SYMBOL",
4804
- "name": "_expression"
4993
+ "type": "BLANK"
4805
4994
  }
4806
4995
  ]
4807
- },
4808
- {
4809
- "type": "BLANK"
4810
4996
  }
4811
4997
  ]
4812
4998
  }
@@ -5012,101 +5198,67 @@
5012
5198
  },
5013
5199
  "property_name": {
5014
5200
  "type": "PREC_RIGHT",
5015
- "value": 0,
5201
+ "value": -1,
5016
5202
  "content": {
5017
- "type": "PREC_DYNAMIC",
5018
- "value": -1,
5019
- "content": {
5020
- "type": "SEQ",
5021
- "members": [
5022
- {
5023
- "type": "SYMBOL",
5024
- "name": "identifier"
5025
- },
5026
- {
5027
- "type": "REPEAT",
5028
- "content": {
5029
- "type": "SEQ",
5030
- "members": [
5031
- {
5032
- "type": "STRING",
5033
- "value": "."
5034
- },
5035
- {
5036
- "type": "SYMBOL",
5037
- "name": "identifier"
5038
- }
5039
- ]
5040
- }
5041
- },
5042
- {
5043
- "type": "CHOICE",
5203
+ "type": "SEQ",
5204
+ "members": [
5205
+ {
5206
+ "type": "SYMBOL",
5207
+ "name": "identifier"
5208
+ },
5209
+ {
5210
+ "type": "REPEAT",
5211
+ "content": {
5212
+ "type": "SEQ",
5044
5213
  "members": [
5045
5214
  {
5046
- "type": "SEQ",
5047
- "members": [
5048
- {
5049
- "type": "STRING",
5050
- "value": "."
5051
- },
5052
- {
5053
- "type": "STRING",
5054
- "value": "*"
5055
- }
5056
- ]
5215
+ "type": "STRING",
5216
+ "value": "."
5057
5217
  },
5058
5218
  {
5059
- "type": "BLANK"
5219
+ "type": "SYMBOL",
5220
+ "name": "identifier"
5060
5221
  }
5061
5222
  ]
5062
5223
  }
5063
- ]
5064
- }
5065
- }
5066
- },
5067
- "property": {
5068
- "type": "CHOICE",
5069
- "members": [
5070
- {
5071
- "type": "SEQ",
5072
- "members": [
5073
- {
5074
- "type": "FIELD",
5075
- "name": "name",
5076
- "content": {
5077
- "type": "CHOICE",
5224
+ },
5225
+ {
5226
+ "type": "CHOICE",
5227
+ "members": [
5228
+ {
5229
+ "type": "SEQ",
5078
5230
  "members": [
5079
5231
  {
5080
- "type": "SYMBOL",
5081
- "name": "identifier"
5082
- },
5083
- {
5084
- "type": "SYMBOL",
5085
- "name": "property_name"
5232
+ "type": "STRING",
5233
+ "value": "."
5086
5234
  },
5087
5235
  {
5088
- "type": "SYMBOL",
5089
- "name": "ignored_argument"
5236
+ "type": "STRING",
5237
+ "value": "*"
5090
5238
  }
5091
5239
  ]
5240
+ },
5241
+ {
5242
+ "type": "BLANK"
5092
5243
  }
5093
- },
5094
- {
5095
- "type": "CHOICE",
5096
- "members": [
5097
- {
5098
- "type": "SYMBOL",
5099
- "name": "dimensions"
5100
- },
5101
- {
5102
- "type": "BLANK"
5103
- }
5104
- ]
5105
- },
5106
- {
5107
- "type": "CHOICE",
5108
- "members": [
5109
- {
5244
+ ]
5245
+ }
5246
+ ]
5247
+ }
5248
+ },
5249
+ "property": {
5250
+ "type": "PREC_RIGHT",
5251
+ "value": 0,
5252
+ "content": {
5253
+ "type": "CHOICE",
5254
+ "members": [
5255
+ {
5256
+ "type": "SEQ",
5257
+ "members": [
5258
+ {
5259
+ "type": "FIELD",
5260
+ "name": "name",
5261
+ "content": {
5110
5262
  "type": "CHOICE",
5111
5263
  "members": [
5112
5264
  {
@@ -5116,98 +5268,39 @@
5116
5268
  {
5117
5269
  "type": "SYMBOL",
5118
5270
  "name": "property_name"
5271
+ },
5272
+ {
5273
+ "type": "SYMBOL",
5274
+ "name": "ignored_argument"
5119
5275
  }
5120
5276
  ]
5121
- },
5122
- {
5123
- "type": "BLANK"
5124
- }
5125
- ]
5126
- },
5127
- {
5128
- "type": "CHOICE",
5129
- "members": [
5130
- {
5131
- "type": "SYMBOL",
5132
- "name": "validation_functions"
5133
- },
5134
- {
5135
- "type": "BLANK"
5136
5277
  }
5137
- ]
5138
- },
5139
- {
5140
- "type": "CHOICE",
5141
- "members": [
5142
- {
5143
- "type": "SYMBOL",
5144
- "name": "default_value"
5145
- },
5146
- {
5147
- "type": "BLANK"
5148
- }
5149
- ]
5150
- },
5151
- {
5152
- "type": "REPEAT1",
5153
- "content": {
5154
- "type": "SYMBOL",
5155
- "name": "_end_of_line"
5156
- }
5157
- }
5158
- ]
5159
- },
5160
- {
5161
- "type": "SEQ",
5162
- "members": [
5163
- {
5164
- "type": "FIELD",
5165
- "name": "name",
5166
- "content": {
5278
+ },
5279
+ {
5167
5280
  "type": "CHOICE",
5168
5281
  "members": [
5169
5282
  {
5170
5283
  "type": "SYMBOL",
5171
- "name": "identifier"
5284
+ "name": "dimensions"
5172
5285
  },
5173
5286
  {
5174
- "type": "SYMBOL",
5175
- "name": "property_name"
5176
- },
5177
- {
5178
- "type": "SYMBOL",
5179
- "name": "ignored_argument"
5287
+ "type": "BLANK"
5180
5288
  }
5181
5289
  ]
5182
- }
5183
- },
5184
- {
5185
- "type": "STRING",
5186
- "value": "@"
5187
- },
5188
- {
5189
- "type": "SYMBOL",
5190
- "name": "identifier"
5191
- },
5192
- {
5193
- "type": "ALIAS",
5194
- "content": {
5290
+ },
5291
+ {
5195
5292
  "type": "CHOICE",
5196
5293
  "members": [
5197
5294
  {
5198
5295
  "type": "CHOICE",
5199
5296
  "members": [
5200
5297
  {
5201
- "type": "STRING",
5202
- "value": "vector"
5203
- },
5204
- {
5205
- "type": "STRING",
5206
- "value": "matrix"
5298
+ "type": "SYMBOL",
5299
+ "name": "identifier"
5207
5300
  },
5208
5301
  {
5209
- "type": "STRING",
5210
- "value": "scalar"
5302
+ "type": "SYMBOL",
5303
+ "name": "property_name"
5211
5304
  }
5212
5305
  ]
5213
5306
  },
@@ -5216,31 +5309,110 @@
5216
5309
  }
5217
5310
  ]
5218
5311
  },
5219
- "named": true,
5220
- "value": "identifier"
5221
- },
5222
- {
5223
- "type": "CHOICE",
5224
- "members": [
5225
- {
5226
- "type": "SYMBOL",
5227
- "name": "default_value"
5228
- },
5229
- {
5230
- "type": "BLANK"
5312
+ {
5313
+ "type": "CHOICE",
5314
+ "members": [
5315
+ {
5316
+ "type": "SYMBOL",
5317
+ "name": "validation_functions"
5318
+ },
5319
+ {
5320
+ "type": "BLANK"
5321
+ }
5322
+ ]
5323
+ },
5324
+ {
5325
+ "type": "CHOICE",
5326
+ "members": [
5327
+ {
5328
+ "type": "SYMBOL",
5329
+ "name": "default_value"
5330
+ },
5331
+ {
5332
+ "type": "BLANK"
5333
+ }
5334
+ ]
5335
+ }
5336
+ ]
5337
+ },
5338
+ {
5339
+ "type": "SEQ",
5340
+ "members": [
5341
+ {
5342
+ "type": "FIELD",
5343
+ "name": "name",
5344
+ "content": {
5345
+ "type": "CHOICE",
5346
+ "members": [
5347
+ {
5348
+ "type": "SYMBOL",
5349
+ "name": "identifier"
5350
+ },
5351
+ {
5352
+ "type": "SYMBOL",
5353
+ "name": "property_name"
5354
+ },
5355
+ {
5356
+ "type": "SYMBOL",
5357
+ "name": "ignored_argument"
5358
+ }
5359
+ ]
5231
5360
  }
5232
- ]
5233
- },
5234
- {
5235
- "type": "REPEAT1",
5236
- "content": {
5361
+ },
5362
+ {
5363
+ "type": "STRING",
5364
+ "value": "@"
5365
+ },
5366
+ {
5237
5367
  "type": "SYMBOL",
5238
- "name": "_end_of_line"
5368
+ "name": "identifier"
5369
+ },
5370
+ {
5371
+ "type": "ALIAS",
5372
+ "content": {
5373
+ "type": "CHOICE",
5374
+ "members": [
5375
+ {
5376
+ "type": "CHOICE",
5377
+ "members": [
5378
+ {
5379
+ "type": "STRING",
5380
+ "value": "vector"
5381
+ },
5382
+ {
5383
+ "type": "STRING",
5384
+ "value": "matrix"
5385
+ },
5386
+ {
5387
+ "type": "STRING",
5388
+ "value": "scalar"
5389
+ }
5390
+ ]
5391
+ },
5392
+ {
5393
+ "type": "BLANK"
5394
+ }
5395
+ ]
5396
+ },
5397
+ "named": true,
5398
+ "value": "identifier"
5399
+ },
5400
+ {
5401
+ "type": "CHOICE",
5402
+ "members": [
5403
+ {
5404
+ "type": "SYMBOL",
5405
+ "name": "default_value"
5406
+ },
5407
+ {
5408
+ "type": "BLANK"
5409
+ }
5410
+ ]
5239
5411
  }
5240
- }
5241
- ]
5242
- }
5243
- ]
5412
+ ]
5413
+ }
5414
+ ]
5415
+ }
5244
5416
  },
5245
5417
  "properties": {
5246
5418
  "type": "SEQ",
@@ -5262,17 +5434,36 @@
5262
5434
  ]
5263
5435
  },
5264
5436
  {
5265
- "type": "REPEAT1",
5266
- "content": {
5267
- "type": "SYMBOL",
5268
- "name": "_end_of_line"
5269
- }
5437
+ "type": "SYMBOL",
5438
+ "name": "_end_of_line"
5270
5439
  },
5271
5440
  {
5272
5441
  "type": "REPEAT",
5273
5442
  "content": {
5274
- "type": "SYMBOL",
5275
- "name": "property"
5443
+ "type": "CHOICE",
5444
+ "members": [
5445
+ {
5446
+ "type": "SEQ",
5447
+ "members": [
5448
+ {
5449
+ "type": "SYMBOL",
5450
+ "name": "property"
5451
+ },
5452
+ {
5453
+ "type": "SYMBOL",
5454
+ "name": "_end_of_line"
5455
+ }
5456
+ ]
5457
+ },
5458
+ {
5459
+ "type": "SYMBOL",
5460
+ "name": "_end_of_line"
5461
+ },
5462
+ {
5463
+ "type": "SYMBOL",
5464
+ "name": "comment"
5465
+ }
5466
+ ]
5276
5467
  }
5277
5468
  },
5278
5469
  {
@@ -5381,7 +5572,7 @@
5381
5572
  ]
5382
5573
  },
5383
5574
  {
5384
- "type": "REPEAT1",
5575
+ "type": "REPEAT",
5385
5576
  "content": {
5386
5577
  "type": "SYMBOL",
5387
5578
  "name": "_end_of_line"
@@ -5395,6 +5586,10 @@
5395
5586
  {
5396
5587
  "type": "CHOICE",
5397
5588
  "members": [
5589
+ {
5590
+ "type": "SYMBOL",
5591
+ "name": "comment"
5592
+ },
5398
5593
  {
5399
5594
  "type": "ALIAS",
5400
5595
  "content": {
@@ -5501,6 +5696,10 @@
5501
5696
  {
5502
5697
  "type": "SYMBOL",
5503
5698
  "name": "_end_of_line"
5699
+ },
5700
+ {
5701
+ "type": "SYMBOL",
5702
+ "name": "comment"
5504
5703
  }
5505
5704
  ]
5506
5705
  }
@@ -5610,6 +5809,10 @@
5610
5809
  {
5611
5810
  "type": "SYMBOL",
5612
5811
  "name": "_end_of_line"
5812
+ },
5813
+ {
5814
+ "type": "SYMBOL",
5815
+ "name": "comment"
5613
5816
  }
5614
5817
  ]
5615
5818
  }
@@ -5685,8 +5888,12 @@
5685
5888
  "name": "enumeration"
5686
5889
  },
5687
5890
  {
5688
- "type": "STRING",
5689
- "value": ";"
5891
+ "type": "SYMBOL",
5892
+ "name": "_end_of_line"
5893
+ },
5894
+ {
5895
+ "type": "SYMBOL",
5896
+ "name": "comment"
5690
5897
  }
5691
5898
  ]
5692
5899
  }
@@ -5895,11 +6102,11 @@
5895
6102
  },
5896
6103
  {
5897
6104
  "type": "PATTERN",
5898
- "value": "0[xX][\\dA-Fa-f]+([su](8|16|32|64))?"
6105
+ "value": "0[xX][\\dA-Fa-f]+([suSU](8|16|32|64))?"
5899
6106
  },
5900
6107
  {
5901
6108
  "type": "PATTERN",
5902
- "value": "0[bB][01]+([su](8|16|32|64))?"
6109
+ "value": "0[bB][01]+([suSU](8|16|32|64))?"
5903
6110
  }
5904
6111
  ]
5905
6112
  },
@@ -6101,6 +6308,13 @@
6101
6308
  [
6102
6309
  "block",
6103
6310
  "_functionless_block"
6311
+ ],
6312
+ [
6313
+ "function_definition",
6314
+ "_function_definition_with_end"
6315
+ ],
6316
+ [
6317
+ "_function_definition_with_end"
6104
6318
  ]
6105
6319
  ],
6106
6320
  "precedences": [],