tree-sitter-bynk 0.232.0 → 0.238.0
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 +13 -9
- package/package.json +1 -1
- package/src/grammar.json +55 -1
- package/src/node-types.json +11 -1
- package/src/parser.c +29196 -28291
package/grammar.js
CHANGED
|
@@ -573,6 +573,10 @@ module.exports = grammar({
|
|
|
573
573
|
seq(
|
|
574
574
|
"fn",
|
|
575
575
|
field("name", $.identifier),
|
|
576
|
+
// #926: optional `[T, …]` type parameters on the op itself — resolved
|
|
577
|
+
// only from an explicit type argument at the call site (mirroring
|
|
578
|
+
// `fn_decl`'s own `[A, B]` slot, `grammar.js:525`).
|
|
579
|
+
optional(seq("[", sep1(field("type_param", $.identifier), ","), "]")),
|
|
576
580
|
"(",
|
|
577
581
|
optional(sep1($.param, ",")),
|
|
578
582
|
optional(","),
|
|
@@ -581,19 +585,19 @@ module.exports = grammar({
|
|
|
581
585
|
field("return_type", $._type_ref),
|
|
582
586
|
),
|
|
583
587
|
|
|
584
|
-
// message-bundles track, slice 1 (#859): `messages <tag> @reference {
|
|
588
|
+
// message-bundles track, slice 1 (#859): `messages "<tag>" @reference {
|
|
585
589
|
// "code" => "template" ... }` — a commons item declaring one locale's
|
|
586
|
-
// message bundle. `tag` is a
|
|
587
|
-
// refinement is a checker concern
|
|
588
|
-
// (the same general `@name(args)`
|
|
589
|
-
// permissive on cardinality, same as
|
|
590
|
-
// (commons-only) is a checker concern too, so this
|
|
591
|
-
// `_context_body_item`/`_adapter_body_item` as well,
|
|
592
|
-
// `service_decl`/`agent_decl`'s existing permissive placement
|
|
590
|
+
// message bundle. `tag` is a `LocaleTag` string literal (#899, like an
|
|
591
|
+
// entry's `code`/`template`); its refinement is a checker concern.
|
|
592
|
+
// Annotations reuse `store_annotation` (the same general `@name(args)`
|
|
593
|
+
// shape, ADR 0111) — the parser stays permissive on cardinality, same as
|
|
594
|
+
// the Rust side. Legality (commons-only) is a checker concern too, so this
|
|
595
|
+
// rule is admitted in `_context_body_item`/`_adapter_body_item` as well,
|
|
596
|
+
// mirroring `service_decl`/`agent_decl`'s existing permissive placement.
|
|
593
597
|
messages_decl: ($) =>
|
|
594
598
|
seq(
|
|
595
599
|
"messages",
|
|
596
|
-
field("tag", $.
|
|
600
|
+
field("tag", $.string_literal),
|
|
597
601
|
repeat(field("annotation", $.store_annotation)),
|
|
598
602
|
"{",
|
|
599
603
|
repeat($.message_entry),
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -2373,6 +2373,60 @@
|
|
|
2373
2373
|
"name": "identifier"
|
|
2374
2374
|
}
|
|
2375
2375
|
},
|
|
2376
|
+
{
|
|
2377
|
+
"type": "CHOICE",
|
|
2378
|
+
"members": [
|
|
2379
|
+
{
|
|
2380
|
+
"type": "SEQ",
|
|
2381
|
+
"members": [
|
|
2382
|
+
{
|
|
2383
|
+
"type": "STRING",
|
|
2384
|
+
"value": "["
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"type": "SEQ",
|
|
2388
|
+
"members": [
|
|
2389
|
+
{
|
|
2390
|
+
"type": "FIELD",
|
|
2391
|
+
"name": "type_param",
|
|
2392
|
+
"content": {
|
|
2393
|
+
"type": "SYMBOL",
|
|
2394
|
+
"name": "identifier"
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"type": "REPEAT",
|
|
2399
|
+
"content": {
|
|
2400
|
+
"type": "SEQ",
|
|
2401
|
+
"members": [
|
|
2402
|
+
{
|
|
2403
|
+
"type": "STRING",
|
|
2404
|
+
"value": ","
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
"type": "FIELD",
|
|
2408
|
+
"name": "type_param",
|
|
2409
|
+
"content": {
|
|
2410
|
+
"type": "SYMBOL",
|
|
2411
|
+
"name": "identifier"
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
]
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
]
|
|
2418
|
+
},
|
|
2419
|
+
{
|
|
2420
|
+
"type": "STRING",
|
|
2421
|
+
"value": "]"
|
|
2422
|
+
}
|
|
2423
|
+
]
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"type": "BLANK"
|
|
2427
|
+
}
|
|
2428
|
+
]
|
|
2429
|
+
},
|
|
2376
2430
|
{
|
|
2377
2431
|
"type": "STRING",
|
|
2378
2432
|
"value": "("
|
|
@@ -2452,7 +2506,7 @@
|
|
|
2452
2506
|
"name": "tag",
|
|
2453
2507
|
"content": {
|
|
2454
2508
|
"type": "SYMBOL",
|
|
2455
|
-
"name": "
|
|
2509
|
+
"name": "string_literal"
|
|
2456
2510
|
}
|
|
2457
2511
|
},
|
|
2458
2512
|
{
|
package/src/node-types.json
CHANGED
|
@@ -1547,6 +1547,16 @@
|
|
|
1547
1547
|
"named": true
|
|
1548
1548
|
}
|
|
1549
1549
|
]
|
|
1550
|
+
},
|
|
1551
|
+
"type_param": {
|
|
1552
|
+
"multiple": true,
|
|
1553
|
+
"required": false,
|
|
1554
|
+
"types": [
|
|
1555
|
+
{
|
|
1556
|
+
"type": "identifier",
|
|
1557
|
+
"named": true
|
|
1558
|
+
}
|
|
1559
|
+
]
|
|
1550
1560
|
}
|
|
1551
1561
|
},
|
|
1552
1562
|
"children": {
|
|
@@ -5818,7 +5828,7 @@
|
|
|
5818
5828
|
"required": true,
|
|
5819
5829
|
"types": [
|
|
5820
5830
|
{
|
|
5821
|
-
"type": "
|
|
5831
|
+
"type": "string_literal",
|
|
5822
5832
|
"named": true
|
|
5823
5833
|
}
|
|
5824
5834
|
]
|