tree-sitter-bynk 0.562.0 → 0.603.10

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
@@ -818,6 +818,9 @@ module.exports = grammar({
818
818
  ")",
819
819
  "->",
820
820
  field("return_type", $._type_ref),
821
+ // #3458: internal `@name(arg)` annotations (a first-party typed read's
822
+ // failure policy); the checker refuses them outside the std library.
823
+ repeat(field("annotation", $.store_annotation)),
821
824
  ),
822
825
 
823
826
  // message-bundles track, slice 1 (#859): `messages "<tag>" @reference {
@@ -1361,7 +1364,8 @@ module.exports = grammar({
1361
1364
  // The closed, compiler-known scheme set. `None`/`Internal` are zero-crypto;
1362
1365
  // `Bearer` (JWT/HS256), `Signature` (HMAC over the body), and `Oidc`
1363
1366
  // (JWKS/RS256+ES256) are compiler-generated verifiers.
1364
- scheme: () => choice("None", "Internal", "Bearer", "Signature", "Oidc", "Foreign"),
1367
+ scheme: () =>
1368
+ choice("None", "Internal", "Bearer", "Signature", "Oidc", "Foreign", "SignedCookie"),
1365
1369
  // v0.51: the keyed-args scheme config — `(key = value, …)`. Values are
1366
1370
  // string or integer literals; the checker validates which keys each scheme
1367
1371
  // admits (Bearer: secret; Signature: secret/header/timestamp/tolerance).
@@ -1371,11 +1375,23 @@ module.exports = grammar({
1371
1375
  sep1($.scheme_arg, ","),
1372
1376
  ")",
1373
1377
  ),
1378
+ // #3386: `12.hours` in a scheme config.
1379
+ scheme_duration: ($) => seq($.number_literal, ".", $.identifier),
1374
1380
  scheme_arg: ($) =>
1375
1381
  seq(
1376
1382
  field("key", $.identifier),
1377
1383
  "=",
1378
- field("value", choice($.string_literal, $.number_literal)),
1384
+ field(
1385
+ "value",
1386
+ choice(
1387
+ $.string_literal,
1388
+ $.number_literal,
1389
+ // #3386: a duration (`ttl = 12.hours`) or a bare variant name
1390
+ // (`sameSite = Lax`).
1391
+ $.scheme_duration,
1392
+ $.identifier,
1393
+ ),
1394
+ ),
1379
1395
  ),
1380
1396
  // v0.45: the handler `by <binder>: <Actor>` clause — sits after the protocol
1381
1397
  // config and before the parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tree-sitter-bynk",
3
- "version": "0.562.0",
3
+ "version": "0.603.10",
4
4
  "description": "Tree-sitter grammar for the Bynk language.",
5
5
  "main": "bindings/node",
6
6
  "types": "bindings/node",
package/src/grammar.json CHANGED
@@ -3320,6 +3320,17 @@
3320
3320
  "type": "SYMBOL",
3321
3321
  "name": "_type_ref"
3322
3322
  }
3323
+ },
3324
+ {
3325
+ "type": "REPEAT",
3326
+ "content": {
3327
+ "type": "FIELD",
3328
+ "name": "annotation",
3329
+ "content": {
3330
+ "type": "SYMBOL",
3331
+ "name": "store_annotation"
3332
+ }
3333
+ }
3323
3334
  }
3324
3335
  ]
3325
3336
  },
@@ -6225,6 +6236,10 @@
6225
6236
  {
6226
6237
  "type": "STRING",
6227
6238
  "value": "Foreign"
6239
+ },
6240
+ {
6241
+ "type": "STRING",
6242
+ "value": "SignedCookie"
6228
6243
  }
6229
6244
  ]
6230
6245
  },
@@ -6266,6 +6281,23 @@
6266
6281
  }
6267
6282
  ]
6268
6283
  },
6284
+ "scheme_duration": {
6285
+ "type": "SEQ",
6286
+ "members": [
6287
+ {
6288
+ "type": "SYMBOL",
6289
+ "name": "number_literal"
6290
+ },
6291
+ {
6292
+ "type": "STRING",
6293
+ "value": "."
6294
+ },
6295
+ {
6296
+ "type": "SYMBOL",
6297
+ "name": "identifier"
6298
+ }
6299
+ ]
6300
+ },
6269
6301
  "scheme_arg": {
6270
6302
  "type": "SEQ",
6271
6303
  "members": [
@@ -6294,6 +6326,14 @@
6294
6326
  {
6295
6327
  "type": "SYMBOL",
6296
6328
  "name": "number_literal"
6329
+ },
6330
+ {
6331
+ "type": "SYMBOL",
6332
+ "name": "scheme_duration"
6333
+ },
6334
+ {
6335
+ "type": "SYMBOL",
6336
+ "name": "identifier"
6297
6337
  }
6298
6338
  ]
6299
6339
  }
@@ -1948,6 +1948,16 @@
1948
1948
  "type": "capability_op",
1949
1949
  "named": true,
1950
1950
  "fields": {
1951
+ "annotation": {
1952
+ "multiple": true,
1953
+ "required": false,
1954
+ "types": [
1955
+ {
1956
+ "type": "store_annotation",
1957
+ "named": true
1958
+ }
1959
+ ]
1960
+ },
1951
1961
  "name": {
1952
1962
  "multiple": false,
1953
1963
  "required": true,
@@ -10295,10 +10305,18 @@
10295
10305
  "multiple": false,
10296
10306
  "required": true,
10297
10307
  "types": [
10308
+ {
10309
+ "type": "identifier",
10310
+ "named": true
10311
+ },
10298
10312
  {
10299
10313
  "type": "number_literal",
10300
10314
  "named": true
10301
10315
  },
10316
+ {
10317
+ "type": "scheme_duration",
10318
+ "named": true
10319
+ },
10302
10320
  {
10303
10321
  "type": "string_literal",
10304
10322
  "named": true
@@ -10322,6 +10340,25 @@
10322
10340
  ]
10323
10341
  }
10324
10342
  },
10343
+ {
10344
+ "type": "scheme_duration",
10345
+ "named": true,
10346
+ "fields": {},
10347
+ "children": {
10348
+ "multiple": true,
10349
+ "required": true,
10350
+ "types": [
10351
+ {
10352
+ "type": "identifier",
10353
+ "named": true
10354
+ },
10355
+ {
10356
+ "type": "number_literal",
10357
+ "named": true
10358
+ }
10359
+ ]
10360
+ }
10361
+ },
10325
10362
  {
10326
10363
  "type": "security_field",
10327
10364
  "named": true,
@@ -13832,6 +13869,10 @@
13832
13869
  "type": "Signature",
13833
13870
  "named": false
13834
13871
  },
13872
+ {
13873
+ "type": "SignedCookie",
13874
+ "named": false
13875
+ },
13835
13876
  {
13836
13877
  "type": "Some",
13837
13878
  "named": false