tm-grammars 0.0.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.
Files changed (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. package/package.json +46 -0
@@ -0,0 +1,751 @@
1
+ {
2
+ "displayName": "Elm",
3
+ "fileTypes": [
4
+ "elm"
5
+ ],
6
+ "name": "elm",
7
+ "patterns": [
8
+ {
9
+ "include": "#import"
10
+ },
11
+ {
12
+ "include": "#module"
13
+ },
14
+ {
15
+ "include": "#debug"
16
+ },
17
+ {
18
+ "include": "#comments"
19
+ },
20
+ {
21
+ "match": "\\b(_)\\b",
22
+ "name": "keyword.unused.elm"
23
+ },
24
+ {
25
+ "include": "#type-signature"
26
+ },
27
+ {
28
+ "include": "#type-declaration"
29
+ },
30
+ {
31
+ "include": "#type-alias-declaration"
32
+ },
33
+ {
34
+ "include": "#string-triple"
35
+ },
36
+ {
37
+ "include": "#string-quote"
38
+ },
39
+ {
40
+ "include": "#char"
41
+ },
42
+ {
43
+ "comment": "Floats are always decimal",
44
+ "match": "\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b",
45
+ "name": "constant.numeric.float.elm"
46
+ },
47
+ {
48
+ "match": "\\b([0-9]+)\\b",
49
+ "name": "constant.numeric.elm"
50
+ },
51
+ {
52
+ "match": "\\b(0x[0-9a-fA-F]+)\\b",
53
+ "name": "constant.numeric.elm"
54
+ },
55
+ {
56
+ "include": "#glsl"
57
+ },
58
+ {
59
+ "include": "#record-prefix"
60
+ },
61
+ {
62
+ "include": "#module-prefix"
63
+ },
64
+ {
65
+ "include": "#constructor"
66
+ },
67
+ {
68
+ "captures": {
69
+ "1": {
70
+ "name": "punctuation.bracket.elm"
71
+ },
72
+ "2": {
73
+ "name": "record.name.elm"
74
+ },
75
+ "3": {
76
+ "name": "keyword.pipe.elm"
77
+ },
78
+ "4": {
79
+ "name": "entity.name.record.field.elm"
80
+ }
81
+ },
82
+ "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\|)\\s+([a-z][a-zA-Z0-9_]*)",
83
+ "name": "meta.record.field.update.elm"
84
+ },
85
+ {
86
+ "captures": {
87
+ "1": {
88
+ "name": "keyword.pipe.elm"
89
+ },
90
+ "2": {
91
+ "name": "entity.name.record.field.elm"
92
+ },
93
+ "3": {
94
+ "name": "keyword.operator.assignment.elm"
95
+ }
96
+ },
97
+ "match": "(\\|)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
98
+ "name": "meta.record.field.update.elm"
99
+ },
100
+ {
101
+ "captures": {
102
+ "1": {
103
+ "name": "punctuation.bracket.elm"
104
+ },
105
+ "2": {
106
+ "name": "record.name.elm"
107
+ }
108
+ },
109
+ "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+$",
110
+ "name": "meta.record.field.update.elm"
111
+ },
112
+ {
113
+ "captures": {
114
+ "1": {
115
+ "name": "punctuation.bracket.elm"
116
+ },
117
+ "2": {
118
+ "name": "entity.name.record.field.elm"
119
+ },
120
+ "3": {
121
+ "name": "keyword.operator.assignment.elm"
122
+ }
123
+ },
124
+ "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
125
+ "name": "meta.record.field.elm"
126
+ },
127
+ {
128
+ "captures": {
129
+ "1": {
130
+ "name": "punctuation.separator.comma.elm"
131
+ },
132
+ "2": {
133
+ "name": "entity.name.record.field.elm"
134
+ },
135
+ "3": {
136
+ "name": "keyword.operator.assignment.elm"
137
+ }
138
+ },
139
+ "match": "(,)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
140
+ "name": "meta.record.field.elm"
141
+ },
142
+ {
143
+ "match": "(\\}|\\{)",
144
+ "name": "punctuation.bracket.elm"
145
+ },
146
+ {
147
+ "include": "#unit"
148
+ },
149
+ {
150
+ "include": "#comma"
151
+ },
152
+ {
153
+ "include": "#parens"
154
+ },
155
+ {
156
+ "match": "(->)",
157
+ "name": "keyword.operator.arrow.elm"
158
+ },
159
+ {
160
+ "include": "#infix_op"
161
+ },
162
+ {
163
+ "match": "(\\=|\\:|\\||\\\\)",
164
+ "name": "keyword.other.elm"
165
+ },
166
+ {
167
+ "match": "\\b(type|as|port|exposing|alias|infixl|infixr|infix)\\s+",
168
+ "name": "keyword.other.elm"
169
+ },
170
+ {
171
+ "match": "\\b(if|then|else|case|of|let|in)\\s+",
172
+ "name": "keyword.control.elm"
173
+ },
174
+ {
175
+ "include": "#record-accessor"
176
+ },
177
+ {
178
+ "include": "#top_level_value"
179
+ },
180
+ {
181
+ "include": "#value"
182
+ },
183
+ {
184
+ "include": "#period"
185
+ },
186
+ {
187
+ "include": "#square_brackets"
188
+ }
189
+ ],
190
+ "repository": {
191
+ "block_comment": {
192
+ "applyEndPatternLast": 1,
193
+ "begin": "\\{-(?!#)",
194
+ "captures": {
195
+ "0": {
196
+ "name": "punctuation.definition.comment.elm"
197
+ }
198
+ },
199
+ "end": "-\\}",
200
+ "name": "comment.block.elm",
201
+ "patterns": [
202
+ {
203
+ "include": "#block_comment"
204
+ }
205
+ ]
206
+ },
207
+ "char": {
208
+ "begin": "'",
209
+ "beginCaptures": {
210
+ "0": {
211
+ "name": "punctuation.definition.char.begin.elm"
212
+ }
213
+ },
214
+ "end": "'",
215
+ "endCaptures": {
216
+ "0": {
217
+ "name": "punctuation.definition.char.end.elm"
218
+ }
219
+ },
220
+ "name": "string.quoted.single.elm",
221
+ "patterns": [
222
+ {
223
+ "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
224
+ "name": "constant.character.escape.elm"
225
+ },
226
+ {
227
+ "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
228
+ "name": "constant.character.escape.control.elm"
229
+ }
230
+ ]
231
+ },
232
+ "comma": {
233
+ "match": "(,)",
234
+ "name": "punctuation.separator.comma.elm"
235
+ },
236
+ "comments": {
237
+ "patterns": [
238
+ {
239
+ "begin": "--",
240
+ "captures": {
241
+ "1": {
242
+ "name": "punctuation.definition.comment.elm"
243
+ }
244
+ },
245
+ "end": "$",
246
+ "name": "comment.line.double-dash.elm"
247
+ },
248
+ {
249
+ "include": "#block_comment"
250
+ }
251
+ ]
252
+ },
253
+ "constructor": {
254
+ "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
255
+ "name": "constant.type-constructor.elm"
256
+ },
257
+ "debug": {
258
+ "match": "\\b(Debug)\\b",
259
+ "name": "invalid.illegal.debug.elm"
260
+ },
261
+ "glsl": {
262
+ "begin": "(\\[)(glsl)(\\|)",
263
+ "beginCaptures": {
264
+ "1": {
265
+ "name": "entity.glsl.bracket.elm"
266
+ },
267
+ "2": {
268
+ "name": "entity.glsl.name.elm"
269
+ },
270
+ "3": {
271
+ "name": "entity.glsl.bracket.elm"
272
+ }
273
+ },
274
+ "end": "(\\|\\])",
275
+ "endCaptures": {
276
+ "1": {
277
+ "name": "entity.glsl.bracket.elm"
278
+ }
279
+ },
280
+ "name": "meta.embedded.block.glsl",
281
+ "patterns": [
282
+ {
283
+ "include": "source.glsl"
284
+ }
285
+ ]
286
+ },
287
+ "import": {
288
+ "begin": "^\\b(import)\\s+",
289
+ "beginCaptures": {
290
+ "1": {
291
+ "name": "keyword.control.import.elm"
292
+ }
293
+ },
294
+ "end": "\\n(?!\\s)",
295
+ "name": "meta.import.elm",
296
+ "patterns": [
297
+ {
298
+ "match": "(as|exposing)",
299
+ "name": "keyword.control.elm"
300
+ },
301
+ {
302
+ "include": "#module_chunk"
303
+ },
304
+ {
305
+ "include": "#period"
306
+ },
307
+ {
308
+ "match": "\\s+",
309
+ "name": "punctuation.spaces.elm"
310
+ },
311
+ {
312
+ "include": "#module-exports"
313
+ }
314
+ ]
315
+ },
316
+ "infix_op": {
317
+ "match": "(</>|<\\?>|<\\||<=|\\|\\||&&|>=|\\|>|\\|=|\\|\\.|\\+\\+|::|/=|==|//|>>|<<|<|>|\\^|\\+|-|/|\\*)",
318
+ "name": "keyword.operator.elm"
319
+ },
320
+ "module": {
321
+ "begin": "^\\b((port |effect )?module)\\s+",
322
+ "beginCaptures": {
323
+ "1": {
324
+ "name": "keyword.other.elm"
325
+ }
326
+ },
327
+ "end": "\\n(?!\\s)",
328
+ "endCaptures": {
329
+ "1": {
330
+ "name": "keyword.other.elm"
331
+ }
332
+ },
333
+ "name": "meta.declaration.module.elm",
334
+ "patterns": [
335
+ {
336
+ "include": "#module_chunk"
337
+ },
338
+ {
339
+ "include": "#period"
340
+ },
341
+ {
342
+ "match": "(exposing)",
343
+ "name": "keyword.other.elm"
344
+ },
345
+ {
346
+ "match": "\\s+",
347
+ "name": "punctuation.spaces.elm"
348
+ },
349
+ {
350
+ "include": "#module-exports"
351
+ }
352
+ ]
353
+ },
354
+ "module-exports": {
355
+ "begin": "(\\()",
356
+ "beginCaptures": {
357
+ "1": {
358
+ "name": "punctuation.parens.module-export.elm"
359
+ }
360
+ },
361
+ "end": "(\\))",
362
+ "endCaptures": {
363
+ "1": {
364
+ "name": "punctuation.parens.module-export.elm"
365
+ }
366
+ },
367
+ "name": "meta.declaration.exports.elm",
368
+ "patterns": [
369
+ {
370
+ "match": "\\b[a-z][a-zA-Z_'0-9]*",
371
+ "name": "entity.name.function.elm"
372
+ },
373
+ {
374
+ "match": "\\b[A-Z][A-Za-z_'0-9]*",
375
+ "name": "storage.type.elm"
376
+ },
377
+ {
378
+ "match": ",",
379
+ "name": "punctuation.separator.comma.elm"
380
+ },
381
+ {
382
+ "match": "\\s+",
383
+ "name": "punctuation.spaces.elm"
384
+ },
385
+ {
386
+ "include": "#comma"
387
+ },
388
+ {
389
+ "match": "\\(\\.\\.\\)",
390
+ "name": "punctuation.parens.ellipses.elm"
391
+ },
392
+ {
393
+ "match": "\\.\\.",
394
+ "name": "punctuation.parens.ellipses.elm"
395
+ },
396
+ {
397
+ "include": "#infix_op"
398
+ },
399
+ {
400
+ "comment": "So named because I don't know what to call this.",
401
+ "match": "\\(.*?\\)",
402
+ "name": "meta.other.unknown.elm"
403
+ }
404
+ ]
405
+ },
406
+ "module-prefix": {
407
+ "captures": {
408
+ "1": {
409
+ "name": "support.module.elm"
410
+ },
411
+ "2": {
412
+ "name": "keyword.other.period.elm"
413
+ }
414
+ },
415
+ "match": "([A-Z][a-zA-Z0-9_]*)(\\.)",
416
+ "name": "meta.module.name.elm"
417
+ },
418
+ "module_chunk": {
419
+ "match": "[A-Z][a-zA-Z0-9_]*",
420
+ "name": "support.module.elm"
421
+ },
422
+ "parens": {
423
+ "match": "(\\(|\\))",
424
+ "name": "punctuation.parens.elm"
425
+ },
426
+ "period": {
427
+ "match": "[.]",
428
+ "name": "keyword.other.period.elm"
429
+ },
430
+ "record-accessor": {
431
+ "captures": {
432
+ "1": {
433
+ "name": "keyword.other.period.elm"
434
+ },
435
+ "2": {
436
+ "name": "entity.name.record.field.accessor.elm"
437
+ }
438
+ },
439
+ "match": "(\\.)([a-z][a-zA-Z0-9_]*)",
440
+ "name": "meta.record.accessor"
441
+ },
442
+ "record-prefix": {
443
+ "captures": {
444
+ "1": {
445
+ "name": "record.name.elm"
446
+ },
447
+ "2": {
448
+ "name": "keyword.other.period.elm"
449
+ },
450
+ "3": {
451
+ "name": "entity.name.record.field.accessor.elm"
452
+ }
453
+ },
454
+ "match": "([a-z][a-zA-Z0-9_]*)(\\.)([a-z][a-zA-Z0-9_]*)",
455
+ "name": "record.accessor.elm"
456
+ },
457
+ "square_brackets": {
458
+ "match": "[\\[\\]]",
459
+ "name": "punctuation.definition.list.elm"
460
+ },
461
+ "string-quote": {
462
+ "begin": "\"",
463
+ "beginCaptures": {
464
+ "0": {
465
+ "name": "punctuation.definition.string.begin.elm"
466
+ }
467
+ },
468
+ "end": "\"",
469
+ "endCaptures": {
470
+ "0": {
471
+ "name": "punctuation.definition.string.end.elm"
472
+ }
473
+ },
474
+ "name": "string.quoted.double.elm",
475
+ "patterns": [
476
+ {
477
+ "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
478
+ "name": "constant.character.escape.elm"
479
+ },
480
+ {
481
+ "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
482
+ "name": "constant.character.escape.control.elm"
483
+ }
484
+ ]
485
+ },
486
+ "string-triple": {
487
+ "begin": "\"\"\"",
488
+ "beginCaptures": {
489
+ "0": {
490
+ "name": "punctuation.definition.string.begin.elm"
491
+ }
492
+ },
493
+ "end": "\"\"\"",
494
+ "endCaptures": {
495
+ "0": {
496
+ "name": "punctuation.definition.string.end.elm"
497
+ }
498
+ },
499
+ "name": "string.quoted.triple.elm",
500
+ "patterns": [
501
+ {
502
+ "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
503
+ "name": "constant.character.escape.elm"
504
+ },
505
+ {
506
+ "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
507
+ "name": "constant.character.escape.control.elm"
508
+ }
509
+ ]
510
+ },
511
+ "top_level_value": {
512
+ "match": "^[a-z][a-zA-Z0-9_]*\\b",
513
+ "name": "entity.name.function.top_level.elm"
514
+ },
515
+ "type-alias-declaration": {
516
+ "begin": "^(type\\s+)(alias\\s+)([A-Z][a-zA-Z0-9_']*)\\s+",
517
+ "beginCaptures": {
518
+ "1": {
519
+ "name": "keyword.type.elm"
520
+ },
521
+ "2": {
522
+ "name": "keyword.type-alias.elm"
523
+ },
524
+ "3": {
525
+ "name": "storage.type.elm"
526
+ }
527
+ },
528
+ "end": "^(?=\\S)",
529
+ "name": "meta.function.type-declaration.elm",
530
+ "patterns": [
531
+ {
532
+ "match": "\\n\\s+",
533
+ "name": "punctuation.spaces.elm"
534
+ },
535
+ {
536
+ "match": "\\=",
537
+ "name": "keyword.operator.assignment.elm"
538
+ },
539
+ {
540
+ "include": "#module-prefix"
541
+ },
542
+ {
543
+ "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
544
+ "name": "storage.type.elm"
545
+ },
546
+ {
547
+ "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
548
+ "name": "variable.type.elm"
549
+ },
550
+ {
551
+ "include": "#comments"
552
+ },
553
+ {
554
+ "include": "#type-record"
555
+ }
556
+ ]
557
+ },
558
+ "type-declaration": {
559
+ "begin": "^(type\\s+)([A-Z][a-zA-Z0-9_']*)\\s+",
560
+ "beginCaptures": {
561
+ "1": {
562
+ "name": "keyword.type.elm"
563
+ },
564
+ "2": {
565
+ "name": "storage.type.elm"
566
+ }
567
+ },
568
+ "end": "^(?=\\S)",
569
+ "name": "meta.function.type-declaration.elm",
570
+ "patterns": [
571
+ {
572
+ "captures": {
573
+ "1": {
574
+ "name": "constant.type-constructor.elm"
575
+ }
576
+ },
577
+ "match": "^\\s*([A-Z][a-zA-Z0-9_]*)\\b",
578
+ "name": "meta.record.field.elm"
579
+ },
580
+ {
581
+ "match": "\\s+",
582
+ "name": "punctuation.spaces.elm"
583
+ },
584
+ {
585
+ "captures": {
586
+ "1": {
587
+ "name": "keyword.operator.assignment.elm"
588
+ },
589
+ "2": {
590
+ "name": "constant.type-constructor.elm"
591
+ }
592
+ },
593
+ "match": "(\\=|\\|)\\s+([A-Z][a-zA-Z0-9_]*)\\b",
594
+ "name": "meta.record.field.elm"
595
+ },
596
+ {
597
+ "match": "\\=",
598
+ "name": "keyword.operator.assignment.elm"
599
+ },
600
+ {
601
+ "match": "\\-\\>",
602
+ "name": "keyword.operator.arrow.elm"
603
+ },
604
+ {
605
+ "include": "#module-prefix"
606
+ },
607
+ {
608
+ "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
609
+ "name": "variable.type.elm"
610
+ },
611
+ {
612
+ "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
613
+ "name": "storage.type.elm"
614
+ },
615
+ {
616
+ "include": "#comments"
617
+ },
618
+ {
619
+ "include": "#type-record"
620
+ }
621
+ ]
622
+ },
623
+ "type-record": {
624
+ "begin": "(\\{)",
625
+ "beginCaptures": {
626
+ "1": {
627
+ "name": "punctuation.section.braces.begin"
628
+ }
629
+ },
630
+ "end": "(\\})",
631
+ "endCaptures": {
632
+ "1": {
633
+ "name": "punctuation.section.braces.end"
634
+ }
635
+ },
636
+ "name": "meta.function.type-record.elm",
637
+ "patterns": [
638
+ {
639
+ "match": "\\s+",
640
+ "name": "punctuation.spaces.elm"
641
+ },
642
+ {
643
+ "match": "->",
644
+ "name": "keyword.operator.arrow.elm"
645
+ },
646
+ {
647
+ "captures": {
648
+ "1": {
649
+ "name": "entity.name.record.field.elm"
650
+ },
651
+ "2": {
652
+ "name": "keyword.other.elm"
653
+ }
654
+ },
655
+ "match": "([a-z][a-zA-Z0-9_]*)\\s+(\\:)",
656
+ "name": "meta.record.field.elm"
657
+ },
658
+ {
659
+ "match": "\\,",
660
+ "name": "punctuation.separator.comma.elm"
661
+ },
662
+ {
663
+ "include": "#module-prefix"
664
+ },
665
+ {
666
+ "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
667
+ "name": "variable.type.elm"
668
+ },
669
+ {
670
+ "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
671
+ "name": "storage.type.elm"
672
+ },
673
+ {
674
+ "include": "#comments"
675
+ },
676
+ {
677
+ "include": "#type-record"
678
+ }
679
+ ]
680
+ },
681
+ "type-signature": {
682
+ "begin": "^(port\\s+)?([a-z_][a-zA-Z0-9_']*)\\s+(\\:)",
683
+ "beginCaptures": {
684
+ "1": {
685
+ "name": "keyword.other.port.elm"
686
+ },
687
+ "2": {
688
+ "name": "entity.name.function.elm"
689
+ },
690
+ "3": {
691
+ "name": "keyword.other.colon.elm"
692
+ }
693
+ },
694
+ "end": "((^(?=[a-z]))|^$)",
695
+ "name": "meta.function.type-declaration.elm",
696
+ "patterns": [
697
+ {
698
+ "include": "#type-signature-chunk"
699
+ }
700
+ ]
701
+ },
702
+ "type-signature-chunk": {
703
+ "patterns": [
704
+ {
705
+ "match": "->",
706
+ "name": "keyword.operator.arrow.elm"
707
+ },
708
+ {
709
+ "match": "\\s+",
710
+ "name": "punctuation.spaces.elm"
711
+ },
712
+ {
713
+ "include": "#module-prefix"
714
+ },
715
+ {
716
+ "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
717
+ "name": "variable.type.elm"
718
+ },
719
+ {
720
+ "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
721
+ "name": "storage.type.elm"
722
+ },
723
+ {
724
+ "match": "\\(\\)",
725
+ "name": "constant.unit.elm"
726
+ },
727
+ {
728
+ "include": "#comma"
729
+ },
730
+ {
731
+ "include": "#parens"
732
+ },
733
+ {
734
+ "include": "#comments"
735
+ },
736
+ {
737
+ "include": "#type-record"
738
+ }
739
+ ]
740
+ },
741
+ "unit": {
742
+ "match": "\\(\\)",
743
+ "name": "constant.unit.elm"
744
+ },
745
+ "value": {
746
+ "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
747
+ "name": "meta.value.elm"
748
+ }
749
+ },
750
+ "scopeName": "source.elm"
751
+ }