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,580 @@
1
+ {
2
+ "displayName": "Kotlin",
3
+ "fileTypes": [
4
+ "kt",
5
+ "kts"
6
+ ],
7
+ "name": "kotlin",
8
+ "patterns": [
9
+ {
10
+ "include": "#import"
11
+ },
12
+ {
13
+ "include": "#package"
14
+ },
15
+ {
16
+ "include": "#code"
17
+ }
18
+ ],
19
+ "repository": {
20
+ "annotation-simple": {
21
+ "match": "(?<!\\w)@[\\w\\.]+\\b(?!:)",
22
+ "name": "entity.name.type.annotation.kotlin"
23
+ },
24
+ "annotation-site": {
25
+ "begin": "(?<!\\w)(@\\w+):\\s*(?!\\[)",
26
+ "beginCaptures": {
27
+ "1": {
28
+ "name": "entity.name.type.annotation-site.kotlin"
29
+ }
30
+ },
31
+ "end": "$",
32
+ "patterns": [
33
+ {
34
+ "include": "#unescaped-annotation"
35
+ }
36
+ ]
37
+ },
38
+ "annotation-site-list": {
39
+ "begin": "(?<!\\w)(@\\w+):\\s*\\[",
40
+ "beginCaptures": {
41
+ "1": {
42
+ "name": "entity.name.type.annotation-site.kotlin"
43
+ }
44
+ },
45
+ "end": "\\]",
46
+ "patterns": [
47
+ {
48
+ "include": "#unescaped-annotation"
49
+ }
50
+ ]
51
+ },
52
+ "binary-literal": {
53
+ "match": "0(b|B)[01][01_]*",
54
+ "name": "constant.numeric.binary.kotlin"
55
+ },
56
+ "boolean-literal": {
57
+ "match": "\\b(true|false)\\b",
58
+ "name": "constant.language.boolean.kotlin"
59
+ },
60
+ "character": {
61
+ "begin": "'",
62
+ "end": "'",
63
+ "name": "string.quoted.single.kotlin",
64
+ "patterns": [
65
+ {
66
+ "match": "\\\\.",
67
+ "name": "constant.character.escape.kotlin"
68
+ }
69
+ ]
70
+ },
71
+ "class-declaration": {
72
+ "captures": {
73
+ "1": {
74
+ "name": "storage.type.class.kotlin"
75
+ },
76
+ "2": {
77
+ "name": "entity.name.type.class.kotlin"
78
+ },
79
+ "3": {
80
+ "patterns": [
81
+ {
82
+ "include": "#type-parameter"
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ "match": "\\b(class|(?:fun\\s+)?interface)\\s+(\\b\\w+\\b|`[^`]+`)\\s*(?<GROUP><([^<>]|\\g<GROUP>)+>)?"
88
+ },
89
+ "code": {
90
+ "patterns": [
91
+ {
92
+ "include": "#comments"
93
+ },
94
+ {
95
+ "include": "#keywords"
96
+ },
97
+ {
98
+ "include": "#annotation-simple"
99
+ },
100
+ {
101
+ "include": "#annotation-site-list"
102
+ },
103
+ {
104
+ "include": "#annotation-site"
105
+ },
106
+ {
107
+ "include": "#class-declaration"
108
+ },
109
+ {
110
+ "include": "#object-declaration"
111
+ },
112
+ {
113
+ "include": "#type-alias"
114
+ },
115
+ {
116
+ "include": "#function-declaration"
117
+ },
118
+ {
119
+ "include": "#variable-declaration"
120
+ },
121
+ {
122
+ "include": "#type-constraint"
123
+ },
124
+ {
125
+ "include": "#type-annotation"
126
+ },
127
+ {
128
+ "include": "#function-call"
129
+ },
130
+ {
131
+ "include": "#method-reference"
132
+ },
133
+ {
134
+ "include": "#key"
135
+ },
136
+ {
137
+ "include": "#string"
138
+ },
139
+ {
140
+ "include": "#string-empty"
141
+ },
142
+ {
143
+ "include": "#string-multiline"
144
+ },
145
+ {
146
+ "include": "#character"
147
+ },
148
+ {
149
+ "include": "#lambda-arrow"
150
+ },
151
+ {
152
+ "include": "#operators"
153
+ },
154
+ {
155
+ "include": "#self-reference"
156
+ },
157
+ {
158
+ "include": "#decimal-literal"
159
+ },
160
+ {
161
+ "include": "#hex-literal"
162
+ },
163
+ {
164
+ "include": "#binary-literal"
165
+ },
166
+ {
167
+ "include": "#boolean-literal"
168
+ },
169
+ {
170
+ "include": "#null-literal"
171
+ }
172
+ ]
173
+ },
174
+ "comment-block": {
175
+ "begin": "/\\*(?!\\*)",
176
+ "end": "\\*/",
177
+ "name": "comment.block.kotlin"
178
+ },
179
+ "comment-javadoc": {
180
+ "patterns": [
181
+ {
182
+ "begin": "/\\*\\*",
183
+ "end": "\\*/",
184
+ "name": "comment.block.javadoc.kotlin",
185
+ "patterns": [
186
+ {
187
+ "match": "@(return|constructor|receiver|sample|see|author|since|suppress)\\b",
188
+ "name": "keyword.other.documentation.javadoc.kotlin"
189
+ },
190
+ {
191
+ "captures": {
192
+ "1": {
193
+ "name": "keyword.other.documentation.javadoc.kotlin"
194
+ },
195
+ "2": {
196
+ "name": "variable.parameter.kotlin"
197
+ }
198
+ },
199
+ "match": "(@param|@property)\\s+(\\S+)"
200
+ },
201
+ {
202
+ "captures": {
203
+ "1": {
204
+ "name": "keyword.other.documentation.javadoc.kotlin"
205
+ },
206
+ "2": {
207
+ "name": "variable.parameter.kotlin"
208
+ }
209
+ },
210
+ "match": "(@param)\\[(\\S+)\\]"
211
+ },
212
+ {
213
+ "captures": {
214
+ "1": {
215
+ "name": "keyword.other.documentation.javadoc.kotlin"
216
+ },
217
+ "2": {
218
+ "name": "entity.name.type.class.kotlin"
219
+ }
220
+ },
221
+ "match": "(@(?:exception|throws))\\s+(\\S+)"
222
+ },
223
+ {
224
+ "captures": {
225
+ "1": {
226
+ "name": "keyword.other.documentation.javadoc.kotlin"
227
+ },
228
+ "2": {
229
+ "name": "entity.name.type.class.kotlin"
230
+ },
231
+ "3": {
232
+ "name": "variable.parameter.kotlin"
233
+ }
234
+ },
235
+ "match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*}"
236
+ }
237
+ ]
238
+ }
239
+ ]
240
+ },
241
+ "comment-line": {
242
+ "begin": "//",
243
+ "end": "$",
244
+ "name": "comment.line.double-slash.kotlin"
245
+ },
246
+ "comments": {
247
+ "patterns": [
248
+ {
249
+ "include": "#comment-line"
250
+ },
251
+ {
252
+ "include": "#comment-block"
253
+ },
254
+ {
255
+ "include": "#comment-javadoc"
256
+ }
257
+ ]
258
+ },
259
+ "control-keywords": {
260
+ "match": "\\b(if|else|while|do|when|try|throw|break|continue|return|for)\\b",
261
+ "name": "keyword.control.kotlin"
262
+ },
263
+ "decimal-literal": {
264
+ "match": "\\b\\d[\\d_]*(\\.[\\d_]+)?((e|E)\\d+)?(u|U)?(L|F|f)?\\b",
265
+ "name": "constant.numeric.decimal.kotlin"
266
+ },
267
+ "function-call": {
268
+ "captures": {
269
+ "1": {
270
+ "name": "entity.name.function.call.kotlin"
271
+ },
272
+ "2": {
273
+ "patterns": [
274
+ {
275
+ "include": "#type-parameter"
276
+ }
277
+ ]
278
+ }
279
+ },
280
+ "match": "\\??\\.?(\\b\\w+\\b|`[^`]+`)\\s*(?<GROUP><([^<>]|\\g<GROUP>)+>)?\\s*(?=[({])"
281
+ },
282
+ "function-declaration": {
283
+ "captures": {
284
+ "1": {
285
+ "name": "storage.type.function.kotlin"
286
+ },
287
+ "2": {
288
+ "patterns": [
289
+ {
290
+ "include": "#type-parameter"
291
+ }
292
+ ]
293
+ },
294
+ "4": {
295
+ "name": "entity.name.type.class.extension.kotlin"
296
+ },
297
+ "5": {
298
+ "name": "entity.name.function.declaration.kotlin"
299
+ }
300
+ },
301
+ "match": "\\b(fun)\\b\\s*(?<GROUP><([^<>]|\\g<GROUP>)+>)?\\s*(?:(\\w+)\\.)?(\\b\\w+\\b|`[^`]+`)"
302
+ },
303
+ "hard-keywords": {
304
+ "match": "\\b(as|typeof|is|in)\\b",
305
+ "name": "keyword.hard.kotlin"
306
+ },
307
+ "hex-literal": {
308
+ "match": "0(x|X)[A-Fa-f0-9][A-Fa-f0-9_]*(u|U)?",
309
+ "name": "constant.numeric.hex.kotlin"
310
+ },
311
+ "import": {
312
+ "begin": "\\b(import)\\b\\s*",
313
+ "beginCaptures": {
314
+ "1": {
315
+ "name": "storage.type.import.kotlin"
316
+ }
317
+ },
318
+ "contentName": "entity.name.package.kotlin",
319
+ "end": ";|$",
320
+ "name": "meta.import.kotlin",
321
+ "patterns": [
322
+ {
323
+ "include": "#comments"
324
+ },
325
+ {
326
+ "include": "#hard-keywords"
327
+ },
328
+ {
329
+ "match": "\\*",
330
+ "name": "variable.language.wildcard.kotlin"
331
+ }
332
+ ]
333
+ },
334
+ "key": {
335
+ "captures": {
336
+ "1": {
337
+ "name": "variable.parameter.kotlin"
338
+ },
339
+ "2": {
340
+ "name": "keyword.operator.assignment.kotlin"
341
+ }
342
+ },
343
+ "match": "\\b(\\w=)\\s*(=)"
344
+ },
345
+ "keywords": {
346
+ "patterns": [
347
+ {
348
+ "include": "#prefix-modifiers"
349
+ },
350
+ {
351
+ "include": "#postfix-modifiers"
352
+ },
353
+ {
354
+ "include": "#soft-keywords"
355
+ },
356
+ {
357
+ "include": "#hard-keywords"
358
+ },
359
+ {
360
+ "include": "#control-keywords"
361
+ }
362
+ ]
363
+ },
364
+ "lambda-arrow": {
365
+ "match": "->",
366
+ "name": "storage.type.function.arrow.kotlin"
367
+ },
368
+ "method-reference": {
369
+ "captures": {
370
+ "1": {
371
+ "name": "entity.name.function.reference.kotlin"
372
+ }
373
+ },
374
+ "match": "\\??::(\\b\\w+\\b|`[^`]+`)"
375
+ },
376
+ "null-literal": {
377
+ "match": "\\bnull\\b",
378
+ "name": "constant.language.null.kotlin"
379
+ },
380
+ "object-declaration": {
381
+ "captures": {
382
+ "1": {
383
+ "name": "storage.type.object.kotlin"
384
+ },
385
+ "2": {
386
+ "name": "entity.name.type.object.kotlin"
387
+ }
388
+ },
389
+ "match": "\\b(object)\\s+(\\b\\w+\\b|`[^`]+`)"
390
+ },
391
+ "operators": {
392
+ "patterns": [
393
+ {
394
+ "match": "(===?|\\!==?|<=|>=|<|>)",
395
+ "name": "keyword.operator.comparison.kotlin"
396
+ },
397
+ {
398
+ "match": "([+*/%-]=)",
399
+ "name": "keyword.operator.assignment.arithmetic.kotlin"
400
+ },
401
+ {
402
+ "match": "(=)",
403
+ "name": "keyword.operator.assignment.kotlin"
404
+ },
405
+ {
406
+ "match": "([+*/%-])",
407
+ "name": "keyword.operator.arithmetic.kotlin"
408
+ },
409
+ {
410
+ "match": "(!|&&|\\|\\|)",
411
+ "name": "keyword.operator.logical.kotlin"
412
+ },
413
+ {
414
+ "match": "(--|\\+\\+)",
415
+ "name": "keyword.operator.increment-decrement.kotlin"
416
+ },
417
+ {
418
+ "match": "(\\.\\.)",
419
+ "name": "keyword.operator.range.kotlin"
420
+ }
421
+ ]
422
+ },
423
+ "package": {
424
+ "begin": "\\b(package)\\b\\s*",
425
+ "beginCaptures": {
426
+ "1": {
427
+ "name": "storage.type.package.kotlin"
428
+ }
429
+ },
430
+ "contentName": "entity.name.package.kotlin",
431
+ "end": ";|$",
432
+ "name": "meta.package.kotlin",
433
+ "patterns": [
434
+ {
435
+ "include": "#comments"
436
+ }
437
+ ]
438
+ },
439
+ "postfix-modifiers": {
440
+ "match": "\\b(where|by|get|set)\\b",
441
+ "name": "storage.modifier.other.kotlin"
442
+ },
443
+ "prefix-modifiers": {
444
+ "match": "\\b(abstract|final|enum|open|annotation|sealed|data|override|final|lateinit|private|protected|public|internal|inner|companion|noinline|crossinline|vararg|reified|tailrec|operator|infix|inline|external|const|suspend|value)\\b",
445
+ "name": "storage.modifier.other.kotlin"
446
+ },
447
+ "self-reference": {
448
+ "match": "\\b(this|super)(@\\w+)?\\b",
449
+ "name": "variable.language.this.kotlin"
450
+ },
451
+ "soft-keywords": {
452
+ "match": "\\b(catch|finally|field)\\b",
453
+ "name": "keyword.soft.kotlin"
454
+ },
455
+ "string": {
456
+ "begin": "(?<!\")\"(?!\")",
457
+ "end": "\"",
458
+ "name": "string.quoted.double.kotlin",
459
+ "patterns": [
460
+ {
461
+ "match": "\\\\.",
462
+ "name": "constant.character.escape.kotlin"
463
+ },
464
+ {
465
+ "include": "#string-escape-simple"
466
+ },
467
+ {
468
+ "include": "#string-escape-bracketed"
469
+ }
470
+ ]
471
+ },
472
+ "string-empty": {
473
+ "match": "(?<!\")\"\"(?!\")",
474
+ "name": "string.quoted.double.kotlin"
475
+ },
476
+ "string-escape-bracketed": {
477
+ "begin": "(?<!\\\\)(\\$\\{)",
478
+ "beginCaptures": {
479
+ "1": {
480
+ "name": "punctuation.definition.template-expression.begin"
481
+ }
482
+ },
483
+ "end": "(\\})",
484
+ "endCaptures": {
485
+ "1": {
486
+ "name": "punctuation.definition.template-expression.end"
487
+ }
488
+ },
489
+ "name": "meta.template.expression.kotlin",
490
+ "patterns": [
491
+ {
492
+ "include": "#code"
493
+ }
494
+ ]
495
+ },
496
+ "string-escape-simple": {
497
+ "match": "(?<!\\\\)\\$\\w+\\b",
498
+ "name": "variable.string-escape.kotlin"
499
+ },
500
+ "string-multiline": {
501
+ "begin": "\"\"\"",
502
+ "end": "\"\"\"",
503
+ "name": "string.quoted.double.kotlin",
504
+ "patterns": [
505
+ {
506
+ "match": "\\\\.",
507
+ "name": "constant.character.escape.kotlin"
508
+ },
509
+ {
510
+ "include": "#string-escape-simple"
511
+ },
512
+ {
513
+ "include": "#string-escape-bracketed"
514
+ }
515
+ ]
516
+ },
517
+ "type-alias": {
518
+ "captures": {
519
+ "1": {
520
+ "name": "storage.type.alias.kotlin"
521
+ },
522
+ "2": {
523
+ "name": "entity.name.type.kotlin"
524
+ },
525
+ "3": {
526
+ "patterns": [
527
+ {
528
+ "include": "#type-parameter"
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ "match": "\\b(typealias)\\s+(\\b\\w+\\b|`[^`]+`)\\s*(?<GROUP><([^<>]|\\g<GROUP>)+>)?"
534
+ },
535
+ "type-annotation": {
536
+ "captures": {
537
+ "0": {
538
+ "patterns": [
539
+ {
540
+ "include": "#type-parameter"
541
+ }
542
+ ]
543
+ }
544
+ },
545
+ "match": "(?<![:?]):\\s*(\\w|\\?|\\s|->|(?<GROUP>[<(]([^<>()\"']|\\g<GROUP>)+[)>]))+"
546
+ },
547
+ "type-parameter": {
548
+ "patterns": [
549
+ {
550
+ "match": "\\b\\w+\\b",
551
+ "name": "entity.name.type.kotlin"
552
+ },
553
+ {
554
+ "match": "\\b(in|out)\\b",
555
+ "name": "storage.modifier.kotlin"
556
+ }
557
+ ]
558
+ },
559
+ "unescaped-annotation": {
560
+ "match": "\\b[\\w\\.]+\\b",
561
+ "name": "entity.name.type.annotation.kotlin"
562
+ },
563
+ "variable-declaration": {
564
+ "captures": {
565
+ "1": {
566
+ "name": "storage.type.variable.kotlin"
567
+ },
568
+ "2": {
569
+ "patterns": [
570
+ {
571
+ "include": "#type-parameter"
572
+ }
573
+ ]
574
+ }
575
+ },
576
+ "match": "\\b(val|var)\\b\\s*(?<GROUP><([^<>]|\\g<GROUP>)+>)?"
577
+ }
578
+ },
579
+ "scopeName": "source.kotlin"
580
+ }