tm-grammars 1.2.1 → 1.3.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/NOTICE CHANGED
@@ -3289,7 +3289,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3289
3289
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3290
3290
 
3291
3291
  =========================================================================================================
3292
- Files: hcl.json
3292
+ Files: hcl.json, terraform.json
3293
3293
  License: https://raw.githubusercontent.com/hashicorp/syntax/main/LICENSE
3294
3294
  SPDX: MPL-2.0
3295
3295
  ---------------------------------------------------------------------------------------------------------
package/README.md CHANGED
@@ -176,6 +176,7 @@ import { grammars } from 'tm-grammars'
176
176
  | `system-verilog` | | [mshr-h/vscode-verilog-hdl-support](https://github.com/mshr-h/vscode-verilog-hdl-support/blob/dca87637e8789563ec5315794fdc5ef8ce498264/syntaxes/systemverilog.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/mshr-h/vscode-verilog-hdl-support/main/LICENSE) | | 18.47 kB |
177
177
  | `tasl` | | [underlay/vscode-tasl](https://github.com/underlay/vscode-tasl/blob/dde4b7c0b762c2e667584095362dd49ebfacece7/syntaxes/tasl.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/underlay/vscode-tasl/main/LICENSE) | | 3.21 kB |
178
178
  | `tcl` | | [sleutho/tcl](https://github.com/sleutho/tcl/blob/f18820ad14678bc033f0a35524820c90fe50f18b/syntaxes/tcl.tmLanguage) | | | 4.66 kB |
179
+ | `terraform` | `tf` `tfvars` | [hashicorp/syntax](https://github.com/hashicorp/syntax/blob/13b5b4f2832a27901f1391ce0264199065c01169/syntaxes/terraform.tmGrammar.json) | [MPL-2.0](https://raw.githubusercontent.com/hashicorp/syntax/main/LICENSE) | | 12.39 kB |
179
180
  | `tex` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/3c86ede5f554f6e196c832394e126b291a1de606/extensions/latex/syntaxes/TeX.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `r` | 7.85 kB |
180
181
  | `toml` | | [textmate/toml.tmbundle](https://github.com/textmate/toml.tmbundle/blob/e82b64c1e86396220786846201e9aa3f0a2d9ca2/Syntaxes/TOML.tmLanguage) | | | 6.26 kB |
181
182
  | `tsx` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/35d97bc7e439fce0f50f42074041ab2d8571b20a/extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | | 171.16 kB |
@@ -0,0 +1,803 @@
1
+ {
2
+ "displayName": "Terraform",
3
+ "fileTypes": [
4
+ "tf",
5
+ "tfvars"
6
+ ],
7
+ "name": "terraform",
8
+ "patterns": [
9
+ {
10
+ "include": "#comments"
11
+ },
12
+ {
13
+ "include": "#attribute_definition"
14
+ },
15
+ {
16
+ "include": "#block"
17
+ },
18
+ {
19
+ "include": "#expressions"
20
+ }
21
+ ],
22
+ "repository": {
23
+ "attribute_access": {
24
+ "begin": "\\.(?!\\*)",
25
+ "beginCaptures": {
26
+ "0": {
27
+ "name": "keyword.operator.accessor.hcl"
28
+ }
29
+ },
30
+ "comment": "Matches traversal attribute access such as .attr",
31
+ "end": "[[:alpha:]][\\w-]*|\\d*",
32
+ "endCaptures": {
33
+ "0": {
34
+ "patterns": [
35
+ {
36
+ "comment": "Attribute name",
37
+ "match": "(?!null|false|true)[[:alpha:]][\\w-]*",
38
+ "name": "variable.other.member.hcl"
39
+ },
40
+ {
41
+ "comment": "Optional attribute index",
42
+ "match": "\\d+",
43
+ "name": "constant.numeric.integer.hcl"
44
+ }
45
+ ]
46
+ }
47
+ }
48
+ },
49
+ "attribute_definition": {
50
+ "captures": {
51
+ "1": {
52
+ "name": "punctuation.section.parens.begin.hcl"
53
+ },
54
+ "2": {
55
+ "name": "variable.other.readwrite.hcl"
56
+ },
57
+ "3": {
58
+ "name": "punctuation.section.parens.end.hcl"
59
+ },
60
+ "4": {
61
+ "name": "keyword.operator.assignment.hcl"
62
+ }
63
+ },
64
+ "comment": "Identifier \"=\" with optional parens",
65
+ "match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",
66
+ "name": "variable.declaration.hcl"
67
+ },
68
+ "attribute_splat": {
69
+ "begin": "\\.",
70
+ "beginCaptures": {
71
+ "0": {
72
+ "name": "keyword.operator.accessor.hcl"
73
+ }
74
+ },
75
+ "comment": "Legacy attribute-only splat",
76
+ "end": "\\*",
77
+ "endCaptures": {
78
+ "0": {
79
+ "name": "keyword.operator.splat.hcl"
80
+ }
81
+ }
82
+ },
83
+ "block": {
84
+ "begin": "([\\w][\\-\\w]*)([\\s\\\"\\-\\w]*)(\\{)",
85
+ "beginCaptures": {
86
+ "1": {
87
+ "patterns": [
88
+ {
89
+ "comment": "Known block type",
90
+ "match": "\\bdata|check|import|locals|module|output|provider|resource|terraform|variable\\b",
91
+ "name": "entity.name.type.terraform"
92
+ },
93
+ {
94
+ "comment": "Unknown block type",
95
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
96
+ "name": "entity.name.type.hcl"
97
+ }
98
+ ]
99
+ },
100
+ "2": {
101
+ "patterns": [
102
+ {
103
+ "comment": "Block label",
104
+ "match": "[\\\"\\-\\w]+",
105
+ "name": "variable.other.enummember.hcl"
106
+ }
107
+ ]
108
+ },
109
+ "3": {
110
+ "name": "punctuation.section.block.begin.hcl"
111
+ }
112
+ },
113
+ "comment": "This will match Terraform blocks like `resource \"aws_instance\" \"web\" {` or `module {`",
114
+ "end": "\\}",
115
+ "endCaptures": {
116
+ "0": {
117
+ "name": "punctuation.section.block.end.hcl"
118
+ }
119
+ },
120
+ "name": "meta.block.hcl",
121
+ "patterns": [
122
+ {
123
+ "include": "#comments"
124
+ },
125
+ {
126
+ "include": "#attribute_definition"
127
+ },
128
+ {
129
+ "include": "#block"
130
+ },
131
+ {
132
+ "include": "#expressions"
133
+ }
134
+ ]
135
+ },
136
+ "block_inline_comments": {
137
+ "begin": "/\\*",
138
+ "captures": {
139
+ "0": {
140
+ "name": "punctuation.definition.comment.hcl"
141
+ }
142
+ },
143
+ "comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",
144
+ "end": "\\*/",
145
+ "name": "comment.block.hcl"
146
+ },
147
+ "brackets": {
148
+ "begin": "\\[",
149
+ "beginCaptures": {
150
+ "0": {
151
+ "name": "punctuation.section.brackets.begin.hcl"
152
+ }
153
+ },
154
+ "end": "\\]",
155
+ "endCaptures": {
156
+ "0": {
157
+ "name": "punctuation.section.brackets.end.hcl"
158
+ }
159
+ },
160
+ "patterns": [
161
+ {
162
+ "comment": "Splat operator",
163
+ "match": "\\*",
164
+ "name": "keyword.operator.splat.hcl"
165
+ },
166
+ {
167
+ "include": "#comma"
168
+ },
169
+ {
170
+ "include": "#comments"
171
+ },
172
+ {
173
+ "include": "#inline_for_expression"
174
+ },
175
+ {
176
+ "include": "#inline_if_expression"
177
+ },
178
+ {
179
+ "include": "#expressions"
180
+ },
181
+ {
182
+ "include": "#local_identifiers"
183
+ }
184
+ ]
185
+ },
186
+ "char_escapes": {
187
+ "comment": "Character Escapes",
188
+ "match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{4})",
189
+ "name": "constant.character.escape.hcl"
190
+ },
191
+ "comma": {
192
+ "comment": "Commas - used in certain expressions",
193
+ "match": "\\,",
194
+ "name": "punctuation.separator.hcl"
195
+ },
196
+ "comments": {
197
+ "patterns": [
198
+ {
199
+ "include": "#hash_line_comments"
200
+ },
201
+ {
202
+ "include": "#double_slash_line_comments"
203
+ },
204
+ {
205
+ "include": "#block_inline_comments"
206
+ }
207
+ ]
208
+ },
209
+ "double_slash_line_comments": {
210
+ "begin": "//",
211
+ "captures": {
212
+ "0": {
213
+ "name": "punctuation.definition.comment.hcl"
214
+ }
215
+ },
216
+ "comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
217
+ "end": "$\\n?",
218
+ "name": "comment.line.double-slash.hcl"
219
+ },
220
+ "expressions": {
221
+ "patterns": [
222
+ {
223
+ "include": "#literal_values"
224
+ },
225
+ {
226
+ "include": "#operators"
227
+ },
228
+ {
229
+ "include": "#tuple_for_expression"
230
+ },
231
+ {
232
+ "include": "#object_for_expression"
233
+ },
234
+ {
235
+ "include": "#brackets"
236
+ },
237
+ {
238
+ "include": "#objects"
239
+ },
240
+ {
241
+ "include": "#attribute_access"
242
+ },
243
+ {
244
+ "include": "#attribute_splat"
245
+ },
246
+ {
247
+ "include": "#functions"
248
+ },
249
+ {
250
+ "include": "#parens"
251
+ }
252
+ ]
253
+ },
254
+ "for_expression_body": {
255
+ "patterns": [
256
+ {
257
+ "comment": "in keyword",
258
+ "match": "\\bin\\b",
259
+ "name": "keyword.operator.word.hcl"
260
+ },
261
+ {
262
+ "comment": "if keyword",
263
+ "match": "\\bif\\b",
264
+ "name": "keyword.control.conditional.hcl"
265
+ },
266
+ {
267
+ "match": "\\:",
268
+ "name": "keyword.operator.hcl"
269
+ },
270
+ {
271
+ "include": "#expressions"
272
+ },
273
+ {
274
+ "include": "#comments"
275
+ },
276
+ {
277
+ "include": "#comma"
278
+ },
279
+ {
280
+ "include": "#local_identifiers"
281
+ }
282
+ ]
283
+ },
284
+ "functions": {
285
+ "begin": "(\\w+)(\\()",
286
+ "beginCaptures": {
287
+ "1": {
288
+ "patterns": [
289
+ {
290
+ "match": "\\b(abs|abspath|alltrue|anytrue|base64decode|base64encode|base64gzip|base64sha256|base64sha512|basename|bcrypt|can|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|cidrsubnets|coalesce|coalescelist|compact|concat|contains|csvdecode|dirname|distinct|element|endswith|file|filebase64|filebase64sha256|filebase64sha512|fileexists|filemd5|fileset|filesha1|filesha256|filesha512|flatten|floor|format|formatdate|formatlist|indent|index|join|jsondecode|jsonencode|keys|length|log|lookup|lower|matchkeys|max|md5|merge|min|nonsensitive|one|parseint|pathexpand|plantimestamp|pow|range|regex|regexall|replace|reverse|rsadecrypt|sensitive|setintersection|setproduct|setsubtract|setunion|sha1|sha256|sha512|signum|slice|sort|split|startswith|strcontains|strrev|substr|sum|templatefile|textdecodebase64|textencodebase64|timeadd|timecmp|timestamp|title|tobool|tolist|tomap|tonumber|toset|tostring|transpose|trim|trimprefix|trimspace|trimsuffix|try|upper|urlencode|uuid|uuidv5|values|yamldecode|yamlencode|zipmap)\\b",
291
+ "name": "support.function.builtin.terraform"
292
+ }
293
+ ]
294
+ },
295
+ "2": {
296
+ "name": "punctuation.section.parens.begin.hcl"
297
+ }
298
+ },
299
+ "comment": "Built-in function calls",
300
+ "end": "\\)",
301
+ "endCaptures": {
302
+ "0": {
303
+ "name": "punctuation.section.parens.end.hcl"
304
+ }
305
+ },
306
+ "name": "meta.function-call.hcl",
307
+ "patterns": [
308
+ {
309
+ "include": "#comments"
310
+ },
311
+ {
312
+ "include": "#expressions"
313
+ },
314
+ {
315
+ "include": "#comma"
316
+ }
317
+ ]
318
+ },
319
+ "hash_line_comments": {
320
+ "begin": "#",
321
+ "captures": {
322
+ "0": {
323
+ "name": "punctuation.definition.comment.hcl"
324
+ }
325
+ },
326
+ "comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
327
+ "end": "$\\n?",
328
+ "name": "comment.line.number-sign.hcl"
329
+ },
330
+ "hcl_type_keywords": {
331
+ "comment": "Type keywords known to HCL.",
332
+ "match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b",
333
+ "name": "storage.type.hcl"
334
+ },
335
+ "heredoc": {
336
+ "begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$",
337
+ "beginCaptures": {
338
+ "1": {
339
+ "name": "keyword.operator.heredoc.hcl"
340
+ },
341
+ "2": {
342
+ "name": "keyword.control.heredoc.hcl"
343
+ }
344
+ },
345
+ "comment": "String Heredoc",
346
+ "end": "^\\s*\\2\\s*$",
347
+ "endCaptures": {
348
+ "0": {
349
+ "name": "keyword.control.heredoc.hcl"
350
+ }
351
+ },
352
+ "name": "string.unquoted.heredoc.hcl",
353
+ "patterns": [
354
+ {
355
+ "include": "#string_interpolation"
356
+ }
357
+ ]
358
+ },
359
+ "inline_for_expression": {
360
+ "begin": "(for)\\b",
361
+ "beginCaptures": {
362
+ "1": {
363
+ "name": "keyword.control.hcl"
364
+ }
365
+ },
366
+ "end": "\\n",
367
+ "patterns": [
368
+ {
369
+ "match": "\\=\\>",
370
+ "name": "storage.type.function.hcl"
371
+ },
372
+ {
373
+ "include": "#for_expression_body"
374
+ }
375
+ ]
376
+ },
377
+ "inline_if_expression": {
378
+ "begin": "(if)\\b",
379
+ "beginCaptures": {
380
+ "1": {
381
+ "name": "keyword.control.conditional.hcl"
382
+ }
383
+ },
384
+ "end": "\\n",
385
+ "patterns": [
386
+ {
387
+ "include": "#expressions"
388
+ },
389
+ {
390
+ "include": "#comments"
391
+ },
392
+ {
393
+ "include": "#comma"
394
+ },
395
+ {
396
+ "include": "#local_identifiers"
397
+ }
398
+ ]
399
+ },
400
+ "language_constants": {
401
+ "comment": "Language Constants",
402
+ "match": "\\b(true|false|null)\\b",
403
+ "name": "constant.language.hcl"
404
+ },
405
+ "literal_values": {
406
+ "patterns": [
407
+ {
408
+ "include": "#numeric_literals"
409
+ },
410
+ {
411
+ "include": "#language_constants"
412
+ },
413
+ {
414
+ "include": "#string_literals"
415
+ },
416
+ {
417
+ "include": "#heredoc"
418
+ },
419
+ {
420
+ "include": "#hcl_type_keywords"
421
+ },
422
+ {
423
+ "include": "#named_value_references"
424
+ }
425
+ ]
426
+ },
427
+ "local_identifiers": {
428
+ "comment": "Local Identifiers",
429
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
430
+ "name": "variable.other.readwrite.hcl"
431
+ },
432
+ "named_value_references": {
433
+ "comment": "Constant values available only to Terraform.",
434
+ "match": "\\b(var|local|module|data|path|terraform)\\b",
435
+ "name": "variable.other.readwrite.terraform"
436
+ },
437
+ "numeric_literals": {
438
+ "patterns": [
439
+ {
440
+ "captures": {
441
+ "1": {
442
+ "name": "punctuation.separator.exponent.hcl"
443
+ }
444
+ },
445
+ "comment": "Integer, no fraction, optional exponent",
446
+ "match": "\\b\\d+([Ee][+-]?)\\d+\\b",
447
+ "name": "constant.numeric.float.hcl"
448
+ },
449
+ {
450
+ "captures": {
451
+ "1": {
452
+ "name": "punctuation.separator.decimal.hcl"
453
+ },
454
+ "2": {
455
+ "name": "punctuation.separator.exponent.hcl"
456
+ }
457
+ },
458
+ "comment": "Integer, fraction, optional exponent",
459
+ "match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",
460
+ "name": "constant.numeric.float.hcl"
461
+ },
462
+ {
463
+ "comment": "Integers",
464
+ "match": "\\b\\d+\\b",
465
+ "name": "constant.numeric.integer.hcl"
466
+ }
467
+ ]
468
+ },
469
+ "object_for_expression": {
470
+ "begin": "(\\{)\\s?(for)\\b",
471
+ "beginCaptures": {
472
+ "1": {
473
+ "name": "punctuation.section.braces.begin.hcl"
474
+ },
475
+ "2": {
476
+ "name": "keyword.control.hcl"
477
+ }
478
+ },
479
+ "end": "\\}",
480
+ "endCaptures": {
481
+ "0": {
482
+ "name": "punctuation.section.braces.end.hcl"
483
+ }
484
+ },
485
+ "patterns": [
486
+ {
487
+ "match": "\\=\\>",
488
+ "name": "storage.type.function.hcl"
489
+ },
490
+ {
491
+ "include": "#for_expression_body"
492
+ }
493
+ ]
494
+ },
495
+ "object_key_values": {
496
+ "patterns": [
497
+ {
498
+ "include": "#comments"
499
+ },
500
+ {
501
+ "include": "#literal_values"
502
+ },
503
+ {
504
+ "include": "#operators"
505
+ },
506
+ {
507
+ "include": "#tuple_for_expression"
508
+ },
509
+ {
510
+ "include": "#object_for_expression"
511
+ },
512
+ {
513
+ "include": "#heredoc"
514
+ },
515
+ {
516
+ "include": "#functions"
517
+ }
518
+ ]
519
+ },
520
+ "objects": {
521
+ "begin": "\\{",
522
+ "beginCaptures": {
523
+ "0": {
524
+ "name": "punctuation.section.braces.begin.hcl"
525
+ }
526
+ },
527
+ "end": "\\}",
528
+ "endCaptures": {
529
+ "0": {
530
+ "name": "punctuation.section.braces.end.hcl"
531
+ }
532
+ },
533
+ "name": "meta.braces.hcl",
534
+ "patterns": [
535
+ {
536
+ "include": "#comments"
537
+ },
538
+ {
539
+ "include": "#objects"
540
+ },
541
+ {
542
+ "include": "#inline_for_expression"
543
+ },
544
+ {
545
+ "include": "#inline_if_expression"
546
+ },
547
+ {
548
+ "captures": {
549
+ "1": {
550
+ "name": "meta.mapping.key.hcl variable.other.readwrite.hcl"
551
+ },
552
+ "2": {
553
+ "name": "keyword.operator.assignment.hcl",
554
+ "patterns": [
555
+ {
556
+ "match": "\\=\\>",
557
+ "name": "storage.type.function.hcl"
558
+ }
559
+ ]
560
+ }
561
+ },
562
+ "comment": "Literal, named object key",
563
+ "match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=\\>?)\\s*"
564
+ },
565
+ {
566
+ "captures": {
567
+ "0": {
568
+ "patterns": [
569
+ {
570
+ "include": "#named_value_references"
571
+ }
572
+ ]
573
+ },
574
+ "1": {
575
+ "name": "meta.mapping.key.hcl string.quoted.double.hcl"
576
+ },
577
+ "2": {
578
+ "name": "punctuation.definition.string.begin.hcl"
579
+ },
580
+ "3": {
581
+ "name": "punctuation.definition.string.end.hcl"
582
+ },
583
+ "4": {
584
+ "name": "keyword.operator.hcl"
585
+ }
586
+ },
587
+ "comment": "String object key",
588
+ "match": "\\b((\").*(\"))\\s*(\\=)\\s*"
589
+ },
590
+ {
591
+ "begin": "^\\s*\\(",
592
+ "beginCaptures": {
593
+ "0": {
594
+ "name": "punctuation.section.parens.begin.hcl"
595
+ }
596
+ },
597
+ "comment": "Computed object key (any expression between parens)",
598
+ "end": "(\\))\\s*(=|:)\\s*",
599
+ "endCaptures": {
600
+ "1": {
601
+ "name": "punctuation.section.parens.end.hcl"
602
+ },
603
+ "2": {
604
+ "name": "keyword.operator.hcl"
605
+ }
606
+ },
607
+ "name": "meta.mapping.key.hcl",
608
+ "patterns": [
609
+ {
610
+ "include": "#named_value_references"
611
+ },
612
+ {
613
+ "include": "#attribute_access"
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ "include": "#object_key_values"
619
+ }
620
+ ]
621
+ },
622
+ "operators": {
623
+ "patterns": [
624
+ {
625
+ "match": "\\>\\=",
626
+ "name": "keyword.operator.hcl"
627
+ },
628
+ {
629
+ "match": "\\<\\=",
630
+ "name": "keyword.operator.hcl"
631
+ },
632
+ {
633
+ "match": "\\=\\=",
634
+ "name": "keyword.operator.hcl"
635
+ },
636
+ {
637
+ "match": "\\!\\=",
638
+ "name": "keyword.operator.hcl"
639
+ },
640
+ {
641
+ "match": "\\+",
642
+ "name": "keyword.operator.arithmetic.hcl"
643
+ },
644
+ {
645
+ "match": "\\-",
646
+ "name": "keyword.operator.arithmetic.hcl"
647
+ },
648
+ {
649
+ "match": "\\*",
650
+ "name": "keyword.operator.arithmetic.hcl"
651
+ },
652
+ {
653
+ "match": "\\/",
654
+ "name": "keyword.operator.arithmetic.hcl"
655
+ },
656
+ {
657
+ "match": "\\%",
658
+ "name": "keyword.operator.arithmetic.hcl"
659
+ },
660
+ {
661
+ "match": "\\&\\&",
662
+ "name": "keyword.operator.logical.hcl"
663
+ },
664
+ {
665
+ "match": "\\|\\|",
666
+ "name": "keyword.operator.logical.hcl"
667
+ },
668
+ {
669
+ "match": "\\!",
670
+ "name": "keyword.operator.logical.hcl"
671
+ },
672
+ {
673
+ "match": "\\>",
674
+ "name": "keyword.operator.hcl"
675
+ },
676
+ {
677
+ "match": "\\<",
678
+ "name": "keyword.operator.hcl"
679
+ },
680
+ {
681
+ "match": "\\?",
682
+ "name": "keyword.operator.hcl"
683
+ },
684
+ {
685
+ "match": "\\.\\.\\.",
686
+ "name": "keyword.operator.hcl"
687
+ },
688
+ {
689
+ "match": "\\:"
690
+ }
691
+ ]
692
+ },
693
+ "parens": {
694
+ "begin": "\\(",
695
+ "beginCaptures": {
696
+ "0": {
697
+ "name": "punctuation.section.parens.begin.hcl"
698
+ }
699
+ },
700
+ "comment": "Parens - matched *after* function syntax",
701
+ "end": "\\)",
702
+ "endCaptures": {
703
+ "0": {
704
+ "name": "punctuation.section.parens.end.hcl"
705
+ }
706
+ },
707
+ "patterns": [
708
+ {
709
+ "include": "#comments"
710
+ },
711
+ {
712
+ "include": "#expressions"
713
+ }
714
+ ]
715
+ },
716
+ "string_interpolation": {
717
+ "begin": "(?<![%$])([%$]{)",
718
+ "beginCaptures": {
719
+ "1": {
720
+ "name": "keyword.other.interpolation.begin.hcl"
721
+ }
722
+ },
723
+ "comment": "String interpolation",
724
+ "end": "\\}",
725
+ "endCaptures": {
726
+ "0": {
727
+ "name": "keyword.other.interpolation.end.hcl"
728
+ }
729
+ },
730
+ "name": "meta.interpolation.hcl",
731
+ "patterns": [
732
+ {
733
+ "comment": "Trim left whitespace",
734
+ "match": "\\~\\s",
735
+ "name": "keyword.operator.template.left.trim.hcl"
736
+ },
737
+ {
738
+ "comment": "Trim right whitespace",
739
+ "match": "\\s\\~",
740
+ "name": "keyword.operator.template.right.trim.hcl"
741
+ },
742
+ {
743
+ "comment": "if/else/endif and for/in/endfor directives",
744
+ "match": "\\b(if|else|endif|for|in|endfor)\\b",
745
+ "name": "keyword.control.hcl"
746
+ },
747
+ {
748
+ "include": "#expressions"
749
+ },
750
+ {
751
+ "include": "#local_identifiers"
752
+ }
753
+ ]
754
+ },
755
+ "string_literals": {
756
+ "begin": "\"",
757
+ "beginCaptures": {
758
+ "0": {
759
+ "name": "punctuation.definition.string.begin.hcl"
760
+ }
761
+ },
762
+ "comment": "Strings",
763
+ "end": "\"",
764
+ "endCaptures": {
765
+ "0": {
766
+ "name": "punctuation.definition.string.end.hcl"
767
+ }
768
+ },
769
+ "name": "string.quoted.double.hcl",
770
+ "patterns": [
771
+ {
772
+ "include": "#string_interpolation"
773
+ },
774
+ {
775
+ "include": "#char_escapes"
776
+ }
777
+ ]
778
+ },
779
+ "tuple_for_expression": {
780
+ "begin": "(\\[)\\s?(for)\\b",
781
+ "beginCaptures": {
782
+ "1": {
783
+ "name": "punctuation.section.brackets.begin.hcl"
784
+ },
785
+ "2": {
786
+ "name": "keyword.control.hcl"
787
+ }
788
+ },
789
+ "end": "\\]",
790
+ "endCaptures": {
791
+ "0": {
792
+ "name": "punctuation.section.brackets.end.hcl"
793
+ }
794
+ },
795
+ "patterns": [
796
+ {
797
+ "include": "#for_expression_body"
798
+ }
799
+ ]
800
+ }
801
+ },
802
+ "scopeName": "source.hcl.terraform"
803
+ }
package/grammars/zig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "displayName": "zig",
2
+ "displayName": "Zig",
3
3
  "fileTypes": [
4
4
  "zig",
5
5
  "zon"
package/index.js CHANGED
@@ -2477,6 +2477,21 @@ export const grammars = [
2477
2477
  sha: 'f18820ad14678bc033f0a35524820c90fe50f18b',
2478
2478
  source: 'https://github.com/sleutho/tcl/blob/f18820ad14678bc033f0a35524820c90fe50f18b/syntaxes/tcl.tmLanguage',
2479
2479
  },
2480
+ {
2481
+ aliases: [
2482
+ 'tf',
2483
+ 'tfvars',
2484
+ ],
2485
+ byteSize: 12683,
2486
+ displayName: 'Terraform',
2487
+ lastUpdate: '2023-06-22T13:43:10Z',
2488
+ license: 'MPL-2.0',
2489
+ licenseUrl: 'https://raw.githubusercontent.com/hashicorp/syntax/main/LICENSE',
2490
+ name: 'terraform',
2491
+ scopeName: 'source.hcl.terraform',
2492
+ sha: '13b5b4f2832a27901f1391ce0264199065c01169',
2493
+ source: 'https://github.com/hashicorp/syntax/blob/13b5b4f2832a27901f1391ce0264199065c01169/syntaxes/terraform.tmGrammar.json',
2494
+ },
2480
2495
  {
2481
2496
  byteSize: 8039,
2482
2497
  categories: [
@@ -2828,7 +2843,7 @@ export const grammars = [
2828
2843
  categories: [
2829
2844
  'general',
2830
2845
  ],
2831
- displayName: 'zig',
2846
+ displayName: 'Zig',
2832
2847
  lastUpdate: '2023-10-11T06:24:26Z',
2833
2848
  license: 'MIT',
2834
2849
  licenseUrl: 'https://raw.githubusercontent.com/ziglang/vscode-zig/master/LICENSE',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tm-grammars",
3
3
  "type": "module",
4
- "version": "1.2.1",
4
+ "version": "1.3.0",
5
5
  "packageManager": "pnpm@8.15.1",
6
6
  "description": "Collecton of TextMate grammars in JSON",
7
7
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",