github-linguist 7.7.0 → 7.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/hidden.manref.json +1 -1
  3. data/grammars/source.4dm.json +1029 -0
  4. data/grammars/source.agda.json +32 -202
  5. data/grammars/source.clarion.json +6 -6
  6. data/grammars/source.dircolors.json +101 -3
  7. data/grammars/source.editorconfig.json +23 -5
  8. data/grammars/source.elm.json +1 -1
  9. data/grammars/source.emacs.lisp.json +10 -0
  10. data/grammars/source.faust.json +119 -0
  11. data/grammars/source.gcode.json +170 -8
  12. data/grammars/source.hlsl.json +9 -5
  13. data/grammars/source.hx.json +4 -0
  14. data/grammars/source.igor.json +44 -0
  15. data/grammars/source.julia.json +8 -4
  16. data/grammars/source.mcfunction-snapshot.json +1 -1
  17. data/grammars/source.meson.json +1 -1
  18. data/grammars/source.odin-ehr.json +806 -0
  19. data/grammars/source.odin.json +402 -0
  20. data/grammars/source.p4.json +5 -21
  21. data/grammars/source.scala.json +27 -3
  22. data/grammars/source.sy.json +2088 -183
  23. data/grammars/source.terraform.json +576 -132
  24. data/grammars/source.ts.json +89 -30
  25. data/grammars/source.tsx.json +89 -30
  26. data/grammars/source.v.json +541 -788
  27. data/grammars/source.viml.json +2 -2
  28. data/grammars/source.webassembly.json +10 -0
  29. data/grammars/version +1 -1
  30. data/lib/linguist/VERSION +1 -1
  31. data/lib/linguist/generated.rb +10 -1
  32. data/lib/linguist/heuristics.yml +41 -3
  33. data/lib/linguist/languages.json +1 -1
  34. data/lib/linguist/languages.yml +117 -34
  35. data/lib/linguist/lazy_blob.rb +10 -10
  36. data/lib/linguist/linguist.bundle +0 -0
  37. data/lib/linguist/samples.json +6577 -1979
  38. data/lib/linguist/vendor.yml +3 -0
  39. metadata +6 -6
  40. data/grammars/source.LS.json +0 -85
  41. data/grammars/source.MCPOST.json +0 -54
  42. data/grammars/source.MOD.json +0 -55
  43. data/grammars/source.apt.json +0 -18
@@ -3,248 +3,692 @@
3
3
  "scopeName": "source.terraform",
