tm-grammars 1.24.17 → 1.24.19
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/README.md +2 -2
- package/grammars/cadence.json +859 -41
- package/grammars/clarity.json +1 -1
- package/index.js +12 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,9 +43,9 @@ import { grammars } from 'tm-grammars'
|
|
|
43
43
|
| `blade` | | [laravel/vs-code-extension](https://github.com/laravel/vs-code-extension/blob/fa52467b5f7393407c9acc9b95d3794f67e266da/syntaxes/blade.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/laravel/vs-code-extension/main/LICENSE.md) | | `html-derivative` `html` `xml` `sql` `javascript` `json` `css` | 98.91 kB |
|
|
44
44
|
| `bsl` | `1c` | [1c-syntax/vsc-language-1c-bsl](https://github.com/1c-syntax/vsc-language-1c-bsl/blob/2cde5a65a17b82b5363affadf5a620ebb0a026dc/syntaxes/1c.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/1c-syntax/vsc-language-1c-bsl/develop/LICENSE.md) | | `sdbl` | 32.60 kB |
|
|
45
45
|
| `c` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/bd1abe08c38bb5deccf65610f8f3c03d2338d20d/extensions/cpp/syntaxes/c.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 67.93 kB |
|
|
46
|
-
| `cadence` | `cdc` | [onflow/vscode-cadence](https://github.com/onflow/vscode-cadence/blob/
|
|
46
|
+
| `cadence` | `cdc` | [onflow/vscode-cadence](https://github.com/onflow/vscode-cadence/blob/bc7e5d3bb613e01789584283d7911cfd6b616dc4/extension/language/syntaxes/cadence.tmGrammar.json) | [Apache-2.0](https://raw.githubusercontent.com/onflow/vscode-cadence/master/LICENSE) | | | 22.23 kB |
|
|
47
47
|
| `cairo` | | [starkware-libs/cairo-lang](https://github.com/starkware-libs/cairo-lang/blob/4ea4fe8e167845a3402ae2ea0a8b6004aad18dd5/src/starkware/cairo/lang/ide/vscode-cairo/syntaxes/cairo.tmLanguage.json) | [Apache-2.0](https://raw.githubusercontent.com/starkware-libs/cairo-lang/master/LICENSE.txt) | | `python` | 2.66 kB |
|
|
48
|
-
| `clarity` | | [hirosystems/clarity.tmbundle](https://github.com/hirosystems/clarity.tmbundle/blob/
|
|
48
|
+
| `clarity` | | [hirosystems/clarity.tmbundle](https://github.com/hirosystems/clarity.tmbundle/blob/a187c9ccbbfeb91550f138c8d606888a902b7c98/Syntaxes/clarity.JSON-tmLanguage) | [MIT](https://raw.githubusercontent.com/hirosystems/clarity.tmbundle/main/LICENSE) | | | 13.47 kB |
|
|
49
49
|
| `clojure` | `clj` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/a1a4c0a63b1ad59e84f54b874744fe35dea9abe1/extensions/clojure/syntaxes/clojure.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | | 6.02 kB |
|
|
50
50
|
| `cmake` | | [twxs/vs.language.cmake](https://github.com/twxs/vs.language.cmake/blob/19b1b8fe2d68d72cf294d0c3c22f0a3fc54f8f6f/syntaxes/CMake.tmLanguage) | [MIT](https://raw.githubusercontent.com/twxs/vs.language.cmake/master/LICENSE) | | | 9.38 kB |
|
|
51
51
|
| `cobol` | | [spgennard/vscode_cobol](https://github.com/spgennard/vscode_cobol/blob/28a53ee742017ec60055f2aaaf174aaf62e83c45/syntaxes/COBOL.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/spgennard/vscode_cobol/main/LICENSE) | | `html` `java` | 37.32 kB |
|
package/grammars/cadence.json
CHANGED
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
{
|
|
6
6
|
"include": "#comments"
|
|
7
7
|
},
|
|
8
|
-
{
|
|
9
|
-
"include": "#expressions"
|
|
10
|
-
},
|
|
11
8
|
{
|
|
12
9
|
"include": "#declarations"
|
|
13
10
|
},
|
|
@@ -17,6 +14,9 @@
|
|
|
17
14
|
{
|
|
18
15
|
"include": "#code-block"
|
|
19
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#expressions"
|
|
19
|
+
},
|
|
20
20
|
{
|
|
21
21
|
"include": "#composite"
|
|
22
22
|
},
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"name": "punctuation.definition.comment.cadence"
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
-
"end": "
|
|
138
|
+
"end": "$",
|
|
139
139
|
"name": "comment.line.triple-slash.documentation.cadence"
|
|
140
140
|
},
|
|
141
141
|
{
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"name": "punctuation.definition.comment.cadence"
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
|
-
"end": "
|
|
148
|
+
"end": "$",
|
|
149
149
|
"name": "comment.line.double-slash.documentation.cadence"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"name": "punctuation.definition.comment.cadence"
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
-
"end": "
|
|
158
|
+
"end": "$",
|
|
159
159
|
"name": "comment.line.double-slash.cadence"
|
|
160
160
|
}
|
|
161
161
|
]
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
"composite": {
|
|
177
|
-
"begin": "\\b((?:struct|resource|contract)(?:\\s+interface)?|
|
|
177
|
+
"begin": "\\b((?:struct|resource|contract|attachment)(?:\\s+interface)?|enum)\\s+([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)",
|
|
178
178
|
"beginCaptures": {
|
|
179
179
|
"1": {
|
|
180
180
|
"name": "storage.type.$1.cadence"
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"name": "entity.name.type.$1.cadence"
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
|
-
"end": "(?<=})",
|
|
186
|
+
"end": "(?<=})|(?=\\s*\\Z)",
|
|
187
187
|
"name": "meta.definition.type.composite.cadence",
|
|
188
188
|
"patterns": [
|
|
189
189
|
{
|
|
@@ -196,13 +196,13 @@
|
|
|
196
196
|
"begin": "\\{",
|
|
197
197
|
"beginCaptures": {
|
|
198
198
|
"0": {
|
|
199
|
-
"name": "punctuation.
|
|
199
|
+
"name": "punctuation.section.type.begin.cadence"
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
202
|
"end": "}",
|
|
203
203
|
"endCaptures": {
|
|
204
204
|
"0": {
|
|
205
|
-
"name": "punctuation.
|
|
205
|
+
"name": "punctuation.section.type.end.cadence"
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
208
|
"name": "meta.definition.type.body.cadence",
|
|
@@ -251,6 +251,18 @@
|
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
"include": "#initializer"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"include": "#prepare-execute"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"include": "#execute-phase"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"include": "#pre-post"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"include": "#transaction"
|
|
254
266
|
}
|
|
255
267
|
]
|
|
256
268
|
},
|
|
@@ -264,7 +276,7 @@
|
|
|
264
276
|
"name": "entity.name.type.event.cadence"
|
|
265
277
|
}
|
|
266
278
|
},
|
|
267
|
-
"end": "(?<=\\))
|
|
279
|
+
"end": "(?<=\\))",
|
|
268
280
|
"name": "meta.definition.type.event.cadence",
|
|
269
281
|
"patterns": [
|
|
270
282
|
{
|
|
@@ -275,6 +287,40 @@
|
|
|
275
287
|
}
|
|
276
288
|
]
|
|
277
289
|
},
|
|
290
|
+
"execute-phase": {
|
|
291
|
+
"begin": "(?<!\\.)\\b(execute)\\b\\s*(?=\\{)",
|
|
292
|
+
"beginCaptures": {
|
|
293
|
+
"1": {
|
|
294
|
+
"name": "storage.modifier.phase.cadence"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"end": "(?<=})",
|
|
298
|
+
"name": "meta.definition.transaction.phase.cadence",
|
|
299
|
+
"patterns": [
|
|
300
|
+
{
|
|
301
|
+
"include": "#comments"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"begin": "\\{",
|
|
305
|
+
"beginCaptures": {
|
|
306
|
+
"0": {
|
|
307
|
+
"name": "punctuation.section.phase.begin.cadence"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"end": "}",
|
|
311
|
+
"endCaptures": {
|
|
312
|
+
"0": {
|
|
313
|
+
"name": "punctuation.section.phase.end.cadence"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"patterns": [
|
|
317
|
+
{
|
|
318
|
+
"include": "$self"
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
278
324
|
"expression-element-list": {
|
|
279
325
|
"patterns": [
|
|
280
326
|
{
|
|
@@ -284,7 +330,7 @@
|
|
|
284
330
|
"begin": "([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(:)",
|
|
285
331
|
"beginCaptures": {
|
|
286
332
|
"1": {
|
|
287
|
-
"name": "
|
|
333
|
+
"name": "variable.parameter.function-call.cadence"
|
|
288
334
|
},
|
|
289
335
|
"2": {
|
|
290
336
|
"name": "punctuation.separator.argument-label.cadence"
|
|
@@ -313,17 +359,104 @@
|
|
|
313
359
|
{
|
|
314
360
|
"include": "#comments"
|
|
315
361
|
},
|
|
362
|
+
{
|
|
363
|
+
"include": "#keywords"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"include": "#language-variables"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"include": "#function-expression"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"include": "#path-literals"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"begin": "(?!\\b(?:if|while|for|return|create|destroy|emit|as)\\b)([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(<)(?=[\\&(@\\[_{\\p{Lu}]|auth\\b|\\s*$)",
|
|
376
|
+
"beginCaptures": {
|
|
377
|
+
"1": {
|
|
378
|
+
"name": "entity.name.function.cadence"
|
|
379
|
+
},
|
|
380
|
+
"2": {
|
|
381
|
+
"name": "punctuation.definition.type-arguments.begin.cadence"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"end": "(>)(?!\\s*[<=>])",
|
|
385
|
+
"endCaptures": {
|
|
386
|
+
"1": {
|
|
387
|
+
"name": "punctuation.definition.type-arguments.end.cadence"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"name": "meta.type.arguments.cadence",
|
|
391
|
+
"patterns": [
|
|
392
|
+
{
|
|
393
|
+
"include": "#type"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"match": ",",
|
|
397
|
+
"name": "punctuation.separator.type-argument.cadence"
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"begin": "(\\()",
|
|
403
|
+
"beginCaptures": {
|
|
404
|
+
"1": {
|
|
405
|
+
"name": "punctuation.definition.arguments.begin.cadence"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"end": "(\\))",
|
|
409
|
+
"endCaptures": {
|
|
410
|
+
"1": {
|
|
411
|
+
"name": "punctuation.definition.arguments.end.cadence"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"name": "meta.group.cadence",
|
|
415
|
+
"patterns": [
|
|
416
|
+
{
|
|
417
|
+
"include": "#expression-element-list"
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"begin": "(?<=\\.)([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(\\()",
|
|
423
|
+
"beginCaptures": {
|
|
424
|
+
"1": {
|
|
425
|
+
"name": "entity.name.function.cadence"
|
|
426
|
+
},
|
|
427
|
+
"2": {
|
|
428
|
+
"name": "punctuation.definition.arguments.begin.cadence"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"end": "(\\))",
|
|
432
|
+
"endCaptures": {
|
|
433
|
+
"1": {
|
|
434
|
+
"name": "punctuation.definition.arguments.end.cadence"
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"name": "meta.function-call.method.cadence",
|
|
438
|
+
"patterns": [
|
|
439
|
+
{
|
|
440
|
+
"include": "#expression-element-list"
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"match": "(?<=\\.)[_\\p{L}][_\\p{L}\\p{N}\\p{M}]*",
|
|
446
|
+
"name": "variable.other.member.cadence"
|
|
447
|
+
},
|
|
316
448
|
{
|
|
317
449
|
"include": "#function-call-expression"
|
|
318
450
|
},
|
|
319
451
|
{
|
|
320
|
-
"
|
|
452
|
+
"match": "(?<!\\.)\\b(?!(?:contract|struct|resource|event|enum|attachment|entitlement|import|fun|let|var|if|else|switch|case|default|while|for|in|break|continue|return|emit|as|create|destroy|attach|to|remove|from|pub|priv|access|all|self|view|auth|transaction|prepare|execute|pre|post|init|true|false|nil|Type|Int|UInt|Int8|Int16|Int32|Int64|Int128|Int256|UInt8|UInt16|UInt32|UInt64|UInt128|UInt256|Word8|Word16|Word32|Word64|Fix64|Fix128|UFix64|UFix128|String|Character|Bool|Address|Void|AnyStruct|AnyResource|Any|Never|mapping|include)\\b)[_\\p{L}][_\\p{L}\\p{N}\\p{M}]*\\b",
|
|
453
|
+
"name": "variable.other.readwrite.cadence"
|
|
321
454
|
},
|
|
322
455
|
{
|
|
323
|
-
"include": "#
|
|
456
|
+
"include": "#literals"
|
|
324
457
|
},
|
|
325
458
|
{
|
|
326
|
-
"include": "#
|
|
459
|
+
"include": "#operators"
|
|
327
460
|
}
|
|
328
461
|
]
|
|
329
462
|
},
|
|
@@ -337,7 +470,7 @@
|
|
|
337
470
|
"name": "entity.name.function.cadence"
|
|
338
471
|
}
|
|
339
472
|
},
|
|
340
|
-
"end": "(?<=})|$",
|
|
473
|
+
"end": "(?<=})|;|(?=}\\s*$)|$",
|
|
341
474
|
"name": "meta.definition.function.cadence",
|
|
342
475
|
"patterns": [
|
|
343
476
|
{
|
|
@@ -374,18 +507,18 @@
|
|
|
374
507
|
"function-call-expression": {
|
|
375
508
|
"patterns": [
|
|
376
509
|
{
|
|
377
|
-
"begin": "(?!set|init)([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(\\()",
|
|
510
|
+
"begin": "(?<!\\.)\\b(?!set|init|transaction|prepare|execute|access|auth)([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(\\()",
|
|
378
511
|
"beginCaptures": {
|
|
379
512
|
"1": {
|
|
380
|
-
"name": "
|
|
513
|
+
"name": "entity.name.function.cadence"
|
|
381
514
|
},
|
|
382
|
-
"
|
|
515
|
+
"2": {
|
|
383
516
|
"name": "punctuation.definition.arguments.begin.cadence"
|
|
384
517
|
}
|
|
385
518
|
},
|
|
386
|
-
"end": "\\)",
|
|
519
|
+
"end": "(\\))",
|
|
387
520
|
"endCaptures": {
|
|
388
|
-
"
|
|
521
|
+
"1": {
|
|
389
522
|
"name": "punctuation.definition.arguments.end.cadence"
|
|
390
523
|
}
|
|
391
524
|
},
|
|
@@ -398,6 +531,50 @@
|
|
|
398
531
|
}
|
|
399
532
|
]
|
|
400
533
|
},
|
|
534
|
+
"function-expression": {
|
|
535
|
+
"begin": "(?<!\\.)\\b(?:(view)\\s+)?(fun)\\b(?=\\s*\\()",
|
|
536
|
+
"beginCaptures": {
|
|
537
|
+
"1": {
|
|
538
|
+
"name": "storage.modifier.view.cadence"
|
|
539
|
+
},
|
|
540
|
+
"2": {
|
|
541
|
+
"name": "storage.type.function.cadence"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"end": "(?<=})|$",
|
|
545
|
+
"name": "meta.function.expression.cadence",
|
|
546
|
+
"patterns": [
|
|
547
|
+
{
|
|
548
|
+
"include": "#comments"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"include": "#parameter-clause"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"include": "#function-result"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"begin": "(\\{)",
|
|
558
|
+
"beginCaptures": {
|
|
559
|
+
"1": {
|
|
560
|
+
"name": "punctuation.section.function.begin.cadence"
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"end": "(})",
|
|
564
|
+
"endCaptures": {
|
|
565
|
+
"1": {
|
|
566
|
+
"name": "punctuation.section.function.end.cadence"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"name": "meta.definition.function.body.cadence",
|
|
570
|
+
"patterns": [
|
|
571
|
+
{
|
|
572
|
+
"include": "$self"
|
|
573
|
+
}
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
401
578
|
"function-result": {
|
|
402
579
|
"begin": "(?<![-!%\\&*+./<=>^|~])(:)(?![-!%\\&*+./<=>^|~])\\s*",
|
|
403
580
|
"beginCaptures": {
|
|
@@ -405,7 +582,7 @@
|
|
|
405
582
|
"name": "keyword.operator.function-result.cadence"
|
|
406
583
|
}
|
|
407
584
|
},
|
|
408
|
-
"end": "(?!\\G)(
|
|
585
|
+
"end": "(?<![\\&<@\\[])(?!\\G)(?=\\s*\\{)|(?=;|(?<!\\{)})|$",
|
|
409
586
|
"name": "meta.function-result.cadence",
|
|
410
587
|
"patterns": [
|
|
411
588
|
{
|
|
@@ -453,6 +630,125 @@
|
|
|
453
630
|
},
|
|
454
631
|
"keywords": {
|
|
455
632
|
"patterns": [
|
|
633
|
+
{
|
|
634
|
+
"match": "(?<!\\.)\\bvar\\b",
|
|
635
|
+
"name": "storage.type.var.cadence"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"match": "(?<!\\.)\\blet\\b",
|
|
639
|
+
"name": "storage.type.let.cadence"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"begin": "(?<!\\.)\\b(entitlement)\\s+(mapping)\\s+([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(\\{)",
|
|
643
|
+
"beginCaptures": {
|
|
644
|
+
"1": {
|
|
645
|
+
"name": "keyword.declaration.entitlement.cadence"
|
|
646
|
+
},
|
|
647
|
+
"2": {
|
|
648
|
+
"name": "keyword.other.mapping.cadence"
|
|
649
|
+
},
|
|
650
|
+
"3": {
|
|
651
|
+
"name": "entity.name.type.entitlement-mapping.cadence"
|
|
652
|
+
},
|
|
653
|
+
"4": {
|
|
654
|
+
"name": "punctuation.definition.type.begin.cadence"
|
|
655
|
+
}
|
|
656
|
+
},
|
|
657
|
+
"end": "(})",
|
|
658
|
+
"endCaptures": {
|
|
659
|
+
"1": {
|
|
660
|
+
"name": "punctuation.definition.type.end.cadence"
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"name": "meta.definition.entitlement-mapping.cadence",
|
|
664
|
+
"patterns": [
|
|
665
|
+
{
|
|
666
|
+
"include": "#comments"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"match": "\\binclude\\b",
|
|
670
|
+
"name": "keyword.other.mapping.include.cadence"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"captures": {
|
|
674
|
+
"1": {
|
|
675
|
+
"name": "entity.name.type.entitlement-mapping.cadence"
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"match": "(?<=\\binclude)\\s+([_\\p{L}][._\\p{L}\\p{N}\\p{M}]*)"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"match": "[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*",
|
|
682
|
+
"name": "entity.name.type.entitlement.cadence"
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"match": "->",
|
|
686
|
+
"name": "punctuation.separator.mapping.cadence"
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"captures": {
|
|
692
|
+
"1": {
|
|
693
|
+
"name": "keyword.declaration.entitlement.cadence"
|
|
694
|
+
},
|
|
695
|
+
"2": {
|
|
696
|
+
"name": "entity.name.type.entitlement.cadence"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"match": "(?<!\\.)\\b(entitlement)\\b\\s+([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"begin": "(?<!\\.)\\b(access)\\b\\s*(\\()",
|
|
703
|
+
"beginCaptures": {
|
|
704
|
+
"1": {
|
|
705
|
+
"name": "storage.modifier.access.cadence"
|
|
706
|
+
},
|
|
707
|
+
"2": {
|
|
708
|
+
"name": "punctuation.section.group.begin.cadence"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"end": "(\\))",
|
|
712
|
+
"endCaptures": {
|
|
713
|
+
"1": {
|
|
714
|
+
"name": "punctuation.section.group.end.cadence"
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
"name": "meta.access.modifier.cadence",
|
|
718
|
+
"patterns": [
|
|
719
|
+
{
|
|
720
|
+
"include": "#comments"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"match": "\\bmapping\\b",
|
|
724
|
+
"name": "keyword.other.mapping.cadence"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"captures": {
|
|
728
|
+
"1": {
|
|
729
|
+
"name": "entity.name.type.entitlement-mapping.cadence"
|
|
730
|
+
}
|
|
731
|
+
},
|
|
732
|
+
"match": "(?<=\\bmapping)\\s+([_\\p{L}][._\\p{L}\\p{N}\\p{M}]*)"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"match": "\\b(?:all|self|contract|account)\\b",
|
|
736
|
+
"name": "constant.language.access.audience.cadence"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"match": ",",
|
|
740
|
+
"name": "punctuation.separator.entitlement.cadence"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"match": "\\|",
|
|
744
|
+
"name": "punctuation.separator.entitlement.cadence"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"match": "[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*",
|
|
748
|
+
"name": "entity.name.type.entitlement.cadence"
|
|
749
|
+
}
|
|
750
|
+
]
|
|
751
|
+
},
|
|
456
752
|
{
|
|
457
753
|
"match": "(?<!\\.)\\b(?:if|else|switch|case|default)\\b",
|
|
458
754
|
"name": "keyword.control.branch.cadence"
|
|
@@ -466,20 +762,43 @@
|
|
|
466
762
|
"name": "keyword.control.loop.cadence"
|
|
467
763
|
},
|
|
468
764
|
{
|
|
469
|
-
"match": "(?<!\\.)\\b(?:
|
|
765
|
+
"match": "(?<!\\.)\\b(?:create|destroy|emit|attach|to|remove|from)\\b",
|
|
470
766
|
"name": "keyword.other.cadence"
|
|
471
767
|
},
|
|
472
768
|
{
|
|
473
|
-
"match": "(?<!\\.)\\b(
|
|
474
|
-
"name": "
|
|
769
|
+
"match": "(?<!\\.)\\b(p(?:ub|riv))\\b",
|
|
770
|
+
"name": "invalid.deprecated.keyword.cadence"
|
|
475
771
|
},
|
|
476
772
|
{
|
|
477
|
-
"match": "
|
|
478
|
-
"name": "storage.
|
|
773
|
+
"match": "(?<!\\.)\\bview\\b",
|
|
774
|
+
"name": "storage.modifier.view.cadence"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
"match": "(?<!\\.)\\b(auth)\\b",
|
|
778
|
+
"name": "keyword.other.auth.cadence"
|
|
479
779
|
},
|
|
480
780
|
{
|
|
481
|
-
"
|
|
482
|
-
"
|
|
781
|
+
"begin": "(?<!\\.)\\b(import)\\b",
|
|
782
|
+
"beginCaptures": {
|
|
783
|
+
"1": {
|
|
784
|
+
"name": "keyword.control.import.cadence"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
"end": "(?=$|//|/\\*|;)",
|
|
788
|
+
"name": "meta.import.cadence",
|
|
789
|
+
"patterns": [
|
|
790
|
+
{
|
|
791
|
+
"match": "\\bfrom\\b",
|
|
792
|
+
"name": "keyword.control.import.cadence"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"include": "#literals"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"match": "\\b[_\\p{L}][_\\p{L}\\p{N}\\p{M}]*\\b",
|
|
799
|
+
"name": "variable.other.readwrite.cadence"
|
|
800
|
+
}
|
|
801
|
+
]
|
|
483
802
|
}
|
|
484
803
|
]
|
|
485
804
|
},
|
|
@@ -521,10 +840,13 @@
|
|
|
521
840
|
"include": "#octal"
|
|
522
841
|
},
|
|
523
842
|
{
|
|
524
|
-
"include": "#
|
|
843
|
+
"include": "#hexadecimal"
|
|
525
844
|
},
|
|
526
845
|
{
|
|
527
|
-
"include": "#
|
|
846
|
+
"include": "#fixed-point"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"include": "#decimal"
|
|
528
850
|
}
|
|
529
851
|
],
|
|
530
852
|
"repository": {
|
|
@@ -536,6 +858,10 @@
|
|
|
536
858
|
"match": "(\\B-|\\b)[0-9]([0-9_]*[0-9])?\\b",
|
|
537
859
|
"name": "constant.numeric.integer.decimal.cadence"
|
|
538
860
|
},
|
|
861
|
+
"fixed-point": {
|
|
862
|
+
"match": "(\\B-|\\b)[0-9]([0-9_]*[0-9])?\\.[0-9]([0-9_]*[0-9])?\\b",
|
|
863
|
+
"name": "constant.numeric.float.cadence"
|
|
864
|
+
},
|
|
539
865
|
"hexadecimal": {
|
|
540
866
|
"match": "(\\B-|\\b)0x\\h([_\\h]*\\h)?\\b",
|
|
541
867
|
"name": "constant.numeric.integer.hexadecimal.cadence"
|
|
@@ -567,6 +893,46 @@
|
|
|
567
893
|
"match": "[\\n\\r]",
|
|
568
894
|
"name": "invalid.illegal.returns-not-allowed.cadence"
|
|
569
895
|
},
|
|
896
|
+
{
|
|
897
|
+
"begin": "\\\\\\(",
|
|
898
|
+
"beginCaptures": {
|
|
899
|
+
"0": {
|
|
900
|
+
"name": "punctuation.section.embedded.begin.cadence meta.embedded.cadence"
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"contentName": "meta.embedded.line.cadence",
|
|
904
|
+
"end": "\\)",
|
|
905
|
+
"endCaptures": {
|
|
906
|
+
"0": {
|
|
907
|
+
"name": "punctuation.section.embedded.end.cadence meta.embedded.cadence"
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"name": "meta.interpolation.cadence",
|
|
911
|
+
"patterns": [
|
|
912
|
+
{
|
|
913
|
+
"begin": "\\(",
|
|
914
|
+
"beginCaptures": {
|
|
915
|
+
"0": {
|
|
916
|
+
"name": "punctuation.section.group.begin.cadence"
|
|
917
|
+
}
|
|
918
|
+
},
|
|
919
|
+
"end": "\\)",
|
|
920
|
+
"endCaptures": {
|
|
921
|
+
"0": {
|
|
922
|
+
"name": "punctuation.section.group.end.cadence"
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"patterns": [
|
|
926
|
+
{
|
|
927
|
+
"include": "#expressions"
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"include": "#expressions"
|
|
933
|
+
}
|
|
934
|
+
]
|
|
935
|
+
},
|
|
570
936
|
{
|
|
571
937
|
"include": "#string-guts"
|
|
572
938
|
}
|
|
@@ -592,10 +958,68 @@
|
|
|
592
958
|
},
|
|
593
959
|
"operators": {
|
|
594
960
|
"patterns": [
|
|
961
|
+
{
|
|
962
|
+
"match": "<->",
|
|
963
|
+
"name": "keyword.operator.swap.cadence"
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"match": "\\?\\.",
|
|
967
|
+
"name": "keyword.operator.optional.chain.cadence"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"begin": "\\b(as(?:\\?|!?))\\b",
|
|
971
|
+
"beginCaptures": {
|
|
972
|
+
"0": {
|
|
973
|
+
"name": "keyword.operator.type.cast.cadence"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"end": "(?=$|;|//|/\\\\*|\")|(?=[),}])|(?<=>)(?=\\s*\\{(?!\\s*[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*\\s*:))|(?<=[])>?}\\p{L}\\p{N}])(?=\\s*\\{(?!\\s*[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*\\s*:))|(?=\\?\\?)",
|
|
977
|
+
"name": "meta.type.cast-target.cadence",
|
|
978
|
+
"patterns": [
|
|
979
|
+
{
|
|
980
|
+
"begin": "\\{(?=\\s*[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*\\s*:)",
|
|
981
|
+
"beginCaptures": {
|
|
982
|
+
"0": {
|
|
983
|
+
"name": "punctuation.definition.type.dictionary.begin.cadence"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
"end": "(})",
|
|
987
|
+
"endCaptures": {
|
|
988
|
+
"1": {
|
|
989
|
+
"name": "punctuation.definition.type.dictionary.end.cadence"
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
"name": "meta.type.dictionary.cadence",
|
|
993
|
+
"patterns": [
|
|
994
|
+
{
|
|
995
|
+
"include": "#comments"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"include": "#type"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"match": ":",
|
|
1002
|
+
"name": "punctuation.separator.type.dictionary.cadence"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"match": ",",
|
|
1006
|
+
"name": "punctuation.separator.type.dictionary.cadence"
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"include": "#type"
|
|
1012
|
+
}
|
|
1013
|
+
]
|
|
1014
|
+
},
|
|
595
1015
|
{
|
|
596
1016
|
"match": "-",
|
|
597
1017
|
"name": "keyword.operator.arithmetic.unary.cadence"
|
|
598
1018
|
},
|
|
1019
|
+
{
|
|
1020
|
+
"match": "(?<=\\))!",
|
|
1021
|
+
"name": "keyword.operator.force-unwrap.cadence"
|
|
1022
|
+
},
|
|
599
1023
|
{
|
|
600
1024
|
"match": "!",
|
|
601
1025
|
"name": "keyword.operator.logical.not.cadence"
|
|
@@ -620,6 +1044,14 @@
|
|
|
620
1044
|
"match": "%",
|
|
621
1045
|
"name": "keyword.operator.arithmetic.remainder.cadence"
|
|
622
1046
|
},
|
|
1047
|
+
{
|
|
1048
|
+
"match": ">>",
|
|
1049
|
+
"name": "keyword.operator.bitwise.shift.cadence"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"match": "<<",
|
|
1053
|
+
"name": "keyword.operator.bitwise.shift.cadence"
|
|
1054
|
+
},
|
|
623
1055
|
{
|
|
624
1056
|
"match": "==|!=|[<>]|>=|<=",
|
|
625
1057
|
"name": "keyword.operator.comparison.cadence"
|
|
@@ -653,6 +1085,9 @@
|
|
|
653
1085
|
},
|
|
654
1086
|
"name": "meta.parameter-clause.cadence",
|
|
655
1087
|
"patterns": [
|
|
1088
|
+
{
|
|
1089
|
+
"include": "#comments"
|
|
1090
|
+
},
|
|
656
1091
|
{
|
|
657
1092
|
"include": "#parameter-list"
|
|
658
1093
|
}
|
|
@@ -660,27 +1095,38 @@
|
|
|
660
1095
|
},
|
|
661
1096
|
"parameter-list": {
|
|
662
1097
|
"patterns": [
|
|
1098
|
+
{
|
|
1099
|
+
"include": "#comments"
|
|
1100
|
+
},
|
|
663
1101
|
{
|
|
664
1102
|
"captures": {
|
|
665
1103
|
"1": {
|
|
666
|
-
"name": "
|
|
1104
|
+
"name": "keyword.operator.unnamed-parameter.cadence"
|
|
667
1105
|
},
|
|
668
1106
|
"2": {
|
|
669
|
-
"name": "variable.parameter.
|
|
1107
|
+
"name": "variable.parameter.cadence"
|
|
670
1108
|
}
|
|
671
1109
|
},
|
|
672
|
-
"match": "(
|
|
1110
|
+
"match": "(_)\\s+([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)(?=\\s*:)"
|
|
673
1111
|
},
|
|
674
1112
|
{
|
|
675
1113
|
"captures": {
|
|
676
1114
|
"1": {
|
|
677
|
-
"name": "
|
|
1115
|
+
"name": "entity.name.label.cadence"
|
|
678
1116
|
},
|
|
679
1117
|
"2": {
|
|
680
|
-
"name": "
|
|
1118
|
+
"name": "variable.parameter.cadence"
|
|
681
1119
|
}
|
|
682
1120
|
},
|
|
683
|
-
"match": "(([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)
|
|
1121
|
+
"match": "([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s+([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)(?=\\s*:)"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"captures": {
|
|
1125
|
+
"1": {
|
|
1126
|
+
"name": "variable.parameter.cadence"
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
"match": "([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)(?=\\s*:)"
|
|
684
1130
|
},
|
|
685
1131
|
{
|
|
686
1132
|
"begin": ":\\s*(?!\\s)",
|
|
@@ -697,14 +1143,369 @@
|
|
|
697
1143
|
}
|
|
698
1144
|
]
|
|
699
1145
|
},
|
|
1146
|
+
"path-literals": {
|
|
1147
|
+
"patterns": [
|
|
1148
|
+
{
|
|
1149
|
+
"captures": {
|
|
1150
|
+
"1": {
|
|
1151
|
+
"name": "punctuation.separator.path.cadence"
|
|
1152
|
+
},
|
|
1153
|
+
"2": {
|
|
1154
|
+
"name": "constant.other.path.cadence"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"match": "(/)((storage|public)(/[_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)?)"
|
|
1158
|
+
}
|
|
1159
|
+
]
|
|
1160
|
+
},
|
|
1161
|
+
"pre-post": {
|
|
1162
|
+
"begin": "(?<!\\.)\\b(p(?:re|ost))\\b\\s*(?=\\{)",
|
|
1163
|
+
"beginCaptures": {
|
|
1164
|
+
"1": {
|
|
1165
|
+
"name": "storage.modifier.phase.cadence"
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"end": "(?<=})",
|
|
1169
|
+
"name": "meta.definition.transaction.phase.cadence",
|
|
1170
|
+
"patterns": [
|
|
1171
|
+
{
|
|
1172
|
+
"include": "#comments"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"begin": "\\{",
|
|
1176
|
+
"beginCaptures": {
|
|
1177
|
+
"0": {
|
|
1178
|
+
"name": "punctuation.section.phase.begin.cadence"
|
|
1179
|
+
}
|
|
1180
|
+
},
|
|
1181
|
+
"end": "}",
|
|
1182
|
+
"endCaptures": {
|
|
1183
|
+
"0": {
|
|
1184
|
+
"name": "punctuation.section.phase.end.cadence"
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"patterns": [
|
|
1188
|
+
{
|
|
1189
|
+
"include": "$self"
|
|
1190
|
+
}
|
|
1191
|
+
]
|
|
1192
|
+
}
|
|
1193
|
+
]
|
|
1194
|
+
},
|
|
1195
|
+
"prepare-execute": {
|
|
1196
|
+
"begin": "(?<!\\.)\\b(prepare)\\b\\s*(?=\\()",
|
|
1197
|
+
"beginCaptures": {
|
|
1198
|
+
"1": {
|
|
1199
|
+
"name": "storage.modifier.phase.cadence"
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
"end": "(?<=})",
|
|
1203
|
+
"name": "meta.definition.transaction.phase.cadence",
|
|
1204
|
+
"patterns": [
|
|
1205
|
+
{
|
|
1206
|
+
"include": "#comments"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"include": "#parameter-clause"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"begin": "\\{",
|
|
1213
|
+
"beginCaptures": {
|
|
1214
|
+
"0": {
|
|
1215
|
+
"name": "punctuation.section.phase.begin.cadence"
|
|
1216
|
+
}
|
|
1217
|
+
},
|
|
1218
|
+
"end": "}",
|
|
1219
|
+
"endCaptures": {
|
|
1220
|
+
"0": {
|
|
1221
|
+
"name": "punctuation.section.phase.end.cadence"
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
"patterns": [
|
|
1225
|
+
{
|
|
1226
|
+
"include": "$self"
|
|
1227
|
+
}
|
|
1228
|
+
]
|
|
1229
|
+
}
|
|
1230
|
+
]
|
|
1231
|
+
},
|
|
1232
|
+
"transaction": {
|
|
1233
|
+
"begin": "\\b(transaction)\\b",
|
|
1234
|
+
"beginCaptures": {
|
|
1235
|
+
"1": {
|
|
1236
|
+
"name": "storage.type.transaction.cadence"
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
"end": "(?<=\\))|(?<=})",
|
|
1240
|
+
"name": "meta.definition.transaction.cadence",
|
|
1241
|
+
"patterns": [
|
|
1242
|
+
{
|
|
1243
|
+
"include": "#comments"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"include": "#parameter-clause"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"begin": "\\{",
|
|
1250
|
+
"beginCaptures": {
|
|
1251
|
+
"0": {
|
|
1252
|
+
"name": "punctuation.section.transaction.begin.cadence"
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
"end": "}",
|
|
1256
|
+
"endCaptures": {
|
|
1257
|
+
"0": {
|
|
1258
|
+
"name": "punctuation.section.transaction.end.cadence"
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
"name": "meta.definition.transaction.body.cadence",
|
|
1262
|
+
"patterns": [
|
|
1263
|
+
{
|
|
1264
|
+
"include": "$self"
|
|
1265
|
+
}
|
|
1266
|
+
]
|
|
1267
|
+
}
|
|
1268
|
+
]
|
|
1269
|
+
},
|
|
700
1270
|
"type": {
|
|
701
1271
|
"patterns": [
|
|
1272
|
+
{
|
|
1273
|
+
"begin": "(?<!\\.)\\b(?:(view)\\s+)?(fun)\\b\\s*(\\()",
|
|
1274
|
+
"beginCaptures": {
|
|
1275
|
+
"1": {
|
|
1276
|
+
"name": "storage.modifier.view.cadence"
|
|
1277
|
+
},
|
|
1278
|
+
"2": {
|
|
1279
|
+
"name": "storage.type.function.cadence"
|
|
1280
|
+
},
|
|
1281
|
+
"3": {
|
|
1282
|
+
"name": "punctuation.definition.parameters.begin.cadence"
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
"end": "(?=[]),>}]|$)",
|
|
1286
|
+
"name": "meta.type.function.cadence",
|
|
1287
|
+
"patterns": [
|
|
1288
|
+
{
|
|
1289
|
+
"include": "#comments"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"begin": "\\G",
|
|
1293
|
+
"end": "(\\))",
|
|
1294
|
+
"endCaptures": {
|
|
1295
|
+
"1": {
|
|
1296
|
+
"name": "punctuation.definition.parameters.end.cadence"
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
"patterns": [
|
|
1300
|
+
{
|
|
1301
|
+
"include": "#type"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"match": ",",
|
|
1305
|
+
"name": "punctuation.separator.parameter.cadence"
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"begin": "(:)",
|
|
1311
|
+
"beginCaptures": {
|
|
1312
|
+
"1": {
|
|
1313
|
+
"name": "keyword.operator.function-result.cadence"
|
|
1314
|
+
}
|
|
1315
|
+
},
|
|
1316
|
+
"end": "(?=[]),>}]|$)",
|
|
1317
|
+
"name": "meta.function-result.cadence",
|
|
1318
|
+
"patterns": [
|
|
1319
|
+
{
|
|
1320
|
+
"include": "#type"
|
|
1321
|
+
}
|
|
1322
|
+
]
|
|
1323
|
+
}
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
702
1326
|
{
|
|
703
1327
|
"include": "#comments"
|
|
704
1328
|
},
|
|
1329
|
+
{
|
|
1330
|
+
"begin": "(?<!\\.)([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)\\s*(<)",
|
|
1331
|
+
"beginCaptures": {
|
|
1332
|
+
"1": {
|
|
1333
|
+
"name": "entity.name.type.cadence"
|
|
1334
|
+
},
|
|
1335
|
+
"2": {
|
|
1336
|
+
"name": "punctuation.definition.type-arguments.begin.cadence"
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"end": "(>)",
|
|
1340
|
+
"endCaptures": {
|
|
1341
|
+
"1": {
|
|
1342
|
+
"name": "punctuation.definition.type-arguments.end.cadence"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
"name": "meta.type.arguments.cadence",
|
|
1346
|
+
"patterns": [
|
|
1347
|
+
{
|
|
1348
|
+
"include": "#type"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"match": ",",
|
|
1352
|
+
"name": "punctuation.separator.type-argument.cadence"
|
|
1353
|
+
}
|
|
1354
|
+
]
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
"begin": "(?<!\\.)\\b(auth)\\b\\s*(\\()",
|
|
1358
|
+
"beginCaptures": {
|
|
1359
|
+
"1": {
|
|
1360
|
+
"name": "keyword.other.auth.cadence"
|
|
1361
|
+
},
|
|
1362
|
+
"2": {
|
|
1363
|
+
"name": "punctuation.section.group.begin.cadence"
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
"end": "(\\))",
|
|
1367
|
+
"endCaptures": {
|
|
1368
|
+
"1": {
|
|
1369
|
+
"name": "punctuation.section.group.end.cadence"
|
|
1370
|
+
}
|
|
1371
|
+
},
|
|
1372
|
+
"name": "meta.auth.entitlements.cadence",
|
|
1373
|
+
"patterns": [
|
|
1374
|
+
{
|
|
1375
|
+
"include": "#comments"
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"match": "\\bmapping\\b",
|
|
1379
|
+
"name": "keyword.other.mapping.cadence"
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"captures": {
|
|
1383
|
+
"1": {
|
|
1384
|
+
"name": "entity.name.type.entitlement-mapping.cadence"
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
"match": "(?<=\\bmapping)\\s+([_\\p{L}][._\\p{L}\\p{N}\\p{M}]*)"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"match": ",",
|
|
1391
|
+
"name": "punctuation.separator.entitlement.cadence"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"match": "\\|",
|
|
1395
|
+
"name": "punctuation.separator.entitlement.cadence"
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"match": "[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*",
|
|
1399
|
+
"name": "entity.name.type.entitlement.cadence"
|
|
1400
|
+
}
|
|
1401
|
+
]
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"begin": "\\{(?![^}]*:)(?!.*}\\s*\\()",
|
|
1405
|
+
"beginCaptures": {
|
|
1406
|
+
"0": {
|
|
1407
|
+
"name": "punctuation.definition.type.intersection.begin.cadence"
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
"end": "(})",
|
|
1411
|
+
"endCaptures": {
|
|
1412
|
+
"1": {
|
|
1413
|
+
"name": "punctuation.definition.type.intersection.end.cadence"
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
"patterns": [
|
|
1417
|
+
{
|
|
1418
|
+
"include": "#comments"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"include": "#type"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"match": ",",
|
|
1425
|
+
"name": "punctuation.separator.type.intersection.cadence"
|
|
1426
|
+
}
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"begin": "\\{(?=\\s*[_\\p{L}][._\\p{L}\\p{N}\\p{M}]*\\s*:)(?!.*}\\s*\\()",
|
|
1431
|
+
"beginCaptures": {
|
|
1432
|
+
"0": {
|
|
1433
|
+
"name": "punctuation.definition.type.dictionary.begin.cadence"
|
|
1434
|
+
}
|
|
1435
|
+
},
|
|
1436
|
+
"end": "(})",
|
|
1437
|
+
"endCaptures": {
|
|
1438
|
+
"1": {
|
|
1439
|
+
"name": "punctuation.definition.type.dictionary.end.cadence"
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"name": "meta.type.dictionary.cadence",
|
|
1443
|
+
"patterns": [
|
|
1444
|
+
{
|
|
1445
|
+
"include": "#comments"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"include": "#type"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"match": ":",
|
|
1452
|
+
"name": "punctuation.separator.type.dictionary.cadence"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"match": ",",
|
|
1456
|
+
"name": "punctuation.separator.type.dictionary.cadence"
|
|
1457
|
+
}
|
|
1458
|
+
]
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"begin": "\\[",
|
|
1462
|
+
"beginCaptures": {
|
|
1463
|
+
"0": {
|
|
1464
|
+
"name": "punctuation.definition.type.array.begin.cadence"
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
"end": "(])",
|
|
1468
|
+
"endCaptures": {
|
|
1469
|
+
"1": {
|
|
1470
|
+
"name": "punctuation.definition.type.array.end.cadence"
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
"name": "meta.type.array.cadence",
|
|
1474
|
+
"patterns": [
|
|
1475
|
+
{
|
|
1476
|
+
"include": "#comments"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"include": "#type"
|
|
1480
|
+
}
|
|
1481
|
+
]
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"captures": {
|
|
1485
|
+
"1": {
|
|
1486
|
+
"name": "punctuation.definition.type.reference.cadence"
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
"match": "([\\&@])(?=\\s*\\{)"
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"captures": {
|
|
1493
|
+
"1": {
|
|
1494
|
+
"name": "punctuation.definition.type.reference.cadence"
|
|
1495
|
+
},
|
|
1496
|
+
"2": {
|
|
1497
|
+
"name": "entity.name.type.cadence"
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1500
|
+
"match": "([\\&@])\\s*([_\\p{L}][._\\p{L}\\p{N}\\p{M}]*)"
|
|
1501
|
+
},
|
|
705
1502
|
{
|
|
706
1503
|
"match": "([_\\p{L}][_\\p{L}\\p{N}\\p{M}]*)",
|
|
707
|
-
"name": "
|
|
1504
|
+
"name": "entity.name.type.cadence"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"match": "[!?]",
|
|
1508
|
+
"name": "keyword.operator.type.optional.cadence"
|
|
708
1509
|
}
|
|
709
1510
|
]
|
|
710
1511
|
},
|
|
@@ -715,13 +1516,30 @@
|
|
|
715
1516
|
"name": "storage.type.$1.cadence"
|
|
716
1517
|
},
|
|
717
1518
|
"2": {
|
|
718
|
-
"name": "
|
|
1519
|
+
"name": "variable.other.declaration.cadence"
|
|
719
1520
|
}
|
|
720
1521
|
},
|
|
721
|
-
"end": "
|
|
1522
|
+
"end": "=|<-!??|;|(?=//)|$",
|
|
722
1523
|
"patterns": [
|
|
723
1524
|
{
|
|
724
|
-
"include": "#
|
|
1525
|
+
"include": "#comments"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"begin": ":\\s*(?!\\s)",
|
|
1529
|
+
"beginCaptures": {
|
|
1530
|
+
"0": {
|
|
1531
|
+
"name": "keyword.operator.type.annotation.cadence"
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
"end": "(?=//|=|<-!??|;|$)",
|
|
1535
|
+
"patterns": [
|
|
1536
|
+
{
|
|
1537
|
+
"include": "#type"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"include": "#comments"
|
|
1541
|
+
}
|
|
1542
|
+
]
|
|
725
1543
|
}
|
|
726
1544
|
]
|
|
727
1545
|
}
|
package/grammars/clarity.json
CHANGED
|
@@ -544,7 +544,7 @@
|
|
|
544
544
|
]
|
|
545
545
|
},
|
|
546
546
|
"keyword": {
|
|
547
|
-
"match": "(?<!\\S)(?!-)\\b(?:block-height|burn-block-height|chain-id|contract-caller|is-in-regtest|stacks-block-height|stx-liquid-supply|tenure-height|tx-sender|tx-sponsor?|current-contract|block-time)\\b(?!\\s*-)",
|
|
547
|
+
"match": "(?<!\\S)(?!-)\\b(?:block-height|burn-block-height|chain-id|contract-caller|is-in-regtest|stacks-block-height|stx-liquid-supply|tenure-height|tx-sender|tx-sponsor?|current-contract|stacks-block-time)\\b(?!\\s*-)",
|
|
548
548
|
"name": "constant.language.clarity"
|
|
549
549
|
},
|
|
550
550
|
"let-func": {
|
package/index.js
CHANGED
|
@@ -521,19 +521,19 @@ export const grammars = [
|
|
|
521
521
|
aliases: [
|
|
522
522
|
'cdc',
|
|
523
523
|
],
|
|
524
|
-
byteSize:
|
|
524
|
+
byteSize: 22761,
|
|
525
525
|
displayName: 'Cadence',
|
|
526
526
|
funding: [
|
|
527
527
|
],
|
|
528
|
-
hash: '-
|
|
529
|
-
lastUpdate: '
|
|
528
|
+
hash: 'xKJ-PvQXCJkAlbfK8vpzoWlSoH8iDiJIwaIi45ILUeg',
|
|
529
|
+
lastUpdate: '2025-10-08T23:24:39Z',
|
|
530
530
|
license: 'Apache-2.0',
|
|
531
531
|
licenseUrl: 'https://raw.githubusercontent.com/onflow/vscode-cadence/master/LICENSE',
|
|
532
532
|
name: 'cadence',
|
|
533
533
|
scopeName: 'source.cadence',
|
|
534
|
-
sha: '
|
|
535
|
-
source: 'https://github.com/onflow/vscode-cadence/blob/
|
|
536
|
-
sourceApi: 'https://api.github.com/repos/onflow/vscode-cadence/contents/extension/language/syntaxes/cadence.tmGrammar.json?ref=
|
|
534
|
+
sha: 'bc7e5d3bb613e01789584283d7911cfd6b616dc4',
|
|
535
|
+
source: 'https://github.com/onflow/vscode-cadence/blob/bc7e5d3bb613e01789584283d7911cfd6b616dc4/extension/language/syntaxes/cadence.tmGrammar.json',
|
|
536
|
+
sourceApi: 'https://api.github.com/repos/onflow/vscode-cadence/contents/extension/language/syntaxes/cadence.tmGrammar.json?ref=bc7e5d3bb613e01789584283d7911cfd6b616dc4',
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
byteSize: 2727,
|
|
@@ -557,22 +557,22 @@ export const grammars = [
|
|
|
557
557
|
sourceApi: 'https://api.github.com/repos/starkware-libs/cairo-lang/contents/src/starkware/cairo/lang/ide/vscode-cairo/syntaxes/cairo.tmLanguage.json?ref=4ea4fe8e167845a3402ae2ea0a8b6004aad18dd5',
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
|
-
byteSize:
|
|
560
|
+
byteSize: 13789,
|
|
561
561
|
categories: [
|
|
562
562
|
'lisp',
|
|
563
563
|
],
|
|
564
564
|
displayName: 'Clarity',
|
|
565
565
|
funding: [
|
|
566
566
|
],
|
|
567
|
-
hash: '
|
|
568
|
-
lastUpdate: '2025-10-
|
|
567
|
+
hash: 'x-e0LcAtKvpExm7uqO0sFoqbgwmPXGlaQn2KuzxQyfw',
|
|
568
|
+
lastUpdate: '2025-10-09T17:14:05Z',
|
|
569
569
|
license: 'MIT',
|
|
570
570
|
licenseUrl: 'https://raw.githubusercontent.com/hirosystems/clarity.tmbundle/main/LICENSE',
|
|
571
571
|
name: 'clarity',
|
|
572
572
|
scopeName: 'source.clar',
|
|
573
|
-
sha: '
|
|
574
|
-
source: 'https://github.com/hirosystems/clarity.tmbundle/blob/
|
|
575
|
-
sourceApi: 'https://api.github.com/repos/hirosystems/clarity.tmbundle/contents/Syntaxes/clarity.JSON-tmLanguage?ref=
|
|
573
|
+
sha: 'a187c9ccbbfeb91550f138c8d606888a902b7c98',
|
|
574
|
+
source: 'https://github.com/hirosystems/clarity.tmbundle/blob/a187c9ccbbfeb91550f138c8d606888a902b7c98/Syntaxes/clarity.JSON-tmLanguage',
|
|
575
|
+
sourceApi: 'https://api.github.com/repos/hirosystems/clarity.tmbundle/contents/Syntaxes/clarity.JSON-tmLanguage?ref=a187c9ccbbfeb91550f138c8d606888a902b7c98',
|
|
576
576
|
},
|
|
577
577
|
{
|
|
578
578
|
aliases: [
|