tree-sitter-bynk 0.243.0 → 0.245.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 +17 -0
- package/package.json +1 -1
- package/src/grammar.json +62 -0
- package/src/node-types.json +38 -0
- package/src/parser.c +33416 -33236
package/grammar.js
CHANGED
|
@@ -757,6 +757,7 @@ module.exports = grammar({
|
|
|
757
757
|
field("event_type", $._type_ref),
|
|
758
758
|
optional(field("pattern", $.event_pattern)),
|
|
759
759
|
")",
|
|
760
|
+
optional(field("schema_dispatch", $.schema_dispatch_clause)),
|
|
760
761
|
),
|
|
761
762
|
),
|
|
762
763
|
),
|
|
@@ -773,6 +774,22 @@ module.exports = grammar({
|
|
|
773
774
|
"..",
|
|
774
775
|
"}",
|
|
775
776
|
),
|
|
777
|
+
// Events track, slice 4 (spine #936): dispatch by the envelope's
|
|
778
|
+
// `schemaVersion`, parallel to the payload pattern above but written
|
|
779
|
+
// after the closing `)` (matching the design notes' own form) rather
|
|
780
|
+
// than nested inside it. Nested inside the `Events` choice arm, not a
|
|
781
|
+
// free-standing clause any protocol could carry — `via` on `http`/
|
|
782
|
+
// `cron`/`queue`/`websocket` is a syntax error, not a checker
|
|
783
|
+
// diagnostic. Literal only (v1 of this clause); a range pattern
|
|
784
|
+
// (`via schema(2..)`) is unbuilt grammar, left to a future slice.
|
|
785
|
+
schema_dispatch_clause: ($) =>
|
|
786
|
+
seq(
|
|
787
|
+
"via",
|
|
788
|
+
"schema",
|
|
789
|
+
"(",
|
|
790
|
+
field("version", seq(optional("-"), $.number_literal)),
|
|
791
|
+
")",
|
|
792
|
+
),
|
|
776
793
|
event_pattern_field: ($) =>
|
|
777
794
|
seq(
|
|
778
795
|
field("name", $.identifier),
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -3261,6 +3261,22 @@
|
|
|
3261
3261
|
{
|
|
3262
3262
|
"type": "STRING",
|
|
3263
3263
|
"value": ")"
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"type": "CHOICE",
|
|
3267
|
+
"members": [
|
|
3268
|
+
{
|
|
3269
|
+
"type": "FIELD",
|
|
3270
|
+
"name": "schema_dispatch",
|
|
3271
|
+
"content": {
|
|
3272
|
+
"type": "SYMBOL",
|
|
3273
|
+
"name": "schema_dispatch_clause"
|
|
3274
|
+
}
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
"type": "BLANK"
|
|
3278
|
+
}
|
|
3279
|
+
]
|
|
3264
3280
|
}
|
|
3265
3281
|
]
|
|
3266
3282
|
}
|
|
@@ -3305,6 +3321,52 @@
|
|
|
3305
3321
|
}
|
|
3306
3322
|
]
|
|
3307
3323
|
},
|
|
3324
|
+
"schema_dispatch_clause": {
|
|
3325
|
+
"type": "SEQ",
|
|
3326
|
+
"members": [
|
|
3327
|
+
{
|
|
3328
|
+
"type": "STRING",
|
|
3329
|
+
"value": "via"
|
|
3330
|
+
},
|
|
3331
|
+
{
|
|
3332
|
+
"type": "STRING",
|
|
3333
|
+
"value": "schema"
|
|
3334
|
+
},
|
|
3335
|
+
{
|
|
3336
|
+
"type": "STRING",
|
|
3337
|
+
"value": "("
|
|
3338
|
+
},
|
|
3339
|
+
{
|
|
3340
|
+
"type": "FIELD",
|
|
3341
|
+
"name": "version",
|
|
3342
|
+
"content": {
|
|
3343
|
+
"type": "SEQ",
|
|
3344
|
+
"members": [
|
|
3345
|
+
{
|
|
3346
|
+
"type": "CHOICE",
|
|
3347
|
+
"members": [
|
|
3348
|
+
{
|
|
3349
|
+
"type": "STRING",
|
|
3350
|
+
"value": "-"
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
"type": "BLANK"
|
|
3354
|
+
}
|
|
3355
|
+
]
|
|
3356
|
+
},
|
|
3357
|
+
{
|
|
3358
|
+
"type": "SYMBOL",
|
|
3359
|
+
"name": "number_literal"
|
|
3360
|
+
}
|
|
3361
|
+
]
|
|
3362
|
+
}
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
"type": "STRING",
|
|
3366
|
+
"value": ")"
|
|
3367
|
+
}
|
|
3368
|
+
]
|
|
3369
|
+
},
|
|
3308
3370
|
"event_pattern_field": {
|
|
3309
3371
|
"type": "SEQ",
|
|
3310
3372
|
"members": [
|
package/src/node-types.json
CHANGED
|
@@ -8062,6 +8062,26 @@
|
|
|
8062
8062
|
}
|
|
8063
8063
|
}
|
|
8064
8064
|
},
|
|
8065
|
+
{
|
|
8066
|
+
"type": "schema_dispatch_clause",
|
|
8067
|
+
"named": true,
|
|
8068
|
+
"fields": {
|
|
8069
|
+
"version": {
|
|
8070
|
+
"multiple": true,
|
|
8071
|
+
"required": true,
|
|
8072
|
+
"types": [
|
|
8073
|
+
{
|
|
8074
|
+
"type": "-",
|
|
8075
|
+
"named": false
|
|
8076
|
+
},
|
|
8077
|
+
{
|
|
8078
|
+
"type": "number_literal",
|
|
8079
|
+
"named": true
|
|
8080
|
+
}
|
|
8081
|
+
]
|
|
8082
|
+
}
|
|
8083
|
+
}
|
|
8084
|
+
},
|
|
8065
8085
|
{
|
|
8066
8086
|
"type": "scheme",
|
|
8067
8087
|
"named": true,
|
|
@@ -8494,6 +8514,16 @@
|
|
|
8494
8514
|
"named": true
|
|
8495
8515
|
}
|
|
8496
8516
|
]
|
|
8517
|
+
},
|
|
8518
|
+
"schema_dispatch": {
|
|
8519
|
+
"multiple": false,
|
|
8520
|
+
"required": false,
|
|
8521
|
+
"types": [
|
|
8522
|
+
{
|
|
8523
|
+
"type": "schema_dispatch_clause",
|
|
8524
|
+
"named": true
|
|
8525
|
+
}
|
|
8526
|
+
]
|
|
8497
8527
|
}
|
|
8498
8528
|
}
|
|
8499
8529
|
},
|
|
@@ -11351,6 +11381,10 @@
|
|
|
11351
11381
|
"type": "schedule",
|
|
11352
11382
|
"named": false
|
|
11353
11383
|
},
|
|
11384
|
+
{
|
|
11385
|
+
"type": "schema",
|
|
11386
|
+
"named": false
|
|
11387
|
+
},
|
|
11354
11388
|
{
|
|
11355
11389
|
"type": "security",
|
|
11356
11390
|
"named": false
|
|
@@ -11415,6 +11449,10 @@
|
|
|
11415
11449
|
"type": "validation_error_type",
|
|
11416
11450
|
"named": true
|
|
11417
11451
|
},
|
|
11452
|
+
{
|
|
11453
|
+
"type": "via",
|
|
11454
|
+
"named": false
|
|
11455
|
+
},
|
|
11418
11456
|
{
|
|
11419
11457
|
"type": "websocket",
|
|
11420
11458
|
"named": false
|