4
4
  "patterns": [
5
5
  {
6
- "name": "comment.line.number-sign.terraform",
7
- "begin": "#|//",
8
- "end": "$\\n?",
9
- "captures": {
6
+ "include": "#comments"
7
+ },
8
+ {
9
+ "include": "#top_level_attribute_definition"
10
+ },
11
+ {
12
+ "include": "#imports"
13
+ },
14
+ {
15
+ "include": "#block"
16
+ },
17
+ {
18
+ "include": "#expressions"
19
+ }
20
+ ],
21
+ "repository": {
22
+ "attribute_access": {
23
+ "begin": "\\.",
24
+ "end": "(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)|(\\*)|(\\d+)",
25
+ "beginCaptures": {
10
26
  "0": {
11
- "name": "punctuation.definition.comment.terraform"
27
+ "name": "keyword.operator.accessor.terraform"
28
+ }
29
+ },
30
+ "endCaptures": {
31
+ "1": {
32
+ "name": "variable.other.member.terraform"
33
+ },
34
+ "2": {
35
+ "name": "keyword.operator.splat.terraform"
36
+ },
37
+ "3": {
38
+ "name": "constant.numeric.integer.terraform"
12
39
  }
13
40
  }
14
41
  },
15
- {
42
+ "block": {
43
+ "name": "meta.type.terraform",
44
+ "begin": "(\\b(resource|provider|variable|output|locals|module|data|terraform)\\b|(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(?=[\\s\\\"\\-[:word:]]*(\\{))",
45
+ "end": "(?=\\{)",
46
+ "patterns": [
47
+ {
48
+ "name": "string.quoted.double.terraform",
49
+ "begin": "\\\"",
50
+ "end": "\\\"",
51
+ "beginCaptures": {
52
+ "0": {
53
+ "name": "punctuation.definition.string.begin.terraform"
54
+ }
55
+ },
56
+ "endCaptures": {
57
+ "0": {
58
+ "name": "punctuation.definition.string.end.terraform"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "name": "entity.name.label.terraform",
64
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"
65
+ }
66
+ ],
67
+ "beginCaptures": {
68
+ "2": {
69
+ "name": "storage.type.terraform"
70
+ },
71
+ "3": {
72
+ "name": "entity.name.type.terraform"
73
+ }
74
+ }
75
+ },
76
+ "block_comments": {
16
77
  "name": "comment.block.terraform",
17
78
  "begin": "/\\*",
18
79
  "end": "\\*/",
19
- "captures": {
80
+ "beginCaptures": {
81
+ "0": {
82
+ "name": "punctuation.definition.comment.terraform"
83
+ }
84
+ },
85
+ "endCaptures": {
20
86
  "0": {
21
87
  "name": "punctuation.definition.comment.terraform"
22
88
  }
23
89
  }
24
90
  },
25
- {
26
- "name": "constant.language.terraform",
27
- "match": "\\b(true|false|yes|no|on|off)\\b"
28
- },
29
- {
30
- "name": "constant.numeric.terraform",
31
- "match": "\\b([0-9]+)([kKmMgG]b?)?\\b"
91
+ "brackets": {
92
+ "begin": "\\[",
93
+ "end": "(\\*)?\\]",
94
+ "patterns": [
95
+ {
96
+ "include": "#comma"
97
+ },
98
+ {
99
+ "include": "#comments"
100
+ },
101
+ {
102
+ "include": "#expressions"
103
+ },
104
+ {
105
+ "include": "#tuple_for_expression"
106
+ }
107
+ ],
108
+ "beginCaptures": {
109
+ "0": {
110
+ "name": "punctuation.section.brackets.begin.terraform"
111
+ }
112
+ },
113
+ "endCaptures": {
114
+ "0": {
115
+ "name": "punctuation.section.brackets.end.terraform"
116
+ },
117
+ "1": {
118
+ "name": "keyword.operator.splat.terraform"
119
+ }
120
+ }
32
121
  },
33
- {
34
- "name": "constant.numeric.terraform",
35
- "match": "\\b(0x[0-9A-Fa-f]+)([kKmMgG]b?)?\\b"
122
+ "comma": {
123
+ "name": "punctuation.separator.terraform",
124
+ "match": "\\,"
36
125
  },
37
- {
38
- "name": "meta.resource.terraform",
39
- "match": "(resource|data)\\s+(\")?(\\w+)(\")?\\s+(\")?([\\w\\-]+)(\")?\\s+({)",
40
- "captures": {
41
- "1": {
42
- "name": "storage.type.function.terraform"
126
+ "comments": {
127
+ "patterns": [
128
+ {
129
+ "include": "#inline_comments"
43
130
  },
44
- "2": {
45
- "name": "string.terraform punctuation.definition.string.begin.terraform"
131
+ {
132
+ "include": "#block_comments"
133
+ }
134
+ ]
135
+ },
136
+ "expressions": {
137
+ "patterns": [
138
+ {
139
+ "include": "#literal_values"
46
140
  },
47
- "3": {
48
- "name": "string.value.terraform"
141
+ {
142
+ "include": "#operators"
49
143
  },
50
- "4": {
51
- "name": "string.terraform punctuation.definition.string.end.terraform"
144
+ {
145
+ "include": "#brackets"
52
146
  },
53
- "5": {
54
- "name": "string.terraform punctuation.definition.string.begin.terraform"
147
+ {
148
+ "include": "#objects"
55
149
  },
56
- "6": {
57
- "name": "string.value.terraform"
150
+ {
151
+ "include": "#attribute_access"
58
152
  },
59
- "7": {
60
- "name": "string.terraform punctuation.definition.string.end.terraform"
153
+ {
154
+ "include": "#functions"
61
155
  },
62
- "8": {
63
- "name": "punctuation.definition.tag.terraform"
156
+ {
157
+ "include": "#parens"
64
158
  }
65
- }
159
+ ]
66
160
  },
67
- {
68
- "match": "(provider|provisioner|variable|output|module|atlas)\\s+(\")?([\\w\\-]+)(\")?\\s+({)",
69
- "captures": {
70
- "1": {
71
- "name": "storage.type.function.terraform"
161
+ "functions": {
162
+ "name": "meta.function-call.terraform",
163
+ "begin": "((abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)|\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b))(\\()",
164
+ "end": "\\)",
165
+ "patterns": [
166
+ {
167
+ "include": "#comments"
72
168
  },
169
+ {
170
+ "include": "#expressions"
171
+ },
172
+ {
173
+ "include": "#comma"
174
+ }
175
+ ],
176
+ "beginCaptures": {
73
177
  "2": {
74
- "name": "string.terraform punctuation.definition.string.begin.terraform"
178
+ "name": "support.function.builtin.terraform"
75
179
  },
76
180
  "3": {
77
- "name": "string.value.terraform"
181
+ "name": "variable.function.terraform"
78
182
  },
79
183
  "4": {
80
- "name": "string.terraform punctuation.definition.string.end.terraform"
81
- },
82
- "5": {
83
- "name": "punctuation.definition.tag.terraform"
184
+ "name": "punctuation.section.parens.begin.terraform"
185
+ }
186
+ },
187
+ "endCaptures": {
188
+ "0": {
189
+ "name": "punctuation.section.parens.end.terraform"
84
190
  }
85
191
  }
86
192
  },
87
- {
88
- "match": "([\\w_-]+)\\s*(=)\\s*",
89
- "captures": {
193
+ "heredoc": {
194
+ "name": "string.unquoted.heredoc.terraform",
195
+ "begin": "(\\\u003c\\\u003c\\-?)\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*$",
196
+ "end": "^\\s*\\2\\s*$",
197
+ "patterns": [
198
+ {
199
+ "include": "#string_interpolation"
200
+ }
201
+ ],
202
+ "beginCaptures": {
90
203
  "1": {
91
- "name": "variable.other.assignment.terraform"
204
+ "name": "keyword.operator.heredoc.terraform"
92
205
  },
93
206
  "2": {
94
- "name": "keyword.operator.terraform"
207
+ "name": "keyword.control.heredoc.terraform"
208
+ }
209
+ },
210
+ "endCaptures": {
211
+ "0": {
212
+ "name": "keyword.control.heredoc.terraform"
95
213
  }
96
214
  }
97
215
  },
98
- {
99
- "match": "(\")([\\w_-]+)(\")\\s*(=)\\s*",
100
- "captures": {
101
- "1": {
102
- "name": "punctuation.quote.double.terraform"
216
+ "imports": {
217
+ "begin": "\\s*(terraform)\\s*(import)\\s*",
218
+ "end": "$\\n?",
219
+ "patterns": [
220
+ {
221
+ "include": "#string_literals"
103
222
  },
104
- "2": {
105
- "name": "variable.assignment.terraform"
223
+ {
224
+ "name": "entity.name.label.terraform",
225
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"
106
226
  },
107
- "3": {
108
- "name": "punctuation.quote.double.terraform"
227
+ {
228
+ "include": "#numeric_literals"
109
229
  },
110
- "4": {
111
- "name": "keyword.operator.terraform"
230
+ {
231
+ "include": "#attribute_access"
112
232
  }
113
- }
114
- },
115
- {
116
- "match": "([\\w\\-_]+)\\s+({)",
117
- "captures": {
233
+ ],
234
+ "beginCaptures": {
118
235
  "1": {
119
- "name": "entity.name.section.terraform"
236
+ "name": "support.constant.terraform"
120
237
  },
121
238
  "2": {
122
- "name": "punctuation.definition.tag.terraform"
239
+ "name": "keyword.control.import.terraform"
123
240
  }
124
241
  }
125
242
  },
126
- {
127
- "include": "#strings"
128
- },
129
- {
130
- "name": "string.unquoted.heredoc.terraform",
131
- "begin": "(?\u003e\\s*\u003c\u003c(\\w+))",
132
- "end": "^\\s*\\1$",
243
+ "inline_comments": {
244
+ "name": "comment.line.terraform",
245
+ "begin": "#|//",
246
+ "end": "$\n?",
133
247
  "beginCaptures": {
134
248
  "0": {
135
- "name": "punctuation.definition.string.begin.terraform"
249
+ "name": "punctuation.definition.comment.terraform"
250
+ }
251
+ }
252
+ },
253
+ "language_constants": {
254
+ "name": "constant.language.terraform",
255
+ "match": "\\b(true|false|null)\\b"
256
+ },
257
+ "literal_values": {
258
+ "patterns": [
259
+ {
260
+ "include": "#numeric_literals"
136
261
  },
137
- "1": {
138
- "name": "keyword.operator.heredoc.terraform"
262
+ {
263
+ "include": "#language_constants"
264
+ },
265
+ {
266
+ "include": "#string_literals"
267
+ },
268
+ {
269
+ "include": "#heredoc"
270
+ },
271
+ {
272
+ "include": "#type_keywords"
273
+ },
274
+ {
275
+ "include": "#named_value_references"
139
276
  }
140
- },
141
- "endCaptures": {
277
+ ]
278
+ },
279
+ "main": {
280
+ "patterns": [
281
+ {
282
+ "include": "#comments"
283
+ },
284
+ {
285
+ "include": "#block"
286
+ },
287
+ {
288
+ "include": "#expressions"
289
+ }
290
+ ]
291
+ },
292
+ "named_value_references": {
293
+ "name": "support.constant.terraform",
294
+ "match": "\\b(var|local|module|data|path|terraform)\\b"
295
+ },
296
+ "numeric_literals": {
297
+ "patterns": [
298
+ {
299
+ "name": "constant.numeric.float.terraform",
300
+ "match": "\\b\\d+(([Ee][+-]?))\\d+\\b",
301
+ "captures": {
302
+ "1": {
303
+ "name": "punctuation.separator.exponent.terraform"
304
+ }
305
+ }
306
+ },
307
+ {
308
+ "name": "constant.numeric.float.terraform",
309
+ "match": "\\b\\d+(\\.)\\d+(?:(([Ee][+-]?))\\d+)?\\b",
310
+ "captures": {
311
+ "1": {
312
+ "name": "punctuation.separator.decimal.terraform"
313
+ },
314
+ "2": {
315
+ "name": "punctuation.separator.exponent.terraform"
316
+ }
317
+ }
318
+ },
319
+ {
320
+ "name": "constant.numeric.integer.terraform",
321
+ "match": "\\b\\d+\\b"
322
+ }
323
+ ]
324
+ },
325
+ "object_for_expression": {
326
+ "begin": "\\bfor\\b",
327
+ "end": "(?=\\})",
328
+ "patterns": [
329
+ {
330
+ "name": "storage.type.function.terraform",
331
+ "match": "\\=\\\u003e"
332
+ },
333
+ {
334
+ "name": "keyword.operator.word.terraform",
335
+ "match": "\\bin\\b"
336
+ },
337
+ {
338
+ "name": "keyword.control.conditional.terraform",
339
+ "match": "\\bif\\b"
340
+ },
341
+ {
342
+ "name": "keyword.operator.terraform",
343
+ "match": "\\:"
344
+ },
345
+ {
346
+ "include": "#expressions"
347
+ },
348
+ {
349
+ "include": "#comments"
350
+ },
351
+ {
352
+ "include": "#comma"
353
+ },
354
+ {
355
+ "name": "variable.other.readwrite.terraform",
356
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"
357
+ }
358
+ ],
359
+ "beginCaptures": {
142
360
  "0": {
143
- "name": "punctuation.definition.string.end.terraform keyword.operator.heredoc.terraform"
361
+ "name": "keyword.control.terraform"
144
362
  }
145
363
  }
146
- }
147
- ],
148
- "repository": {
149
- "string_interpolation": {
364
+ },
365
+ "object_key_values": {
150
366
  "patterns": [
151
367
  {
152
- "name": "source.terraform.embedded.source",
153
- "begin": "\\$\\{",
154
- "end": "\\}",
368
+ "include": "#comments"
369
+ },
370
+ {
371
+ "include": "#expressions"
372
+ }
373
+ ]
374
+ },
375
+ "objects": {
376
+ "name": "meta.braces.terraform",
377
+ "begin": "\\{",
378
+ "end": "\\}",
379
+ "patterns": [
380
+ {
381
+ "include": "#object_for_expression"
382
+ },
383
+ {
384
+ "include": "#comments"
385
+ },
386
+ {
387
+ "begin": "\\s*(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)\\s*(\\=)\\s*",
388
+ "end": "((\\,)|($\\n?)|(?=\\}))",
155
389
  "patterns": [
156
390
  {
157
- "include": "$self"
391
+ "include": "#object_key_values"
392
+ }
393
+ ],
394
+ "beginCaptures": {
395
+ "1": {
396
+ "name": "meta.mapping.key.terraform string.unquoted.terraform"
158
397
  },
159
- {
160
- "include": "#string_interpolation_functions"
398
+ "2": {
399
+ "name": "keyword.operator.terraform"
400
+ }
401
+ },
402
+ "endCaptures": {
403
+ "1": {
404
+ "name": "punctuation.separator.terraform"
161
405
  },
406
+ "3": {
407
+ "name": "punctuation.section.braces.end.terraform"
408
+ }
409
+ }
410
+ },
411
+ {
412
+ "begin": "((\\\").*(\\\"))\\s*(\\=)\\s*",
413
+ "end": "((\\,)|($\\n?)|(?=\\}))",
414
+ "patterns": [
162
415
  {
163
- "include": "#string_interpolation_keywords"
416
+ "include": "#object_key_values"
417
+ }
418
+ ],
419
+ "beginCaptures": {
420
+ "1": {
421
+ "name": "meta.mapping.key.terraform string.quoted.double.terraform"
164
422
  },
165
- {
166
- "match": "(\\.)",
167
- "captures": {
168
- "0": {
169
- "name": "keyword.control.period.terraform"
170
- }
171
- }
423
+ "2": {
424
+ "name": "punctuation.definition.string.begin.terraform"
425
+ },
426
+ "3": {
427
+ "name": "punctuation.definition.string.end.terraform"
428
+ },
429
+ "4": {
430
+ "name": "keyword.operator.terraform"
431
+ }
432
+ },
433
+ "endCaptures": {
434
+ "1": {
435
+ "name": "punctuation.separator.terraform"
172
436
  },
437
+ "3": {
438
+ "name": "punctuation.section.braces.end.terraform"
439
+ }
440
+ }
441
+ },
442
+ {
443
+ "name": "meta.mapping.key.terraform",
444
+ "begin": "\\(",
445
+ "end": "(\\))\\s*(\\=)\\s*",
446
+ "patterns": [
173
447
  {
174
- "include": "#strings"
448
+ "include": "#expressions"
175
449
  }
176
450
  ],
177
451
  "beginCaptures": {
178
452
  "0": {
179
- "name": "entity.tag.embedded.start.terraform"
453
+ "name": "punctuation.section.parens.begin.terraform"
180
454
  }
181
455
  },
182
456
  "endCaptures": {
183
- "0": {
184
- "name": "entity.tag.embedded.end.terraform"
457
+ "1": {
458
+ "name": "punctuation.section.parens.end.terraform"
459
+ },
460
+ "2": {
461
+ "name": "keyword.operator.terraform"
185
462
  }
186
463
  }
464
+ },
465
+ {
466
+ "patterns": [
467
+ {
468
+ "include": "#main"
469
+ }
470
+ ]
187
471
  }
188
- ]
472
+ ],
473
+ "beginCaptures": {
474
+ "0": {
475
+ "name": "punctuation.section.braces.begin.terraform"
476
+ }
477
+ },
478
+ "endCaptures": {
479
+ "0": {
480
+ "name": "punctuation.section.braces.end.terraform"
481
+ }
482
+ }
189
483
  },
190
- "string_interpolation_functions": {
191
- "begin": "(base64decode|base64encode|base64gzip|base64sha256|base64sha512|basename|bcrypt|ceil|chomp|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|flatten|floor|format|formatlist|index|join|jsonencode|keys|length|list|log|lookup|lower|map|matchkeys|max|md5|merge|min|pathexpand|pow|replace|sha1|sha256|sha512|signum|slice|sort|split|substr|timestamp|title|trimspace|upper|urlencode|uuid|values|zipmap)(\\()",
192
- "end": "(\\))",
484
+ "operators": {
193
485
  "patterns": [
194
486
  {
195
- "include": "#string_interpolation_functions"
487
+ "name": "keyword.operator.terraform",
488
+ "match": "\\\u003e\\="
196
489
  },
197
490
  {
198
- "include": "#string_interpolation_keywords"
491
+ "name": "keyword.operator.terraform",
492
+ "match": "\\\u003c\\="
199
493
  },
200
494
  {
201
- "include": "#strings"
495
+ "name": "keyword.operator.terraform",
496
+ "match": "\\=\\="
497
+ },
498
+ {
499
+ "name": "keyword.operator.terraform",
500
+ "match": "\\!\\="
501
+ },
502
+ {
503
+ "name": "keyword.operator.arithmetic.terraform",
504
+ "match": "\\+"
505
+ },
506
+ {
507
+ "name": "keyword.operator.arithmetic.terraform",
508
+ "match": "\\-"
509
+ },
510
+ {
511
+ "name": "keyword.operator.arithmetic.terraform",
512
+ "match": "\\*"
513
+ },
514
+ {
515
+ "name": "keyword.operator.arithmetic.terraform",
516
+ "match": "\\/"
517
+ },
518
+ {
519
+ "name": "keyword.operator.arithmetic.terraform",
520
+ "match": "\\%"
521
+ },
522
+ {
523
+ "name": "keyword.operator.logical.terraform",
524
+ "match": "\\\u0026\\\u0026"
525
+ },
526
+ {
527
+ "name": "keyword.operator.logical.terraform",
528
+ "match": "\\|\\|"
529
+ },
530
+ {
531
+ "name": "keyword.operator.logical.terraform",
532
+ "match": "\\!"
533
+ },
534
+ {
535
+ "name": "keyword.operator.terraform",
536
+ "match": "\\\u003e"
537
+ },
538
+ {
539
+ "name": "keyword.operator.terraform",
540
+ "match": "\\\u003c"
541
+ },
542
+ {
543
+ "name": "keyword.operator.terraform",
544
+ "match": "\\?"
545
+ },
546
+ {
547
+ "name": "keyword.operator.terraform",
548
+ "match": "\\.\\.\\."
549
+ },
550
+ {
551
+ "name": "keyword.operator.terraform",
552
+ "match": "\\:"
553
+ }
554
+ ]
555
+ },
556
+ "parens": {
557
+ "begin": "\\(",
558
+ "end": "\\)",
559
+ "patterns": [
560
+ {
561
+ "include": "#expressions"
562
+ },
563
+ {
564
+ "name": "variable.other.readwrite.terraform",
565
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"
202
566
  }
203
567
  ],
204
568
  "beginCaptures": {
205
- "1": {
206
- "name": "keyword.other.function.inline.terraform"
207
- },
208
- "2": {
209
- "name": "keyword.other.section.begin.terraform"
569
+ "0": {
570
+ "name": "punctuation.section.parens.begin.terraform"
210
571
  }
211
572
  },
212
573
  "endCaptures": {
213
- "1": {
214
- "name": "keyword.other.section.end.terraform"
574
+ "0": {
575
+ "name": "punctuation.section.parens.end.terraform"
215
576
  }
216
577
  }
217
578
  },
218
- "string_interpolation_keywords": {
219
- "match": "(terraform|var|self|count|module|path|data|local)(\\.[\\w\\*]+)+",
220
- "captures": {
579
+ "string_interpolation": {
580
+ "name": "meta.interpolation.terraform",
581
+ "begin": "(\\$|\\%)\\{",
582
+ "end": "\\}",
583
+ "patterns": [
584
+ {
585
+ "name": "keyword.operator.template.left.trim.terraform",
586
+ "match": "\\~\\s"
587
+ },
588
+ {
589
+ "name": "keyword.operator.template.right.trim.terraform",
590
+ "match": "\\s\\~"
591
+ },
592
+ {
593
+ "name": "keyword.control.terraform",
594
+ "match": "\\b(if|else|endif|for|in|endfor)\\b"
595
+ },
596
+ {
597
+ "include": "#expressions"
598
+ }
599
+ ],
600
+ "beginCaptures": {
601
+ "0": {
602
+ "name": "keyword.other.interpolation.begin.terraform"
603
+ }
604
+ },
605
+ "endCaptures": {
221
606
  "0": {
222
- "name": "entity.other.attribute-name.terraform"
607
+ "name": "keyword.other.interpolation.end.terraform"
223
608
  }
224
609
  }
225
610
  },
226
- "strings": {
227
- "begin": "\\\"",
228
- "end": "\\\"",
611
+ "string_literals": {
612
+ "name": "string.quoted.double.terraform",
613
+ "begin": "\"",
614
+ "end": "\"",
229
615
  "patterns": [
230
616
  {
231
617
  "include": "#string_interpolation"
232
618
  },
233
619
  {
234
- "name": "string.quoted.double.terraform",
235
- "match": "([\\w\\-\\/\\._\\\\%\\(\\)]+)"
620
+ "name": "constant.character.escape.terraform",
621
+ "match": "\\\\[nrt\"\\\\]|\\\\u([[:xdigit:]]{8}|[[:xdigit:]]{4})"
236
622
  }
237
623
  ],
238
624
  "beginCaptures": {
239
625
  "0": {
240
- "name": "string.terraform punctuation.definition.string.begin.terraform"
626
+ "name": "punctuation.definition.string.begin.terraform"
241
627
  }
242
628
  },
243
629
  "endCaptures": {
244
630
  "0": {
245
- "name": "string.terraform punctuation.definition.string.end.terraform"
631
+ "name": "punctuation.definition.string.end.terraform"
632
+ }
633
+ }
634
+ },
635
+ "top_level_attribute_definition": {
636
+ "name": "variable.declaration.terraform",
637
+ "match": "(\\()?(\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b)(\\))?\\s*(\\=[^\\=|\\\u003e])\\s*",
638
+ "captures": {
639
+ "1": {
640
+ "name": "punctuation.section.parens.begin.terraform"
641
+ },
642
+ "2": {
643
+ "name": "variable.other.readwrite.terraform"
644
+ },
645
+ "3": {
646
+ "name": "punctuation.section.parens.end.terraform"
647
+ },
648
+ "4": {
649
+ "name": "keyword.operator.assignment.terraform"
650
+ }
651
+ }
652
+ },
653
+ "tuple_for_expression": {
654
+ "begin": "\\bfor\\b",
655
+ "end": "(?=\\])",
656
+ "patterns": [
657
+ {
658
+ "name": "keyword.operator.word.terraform",
659
+ "match": "\\bin\\b"
660
+ },
661
+ {
662
+ "name": "keyword.control.conditional.terraform",
663
+ "match": "\\bif\\b"
664
+ },
665
+ {
666
+ "name": "keyword.operator.terraform",
667
+ "match": "\\:"
668
+ },
669
+ {
670
+ "include": "#expressions"
671
+ },
672
+ {
673
+ "include": "#comments"
674
+ },
675
+ {
676
+ "include": "#comma"
677
+ },
678
+ {
679
+ "name": "variable.other.readwrite.terraform",
680
+ "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b"
681
+ }
682
+ ],
683
+ "beginCaptures": {
684
+ "0": {
685
+ "name": "keyword.control.terraform"
246
686
  }
247
687
  }
688
+ },
689
+ "type_keywords": {
690
+ "name": "storage.type.terraform",
691
+ "match": "\\b(any|string|number|bool)\\b"
248
692
  }
249
693
  }
250
694
  }