tree-sitter-bynk 0.233.2 → 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 +4 -0
- package/package.json +1 -1
- package/src/grammar.json +54 -0
- package/src/node-types.json +10 -0
- package/src/parser.c +29213 -28312
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(","),
|
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": "("
|
package/src/node-types.json
CHANGED