@hew-lang/tree-sitter-hew 1.2.1 → 1.2.2
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 +3 -3
- package/package.json +1 -1
- package/src/grammar.json +24 -0
- package/src/node-types.json +4 -0
- package/src/parser.c +76828 -76373
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -1391,7 +1391,7 @@ export default grammar({
|
|
|
1391
1391
|
)),
|
|
1392
1392
|
|
|
1393
1393
|
private_capture_list: $ => seq(
|
|
1394
|
-
'capture', '(', sep1($.private_capture, ','), ')',
|
|
1394
|
+
'capture', '(', sep1($.private_capture, ','), optional(','), ')',
|
|
1395
1395
|
),
|
|
1396
1396
|
|
|
1397
1397
|
private_capture: $ => seq('var', field('name', $.identifier)),
|
|
@@ -1401,11 +1401,11 @@ export default grammar({
|
|
|
1401
1401
|
optional(seq(':', field('type', $._type))),
|
|
1402
1402
|
),
|
|
1403
1403
|
|
|
1404
|
-
//
|
|
1405
|
-
// Replaces the removed `spawn (...) => ...` lambda-actor form.
|
|
1404
|
+
// Actor literals share the closure prefix for private mutable captures.
|
|
1406
1405
|
actor_expression: $ => prec(2, seq(
|
|
1407
1406
|
'actor',
|
|
1408
1407
|
optional('move'),
|
|
1408
|
+
optional($.private_capture_list),
|
|
1409
1409
|
'|',
|
|
1410
1410
|
optional(sep1($.lambda_parameter, ',')),
|
|
1411
1411
|
'|',
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -8794,6 +8794,18 @@
|
|
|
8794
8794
|
}
|
|
8795
8795
|
]
|
|
8796
8796
|
},
|
|
8797
|
+
{
|
|
8798
|
+
"type": "CHOICE",
|
|
8799
|
+
"members": [
|
|
8800
|
+
{
|
|
8801
|
+
"type": "STRING",
|
|
8802
|
+
"value": ","
|
|
8803
|
+
},
|
|
8804
|
+
{
|
|
8805
|
+
"type": "BLANK"
|
|
8806
|
+
}
|
|
8807
|
+
]
|
|
8808
|
+
},
|
|
8797
8809
|
{
|
|
8798
8810
|
"type": "STRING",
|
|
8799
8811
|
"value": ")"
|
|
@@ -8877,6 +8889,18 @@
|
|
|
8877
8889
|
}
|
|
8878
8890
|
]
|
|
8879
8891
|
},
|
|
8892
|
+
{
|
|
8893
|
+
"type": "CHOICE",
|
|
8894
|
+
"members": [
|
|
8895
|
+
{
|
|
8896
|
+
"type": "SYMBOL",
|
|
8897
|
+
"name": "private_capture_list"
|
|
8898
|
+
},
|
|
8899
|
+
{
|
|
8900
|
+
"type": "BLANK"
|
|
8901
|
+
}
|
|
8902
|
+
]
|
|
8903
|
+
},
|
|
8880
8904
|
{
|
|
8881
8905
|
"type": "STRING",
|
|
8882
8906
|
"value": "|"
|