tm-grammars 1.13.2 → 1.13.4

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.
@@ -1,615 +1,15 @@
1
1
  {
2
- "displayName": "YAML",
2
+ "displayName": "YAML Ain't Markup Language",
3
3
  "name": "yaml",
4
4
  "patterns": [
5
5
  {
6
- "include": "#comment"
7
- },
8
- {
9
- "include": "#property"
10
- },
11
- {
12
- "include": "#directive"
13
- },
14
- {
15
- "match": "^---",
16
- "name": "entity.other.document.begin.yaml"
17
- },
18
- {
19
- "match": "^\\.{3}",
20
- "name": "entity.other.document.end.yaml"
21
- },
22
- {
23
- "include": "#node"
6
+ "comment": "Default to YAML version 1.2",
7
+ "include": "source.yaml.1.2"
24
8
  }
25
9
  ],
26
10
  "repository": {
27
- "block-collection": {
28
- "patterns": [
29
- {
30
- "include": "#block-sequence"
31
- },
32
- {
33
- "include": "#block-mapping"
34
- }
35
- ]
36
- },
37
- "block-mapping": {
38
- "patterns": [
39
- {
40
- "include": "#block-pair"
41
- }
42
- ]
43
- },
44
- "block-node": {
45
- "patterns": [
46
- {
47
- "include": "#prototype"
48
- },
49
- {
50
- "include": "#block-scalar"
51
- },
52
- {
53
- "include": "#block-collection"
54
- },
55
- {
56
- "include": "#flow-scalar-plain-out"
57
- },
58
- {
59
- "include": "#flow-node"
60
- }
61
- ]
62
- },
63
- "block-pair": {
64
- "patterns": [
65
- {
66
- "begin": "\\?",
67
- "beginCaptures": {
68
- "1": {
69
- "name": "punctuation.definition.key-value.begin.yaml"
70
- }
71
- },
72
- "end": "(?=\\?)|^ *(:)|(:)",
73
- "endCaptures": {
74
- "1": {
75
- "name": "punctuation.separator.key-value.mapping.yaml"
76
- },
77
- "2": {
78
- "name": "invalid.illegal.expected-newline.yaml"
79
- }
80
- },
81
- "name": "meta.block-mapping.yaml",
82
- "patterns": [
83
- {
84
- "include": "#block-node"
85
- }
86
- ]
87
- },
88
- {
89
- "begin": "(?x)\n(?=\n(?x:\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] \\S\n)\n(\n[^\\s:]\n| : \\S\n| \\s+ (?![#\\s])\n)*\n\\s*\n:\n(\\s|$)\n)\n",
90
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n)\n",
91
- "patterns": [
92
- {
93
- "include": "#flow-scalar-plain-out-implicit-type"
94
- },
95
- {
96
- "begin": "(?x)\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] \\S\n",
97
- "beginCaptures": {
98
- "0": {
99
- "name": "entity.name.tag.yaml"
100
- }
101
- },
102
- "contentName": "entity.name.tag.yaml",
103
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n)\n",
104
- "name": "string.unquoted.plain.out.yaml"
105
- }
106
- ]
107
- },
108
- {
109
- "match": ":(?=\\s|$)",
110
- "name": "punctuation.separator.key-value.mapping.yaml"
111
- }
112
- ]
113
- },
114
- "block-scalar": {
115
- "begin": "(?:(\\|)|(>))([1-9])?([-+])?(.*\\n?)",
116
- "beginCaptures": {
117
- "1": {
118
- "name": "keyword.control.flow.block-scalar.literal.yaml"
119
- },
120
- "2": {
121
- "name": "keyword.control.flow.block-scalar.folded.yaml"
122
- },
123
- "3": {
124
- "name": "constant.numeric.indentation-indicator.yaml"
125
- },
126
- "4": {
127
- "name": "storage.modifier.chomping-indicator.yaml"
128
- },
129
- "5": {
130
- "patterns": [
131
- {
132
- "include": "#comment"
133
- },
134
- {
135
- "match": ".+",
136
- "name": "invalid.illegal.expected-comment-or-newline.yaml"
137
- }
138
- ]
139
- }
140
- },
141
- "end": "^(?=\\S)|(?!\\G)",
142
- "patterns": [
143
- {
144
- "begin": "^([ ]+)(?! )",
145
- "end": "^(?!\\1|\\s*$)",
146
- "name": "string.unquoted.block.yaml"
147
- }
148
- ]
149
- },
150
- "block-sequence": {
151
- "match": "(-)(?!\\S)",
152
- "name": "punctuation.definition.block.sequence.item.yaml"
153
- },
154
- "comment": {
155
- "begin": "(?:(^[ \\t]*)|[ \\t]+)(?=#\\p{Print}*$)",
156
- "beginCaptures": {
157
- "1": {
158
- "name": "punctuation.whitespace.comment.leading.yaml"
159
- }
160
- },
161
- "end": "(?!\\G)",
162
- "patterns": [
163
- {
164
- "begin": "#",
165
- "beginCaptures": {
166
- "0": {
167
- "name": "punctuation.definition.comment.yaml"
168
- }
169
- },
170
- "end": "\\n",
171
- "name": "comment.line.number-sign.yaml"
172
- }
173
- ]
174
- },
175
- "directive": {
176
- "begin": "^%",
177
- "beginCaptures": {
178
- "0": {
179
- "name": "punctuation.definition.directive.begin.yaml"
180
- }
181
- },
182
- "end": "(?=$|[ \\t]+($|#))",
183
- "name": "meta.directive.yaml",
184
- "patterns": [
185
- {
186
- "captures": {
187
- "1": {
188
- "name": "keyword.other.directive.yaml.yaml"
189
- },
190
- "2": {
191
- "name": "constant.numeric.yaml-version.yaml"
192
- }
193
- },
194
- "match": "\\G(YAML)[ \\t]+(\\d+\\.\\d+)"
195
- },
196
- {
197
- "captures": {
198
- "1": {
199
- "name": "keyword.other.directive.tag.yaml"
200
- },
201
- "2": {
202
- "name": "storage.type.tag-handle.yaml"
203
- },
204
- "3": {
205
- "name": "support.type.tag-prefix.yaml"
206
- }
207
- },
208
- "match": "(?x)\n\\G\n(TAG)\n(?:[ \\t]+\n((?:!(?:[0-9A-Za-z\\-]*!)?))\n(?:[ \\t]+ (\n! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )*\n| (?![,!\\[\\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+\n)\n)?\n)?\n"
209
- },
210
- {
211
- "captures": {
212
- "1": {
213
- "name": "support.other.directive.reserved.yaml"
214
- },
215
- "2": {
216
- "name": "string.unquoted.directive-name.yaml"
217
- },
218
- "3": {
219
- "name": "string.unquoted.directive-parameter.yaml"
220
- }
221
- },
222
- "match": "(?x) \\G (\\w+) (?:[ \\t]+ (\\w+) (?:[ \\t]+ (\\w+))? )?"
223
- },
224
- {
225
- "match": "\\S+",
226
- "name": "invalid.illegal.unrecognized.yaml"
227
- }
228
- ]
229
- },
230
- "flow-alias": {
231
- "captures": {
232
- "1": {
233
- "name": "keyword.control.flow.alias.yaml"
234
- },
235
- "2": {
236
- "name": "punctuation.definition.alias.yaml"
237
- },
238
- "3": {
239
- "name": "variable.other.alias.yaml"
240
- },
241
- "4": {
242
- "name": "invalid.illegal.character.anchor.yaml"
243
- }
244
- },
245
- "match": "((\\*))([^\\s\\[\\]/{/},]+)([^\\s\\]},]\\S*)?"
246
- },
247
- "flow-collection": {
248
- "patterns": [
249
- {
250
- "include": "#flow-sequence"
251
- },
252
- {
253
- "include": "#flow-mapping"
254
- }
255
- ]
256
- },
257
- "flow-mapping": {
258
- "begin": "\\{",
259
- "beginCaptures": {
260
- "0": {
261
- "name": "punctuation.definition.mapping.begin.yaml"
262
- }
263
- },
264
- "end": "\\}",
265
- "endCaptures": {
266
- "0": {
267
- "name": "punctuation.definition.mapping.end.yaml"
268
- }
269
- },
270
- "name": "meta.flow-mapping.yaml",
271
- "patterns": [
272
- {
273
- "include": "#prototype"
274
- },
275
- {
276
- "match": ",",
277
- "name": "punctuation.separator.mapping.yaml"
278
- },
279
- {
280
- "include": "#flow-pair"
281
- }
282
- ]
283
- },
284
- "flow-node": {
285
- "patterns": [
286
- {
287
- "include": "#prototype"
288
- },
289
- {
290
- "include": "#flow-alias"
291
- },
292
- {
293
- "include": "#flow-collection"
294
- },
295
- {
296
- "include": "#flow-scalar"
297
- }
298
- ]
299
- },
300
- "flow-pair": {
301
- "patterns": [
302
- {
303
- "begin": "\\?",
304
- "beginCaptures": {
305
- "0": {
306
- "name": "punctuation.definition.key-value.begin.yaml"
307
- }
308
- },
309
- "end": "(?=[},\\]])",
310
- "name": "meta.flow-pair.explicit.yaml",
311
- "patterns": [
312
- {
313
- "include": "#prototype"
314
- },
315
- {
316
- "include": "#flow-pair"
317
- },
318
- {
319
- "include": "#flow-node"
320
- },
321
- {
322
- "begin": ":(?=\\s|$|[\\[\\]{},])",
323
- "beginCaptures": {
324
- "0": {
325
- "name": "punctuation.separator.key-value.mapping.yaml"
326
- }
327
- },
328
- "end": "(?=[},\\]])",
329
- "patterns": [
330
- {
331
- "include": "#flow-value"
332
- }
333
- ]
334
- }
335
- ]
336
- },
337
- {
338
- "begin": "(?x)\n(?=\n(?:\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] [^\\s[\\[\\]{},]]\n)\n(\n[^\\s:[\\[\\]{},]]\n| : [^\\s[\\[\\]{},]]\n| \\s+ (?![#\\s])\n)*\n\\s*\n:\n(\\s|$)\n)\n",
339
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n| \\s* : [\\[\\]{},]\n| \\s* [\\[\\]{},]\n)\n",
340
- "name": "meta.flow-pair.key.yaml",
341
- "patterns": [
342
- {
343
- "include": "#flow-scalar-plain-in-implicit-type"
344
- },
345
- {
346
- "begin": "(?x)\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] [^\\s[\\[\\]{},]]\n",
347
- "beginCaptures": {
348
- "0": {
349
- "name": "entity.name.tag.yaml"
350
- }
351
- },
352
- "contentName": "entity.name.tag.yaml",
353
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n| \\s* : [\\[\\]{},]\n| \\s* [\\[\\]{},]\n)\n",
354
- "name": "string.unquoted.plain.in.yaml"
355
- }
356
- ]
357
- },
358
- {
359
- "include": "#flow-node"
360
- },
361
- {
362
- "begin": ":(?=\\s|$|[\\[\\]{},])",
363
- "captures": {
364
- "0": {
365
- "name": "punctuation.separator.key-value.mapping.yaml"
366
- }
367
- },
368
- "end": "(?=[},\\]])",
369
- "name": "meta.flow-pair.yaml",
370
- "patterns": [
371
- {
372
- "include": "#flow-value"
373
- }
374
- ]
375
- }
376
- ]
377
- },
378
- "flow-scalar": {
379
- "patterns": [
380
- {
381
- "include": "#flow-scalar-double-quoted"
382
- },
383
- {
384
- "include": "#flow-scalar-single-quoted"
385
- },
386
- {
387
- "include": "#flow-scalar-plain-in"
388
- }
389
- ]
390
- },
391
- "flow-scalar-double-quoted": {
392
- "begin": "\"",
393
- "beginCaptures": {
394
- "0": {
395
- "name": "punctuation.definition.string.begin.yaml"
396
- }
397
- },
398
- "end": "\"",
399
- "endCaptures": {
400
- "0": {
401
- "name": "punctuation.definition.string.end.yaml"
402
- }
403
- },
404
- "name": "string.quoted.double.yaml",
405
- "patterns": [
406
- {
407
- "match": "\\\\([0abtnvfre \"/\\\\N_Lp]|x\\d\\d|u\\d{4}|U\\d{8})",
408
- "name": "constant.character.escape.yaml"
409
- },
410
- {
411
- "match": "\\\\\\n",
412
- "name": "constant.character.escape.double-quoted.newline.yaml"
413
- }
414
- ]
415
- },
416
- "flow-scalar-plain-in": {
417
- "patterns": [
418
- {
419
- "include": "#flow-scalar-plain-in-implicit-type"
420
- },
421
- {
422
- "begin": "(?x)\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] [^\\s[\\[\\]{},]]\n",
423
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n| \\s* : [\\[\\]{},]\n| \\s* [\\[\\]{},]\n)\n",
424
- "name": "string.unquoted.plain.in.yaml"
425
- }
426
- ]
427
- },
428
- "flow-scalar-plain-in-implicit-type": {
429
- "patterns": [
430
- {
431
- "captures": {
432
- "1": {
433
- "name": "constant.language.null.yaml"
434
- },
435
- "2": {
436
- "name": "constant.language.boolean.yaml"
437
- },
438
- "3": {
439
- "name": "constant.numeric.integer.yaml"
440
- },
441
- "4": {
442
- "name": "constant.numeric.float.yaml"
443
- },
444
- "5": {
445
- "name": "constant.other.timestamp.yaml"
446
- },
447
- "6": {
448
- "name": "constant.language.value.yaml"
449
- },
450
- "7": {
451
- "name": "constant.language.merge.yaml"
452
- }
453
- },
454
- "match": "(?x)\n(?x:\n(null|Null|NULL|~)\n| (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n| (\n(?:\n[-+]? 0b [0-1_]+\n| [-+]? 0 [0-7_]+\n| [-+]? (?: 0|[1-9][0-9_]*)\n| [-+]? 0x [0-9a-fA-F_]+\n| [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+\n)\n)\n| (\n(?x:\n[-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)?\n| [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]*\n| [-+]? \\. (?: inf|Inf|INF)\n| \\. (?: nan|NaN|NAN)\n)\n)\n| (\n(?x:\n\\d{4} - \\d{2} - \\d{2}\n| \\d{4}\n- \\d{1,2}\n- \\d{1,2}\n(?: [Tt] | [ \\t]+) \\d{1,2}\n: \\d{2}\n: \\d{2}\n(?: \\.\\d*)?\n(?:\n(?:[ \\t]*) Z\n| [-+] \\d{1,2} (?: :\\d{1,2})?\n)?\n)\n)\n| (=)\n| (<<)\n)\n(?:\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n| \\s* : [\\[\\]{},]\n| \\s* [\\[\\]{},]\n)\n)\n"
455
- }
456
- ]
457
- },
458
- "flow-scalar-plain-out": {
459
- "patterns": [
460
- {
461
- "include": "#flow-scalar-plain-out-implicit-type"
462
- },
463
- {
464
- "begin": "(?x)\n[^\\s[-?:,\\[\\]{}#&*!|>'\"%@`]]\n| [?:-] \\S\n",
465
- "end": "(?x)\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n)\n",
466
- "name": "string.unquoted.plain.out.yaml"
467
- }
468
- ]
469
- },
470
- "flow-scalar-plain-out-implicit-type": {
471
- "patterns": [
472
- {
473
- "captures": {
474
- "1": {
475
- "name": "constant.language.null.yaml"
476
- },
477
- "2": {
478
- "name": "constant.language.boolean.yaml"
479
- },
480
- "3": {
481
- "name": "constant.numeric.integer.yaml"
482
- },
483
- "4": {
484
- "name": "constant.numeric.float.yaml"
485
- },
486
- "5": {
487
- "name": "constant.other.timestamp.yaml"
488
- },
489
- "6": {
490
- "name": "constant.language.value.yaml"
491
- },
492
- "7": {
493
- "name": "constant.language.merge.yaml"
494
- }
495
- },
496
- "match": "(?x)\n(?x:\n(null|Null|NULL|~)\n| (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)\n| (\n(?:\n[-+]? 0b [0-1_]+\n| [-+]? 0 [0-7_]+\n| [-+]? (?: 0|[1-9][0-9_]*)\n| [-+]? 0x [0-9a-fA-F_]+\n| [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+\n)\n)\n| (\n(?x:\n[-+]? (?: [0-9] [0-9_]*)? \\. [0-9.]* (?: [eE] [-+] [0-9]+)?\n| [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \\. [0-9_]*\n| [-+]? \\. (?: inf|Inf|INF)\n| \\. (?: nan|NaN|NAN)\n)\n)\n| (\n(?x:\n\\d{4} - \\d{2} - \\d{2}\n| \\d{4}\n- \\d{1,2}\n- \\d{1,2}\n(?: [Tt] | [ \\t]+) \\d{1,2}\n: \\d{2}\n: \\d{2}\n(?: \\.\\d*)?\n(?:\n(?:[ \\t]*) Z\n| [-+] \\d{1,2} (?: :\\d{1,2})?\n)?\n)\n)\n| (=)\n| (<<)\n)\n(?x:\n(?=\n\\s* $\n| \\s+ \\#\n| \\s* : (\\s|$)\n)\n)\n"
497
- }
498
- ]
499
- },
500
- "flow-scalar-single-quoted": {
501
- "begin": "'",
502
- "beginCaptures": {
503
- "0": {
504
- "name": "punctuation.definition.string.begin.yaml"
505
- }
506
- },
507
- "end": "'(?!')",
508
- "endCaptures": {
509
- "0": {
510
- "name": "punctuation.definition.string.end.yaml"
511
- }
512
- },
513
- "name": "string.quoted.single.yaml",
514
- "patterns": [
515
- {
516
- "match": "''",
517
- "name": "constant.character.escape.single-quoted.yaml"
518
- }
519
- ]
520
- },
521
- "flow-sequence": {
522
- "begin": "\\[",
523
- "beginCaptures": {
524
- "0": {
525
- "name": "punctuation.definition.sequence.begin.yaml"
526
- }
527
- },
528
- "end": "\\]",
529
- "endCaptures": {
530
- "0": {
531
- "name": "punctuation.definition.sequence.end.yaml"
532
- }
533
- },
534
- "name": "meta.flow-sequence.yaml",
535
- "patterns": [
536
- {
537
- "include": "#prototype"
538
- },
539
- {
540
- "match": ",",
541
- "name": "punctuation.separator.sequence.yaml"
542
- },
543
- {
544
- "include": "#flow-pair"
545
- },
546
- {
547
- "include": "#flow-node"
548
- }
549
- ]
550
- },
551
- "flow-value": {
552
- "patterns": [
553
- {
554
- "begin": "\\G(?![},\\]])",
555
- "end": "(?=[},\\]])",
556
- "name": "meta.flow-pair.value.yaml",
557
- "patterns": [
558
- {
559
- "include": "#flow-node"
560
- }
561
- ]
562
- }
563
- ]
564
- },
565
- "node": {
566
- "patterns": [
567
- {
568
- "include": "#block-node"
569
- }
570
- ]
571
- },
572
- "property": {
573
- "begin": "(?=!|&)",
574
- "end": "(?!\\G)",
575
- "name": "meta.property.yaml",
576
- "patterns": [
577
- {
578
- "captures": {
579
- "1": {
580
- "name": "keyword.control.property.anchor.yaml"
581
- },
582
- "2": {
583
- "name": "punctuation.definition.anchor.yaml"
584
- },
585
- "3": {
586
- "name": "entity.name.type.anchor.yaml"
587
- },
588
- "4": {
589
- "name": "invalid.illegal.character.anchor.yaml"
590
- }
591
- },
592
- "match": "\\G((&))([^\\s\\[\\]/{/},]+)(\\S+)?"
593
- },
594
- {
595
- "match": "(?x)\n\\G\n(?:\n! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]] )+ >\n| (?:!(?:[0-9A-Za-z\\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\\-#;/?:@&=+$_.~*'()] )+\n| !\n)\n(?=\\ |\\t|$)\n",
596
- "name": "storage.type.tag-handle.yaml"
597
- },
598
- {
599
- "match": "\\S+",
600
- "name": "invalid.illegal.tag-handle.yaml"
601
- }
602
- ]
603
- },
604
- "prototype": {
605
- "patterns": [
606
- {
607
- "include": "#comment"
608
- },
609
- {
610
- "include": "#property"
611
- }
612
- ]
11
+ "parity": {
12
+ "comment": "Yes... That is right. Due to the changes with \\x2028, \\x2029, \\x85 and 'tags'. This is all the code I was able to reuse between all versions 1.3, 1.2, 1.1 and 1.0"
613
13
  }
614
14
  },
615
15
  "scopeName": "source.yaml"
package/grammars/zig.json CHANGED
@@ -175,7 +175,7 @@
175
175
  "name": "keyword.operator.arithmetic.zig"
176
176
  },
177
177
  {
178
- "match": "(<<%?|>>|!|&|\\^|\\|)=?",
178
+ "match": "(<<%?|>>|!|~|&|\\^|\\|)=?",
179
179
  "name": "keyword.operator.bitwise.zig"
180
180
  },
181
181
  {