tree-sitter-bynk 0.239.0 → 0.243.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 CHANGED
@@ -347,11 +347,16 @@ module.exports = grammar({
347
347
  // Events track, slice 0 (spine #936): `event Name = { fields }` — a
348
348
  // typed fact a context may emit and other contexts' subscriber services
349
349
  // may receive. Record body only (mirrors `record_type`, not the full
350
- // `_type_body` choice — no sum/opaque/refined event shapes).
350
+ // `_type_body` choice — no sum/opaque/refined event shapes). Slice 3b
351
+ // (#978) adds an optional `@schema(N)` annotation, reusing
352
+ // `store_annotation` (the same generic `@name(args)` shape `messages_decl`
353
+ // already reuses) rather than a new rule — the closed registry (today:
354
+ // `@schema` alone) is a checker concern, not a grammar one.
351
355
  event_decl: ($) =>
352
356
  seq(
353
357
  "event",
354
358
  field("name", $.identifier),
359
+ repeat(field("annotation", $.store_annotation)),
355
360
  "=",
356
361
  field("body", $.record_type),
357
362
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tree-sitter-bynk",
3
- "version": "0.239.0",
3
+ "version": "0.243.0",
4
4
  "description": "Tree-sitter grammar for the Bynk DSL (v0–v0.16).",
5
5
  "main": "bindings/node",
6
6
  "types": "bindings/node",
package/src/grammar.json CHANGED
@@ -1221,6 +1221,17 @@
1221
1221
  "name": "identifier"
1222
1222
  }
1223
1223
  },
1224
+ {
1225
+ "type": "REPEAT",
1226
+ "content": {
1227
+ "type": "FIELD",
1228
+ "name": "annotation",
1229
+ "content": {
1230
+ "type": "SYMBOL",
1231
+ "name": "store_annotation"
1232
+ }
1233
+ }
1234
+ },
1224
1235
  {
1225
1236
  "type": "STRING",
1226
1237
  "value": "="
@@ -3093,6 +3093,16 @@
3093
3093
  "type": "event_decl",
3094
3094
  "named": true,
3095
3095
  "fields": {
3096
+ "annotation": {
3097
+ "multiple": true,
3098
+ "required": false,
3099
+ "types": [
3100
+ {
3101
+ "type": "store_annotation",
3102
+ "named": true
3103
+ }
3104
+ ]
3105
+ },
3096
3106
  "body": {
3097
3107
  "multiple": false,
3098
3108
  "required": true,