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,1313 @@
1
+ {
2
+ "displayName": "Scala",
3
+ "fileTypes": [
4
+ "scala"
5
+ ],
6
+ "firstLineMatch": "^#!/.*\\b\\w*scala\\b",
7
+ "foldingStartMarker": "/\\*\\*|\\{\\s*$",
8
+ "foldingStopMarker": "\\*\\*/|^\\s*\\}",
9
+ "name": "scala",
10
+ "patterns": [
11
+ {
12
+ "include": "#code"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "backQuotedVariable": {
17
+ "match": "`[^`]+`"
18
+ },
19
+ "block-comments": {
20
+ "patterns": [
21
+ {
22
+ "captures": {
23
+ "0": {
24
+ "name": "punctuation.definition.comment.scala"
25
+ }
26
+ },
27
+ "match": "/\\*\\*/",
28
+ "name": "comment.block.empty.scala"
29
+ },
30
+ {
31
+ "begin": "^\\s*(/\\*\\*)(?!/)",
32
+ "beginCaptures": {
33
+ "1": {
34
+ "name": "punctuation.definition.comment.scala"
35
+ }
36
+ },
37
+ "end": "\\*/",
38
+ "endCaptures": {
39
+ "0": {
40
+ "name": "punctuation.definition.comment.scala"
41
+ }
42
+ },
43
+ "name": "comment.block.documentation.scala",
44
+ "patterns": [
45
+ {
46
+ "captures": {
47
+ "1": {
48
+ "name": "keyword.other.documentation.scaladoc.scala"
49
+ },
50
+ "2": {
51
+ "name": "variable.parameter.scala"
52
+ }
53
+ },
54
+ "match": "(@param)\\s+(\\S+)"
55
+ },
56
+ {
57
+ "captures": {
58
+ "1": {
59
+ "name": "keyword.other.documentation.scaladoc.scala"
60
+ },
61
+ "2": {
62
+ "name": "entity.name.class"
63
+ }
64
+ },
65
+ "match": "(@(?:tparam|throws))\\s+(\\S+)"
66
+ },
67
+ {
68
+ "match": "@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b",
69
+ "name": "keyword.other.documentation.scaladoc.scala"
70
+ },
71
+ {
72
+ "captures": {
73
+ "1": {
74
+ "name": "punctuation.definition.documentation.link.scala"
75
+ },
76
+ "2": {
77
+ "name": "string.other.link.title.markdown"
78
+ },
79
+ "3": {
80
+ "name": "punctuation.definition.documentation.link.scala"
81
+ }
82
+ },
83
+ "match": "(\\[\\[)([^\\]]+)(\\]\\])"
84
+ },
85
+ {
86
+ "include": "#block-comments"
87
+ }
88
+ ]
89
+ },
90
+ {
91
+ "begin": "/\\*",
92
+ "captures": {
93
+ "0": {
94
+ "name": "punctuation.definition.comment.scala"
95
+ }
96
+ },
97
+ "end": "\\*/",
98
+ "name": "comment.block.scala",
99
+ "patterns": [
100
+ {
101
+ "include": "#block-comments"
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ },
107
+ "char-literal": {
108
+ "begin": "'",
109
+ "beginCaptures": {
110
+ "0": {
111
+ "name": "punctuation.definition.character.begin.scala"
112
+ }
113
+ },
114
+ "end": "'|$",
115
+ "endCaptures": {
116
+ "0": {
117
+ "name": "punctuation.definition.character.end.scala"
118
+ }
119
+ },
120
+ "name": "string.quoted.other constant.character.literal.scala",
121
+ "patterns": [
122
+ {
123
+ "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})",
124
+ "name": "constant.character.escape.scala"
125
+ },
126
+ {
127
+ "match": "\\\\.",
128
+ "name": "invalid.illegal.unrecognized-character-escape.scala"
129
+ },
130
+ {
131
+ "match": "[^']{2,}",
132
+ "name": "invalid.illegal.character-literal-too-long"
133
+ },
134
+ {
135
+ "match": "(?<!')[^']",
136
+ "name": "invalid.illegal.character-literal-too-long"
137
+ }
138
+ ]
139
+ },
140
+ "code": {
141
+ "patterns": [
142
+ {
143
+ "include": "#using-directive"
144
+ },
145
+ {
146
+ "include": "#script-header"
147
+ },
148
+ {
149
+ "include": "#storage-modifiers"
150
+ },
151
+ {
152
+ "include": "#declarations"
153
+ },
154
+ {
155
+ "include": "#inheritance"
156
+ },
157
+ {
158
+ "include": "#extension"
159
+ },
160
+ {
161
+ "include": "#imports"
162
+ },
163
+ {
164
+ "include": "#exports"
165
+ },
166
+ {
167
+ "include": "#comments"
168
+ },
169
+ {
170
+ "include": "#strings"
171
+ },
172
+ {
173
+ "include": "#initialization"
174
+ },
175
+ {
176
+ "include": "#xml-literal"
177
+ },
178
+ {
179
+ "include": "#keywords"
180
+ },
181
+ {
182
+ "include": "#using"
183
+ },
184
+ {
185
+ "include": "#constants"
186
+ },
187
+ {
188
+ "include": "#singleton-type"
189
+ },
190
+ {
191
+ "include": "#inline"
192
+ },
193
+ {
194
+ "include": "#scala-quoted-or-symbol"
195
+ },
196
+ {
197
+ "include": "#char-literal"
198
+ },
199
+ {
200
+ "include": "#empty-parentheses"
201
+ },
202
+ {
203
+ "include": "#parameter-list"
204
+ },
205
+ {
206
+ "include": "#qualifiedClassName"
207
+ },
208
+ {
209
+ "include": "#backQuotedVariable"
210
+ },
211
+ {
212
+ "include": "#curly-braces"
213
+ },
214
+ {
215
+ "include": "#meta-brackets"
216
+ },
217
+ {
218
+ "include": "#meta-bounds"
219
+ },
220
+ {
221
+ "include": "#meta-colons"
222
+ }
223
+ ]
224
+ },
225
+ "comments": {
226
+ "patterns": [
227
+ {
228
+ "include": "#block-comments"
229
+ },
230
+ {
231
+ "begin": "(^[ \\t]+)?(?=//)",
232
+ "beginCaptures": {
233
+ "1": {
234
+ "name": "punctuation.whitespace.comment.leading.scala"
235
+ }
236
+ },
237
+ "end": "(?!\\G)",
238
+ "patterns": [
239
+ {
240
+ "begin": "//",
241
+ "beginCaptures": {
242
+ "0": {
243
+ "name": "punctuation.definition.comment.scala"
244
+ }
245
+ },
246
+ "end": "\\n",
247
+ "name": "comment.line.double-slash.scala"
248
+ }
249
+ ]
250
+ }
251
+ ]
252
+ },
253
+ "constants": {
254
+ "patterns": [
255
+ {
256
+ "match": "\\b(false|null|true)\\b",
257
+ "name": "constant.language.scala"
258
+ },
259
+ {
260
+ "match": "\\b(0[xX][0-9a-fA-F_]*)\\b",
261
+ "name": "constant.numeric.scala"
262
+ },
263
+ {
264
+ "match": "\\b(([0-9][0-9_]*(\\.[0-9][0-9_]*)?)([eE](\\+|-)?[0-9][0-9_]*)?|[0-9][0-9_]*)[LlFfDd]?\\b",
265
+ "name": "constant.numeric.scala"
266
+ },
267
+ {
268
+ "match": "(\\.[0-9][0-9_]*)([eE](\\+|-)?[0-9][0-9_]*)?[LlFfDd]?\\b",
269
+ "name": "constant.numeric.scala"
270
+ },
271
+ {
272
+ "match": "\\b(this|super)\\b",
273
+ "name": "variable.language.scala"
274
+ }
275
+ ]
276
+ },
277
+ "curly-braces": {
278
+ "begin": "\\{",
279
+ "beginCaptures": {
280
+ "0": {
281
+ "name": "punctuation.section.block.begin.scala"
282
+ }
283
+ },
284
+ "end": "\\}",
285
+ "endCaptures": {
286
+ "0": {
287
+ "name": "punctuation.section.block.end.scala"
288
+ }
289
+ },
290
+ "patterns": [
291
+ {
292
+ "include": "#code"
293
+ }
294
+ ]
295
+ },
296
+ "declarations": {
297
+ "patterns": [
298
+ {
299
+ "captures": {
300
+ "1": {
301
+ "name": "keyword.declaration.scala"
302
+ },
303
+ "2": {
304
+ "name": "entity.name.function.declaration"
305
+ }
306
+ },
307
+ "match": "\\b(def)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?"
308
+ },
309
+ {
310
+ "captures": {
311
+ "1": {
312
+ "name": "keyword.declaration.scala"
313
+ },
314
+ "2": {
315
+ "name": "entity.name.class.declaration"
316
+ }
317
+ },
318
+ "match": "\\b(trait)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?"
319
+ },
320
+ {
321
+ "captures": {
322
+ "1": {
323
+ "name": "keyword.declaration.scala"
324
+ },
325
+ "2": {
326
+ "name": "keyword.declaration.scala"
327
+ },
328
+ "3": {
329
+ "name": "entity.name.class.declaration"
330
+ }
331
+ },
332
+ "match": "\\b(?:(case)\\s+)?(class|object|enum)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?"
333
+ },
334
+ {
335
+ "captures": {
336
+ "1": {
337
+ "name": "keyword.declaration.scala"
338
+ },
339
+ "2": {
340
+ "name": "entity.name.type.declaration"
341
+ }
342
+ },
343
+ "match": "(?<!\\.)\\b(type)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?"
344
+ },
345
+ {
346
+ "captures": {
347
+ "1": {
348
+ "name": "keyword.declaration.stable.scala"
349
+ },
350
+ "2": {
351
+ "name": "keyword.declaration.volatile.scala"
352
+ }
353
+ },
354
+ "match": "\\b(?:(val)|(var))\\b\\s*(?!//|/\\*)(?=(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)?\\()"
355
+ },
356
+ {
357
+ "captures": {
358
+ "1": {
359
+ "name": "keyword.declaration.stable.scala"
360
+ },
361
+ "2": {
362
+ "name": "variable.stable.declaration.scala"
363
+ }
364
+ },
365
+ "match": "\\b(val)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?"
366
+ },
367
+ {
368
+ "captures": {
369
+ "1": {
370
+ "name": "keyword.declaration.volatile.scala"
371
+ },
372
+ "2": {
373
+ "name": "variable.volatile.declaration.scala"
374
+ }
375
+ },
376
+ "match": "\\b(var)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)(?:\\s*,\\s*(?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))*)?"
377
+ },
378
+ {
379
+ "captures": {
380
+ "1": {
381
+ "name": "keyword.other.scoping.scala"
382
+ },
383
+ "2": {
384
+ "name": "keyword.declaration.scala"
385
+ },
386
+ "3": {
387
+ "name": "entity.name.class.declaration"
388
+ }
389
+ },
390
+ "match": "\\b(package)\\s+(object)\\b\\s*(?!//|/\\*)((?:(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`))?"
391
+ },
392
+ {
393
+ "begin": "\\b(package)\\s+",
394
+ "beginCaptures": {
395
+ "1": {
396
+ "name": "keyword.other.import.scala"
397
+ }
398
+ },
399
+ "end": "(?<=[\\n;])",
400
+ "name": "meta.package.scala",
401
+ "patterns": [
402
+ {
403
+ "include": "#comments"
404
+ },
405
+ {
406
+ "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))",
407
+ "name": "entity.name.package.scala"
408
+ },
409
+ {
410
+ "match": "\\.",
411
+ "name": "punctuation.definition.package"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "captures": {
417
+ "1": {
418
+ "name": "keyword.declaration.scala"
419
+ },
420
+ "2": {
421
+ "name": "entity.name.given.declaration"
422
+ }
423
+ },
424
+ "match": "\\b(given)\\b\\s*([_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`)?"
425
+ }
426
+ ]
427
+ },
428
+ "empty-parentheses": {
429
+ "captures": {
430
+ "1": {
431
+ "name": "meta.bracket.scala"
432
+ }
433
+ },
434
+ "match": "(\\(\\))",
435
+ "name": "meta.parentheses.scala"
436
+ },
437
+ "exports": {
438
+ "begin": "\\b(export)\\s+",
439
+ "beginCaptures": {
440
+ "1": {
441
+ "name": "keyword.other.export.scala"
442
+ }
443
+ },
444
+ "end": "(?<=[\\n;])",
445
+ "name": "meta.export.scala",
446
+ "patterns": [
447
+ {
448
+ "include": "#comments"
449
+ },
450
+ {
451
+ "match": "\\b(given)\\b",
452
+ "name": "keyword.other.export.given.scala"
453
+ },
454
+ {
455
+ "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?",
456
+ "name": "entity.name.class.export.scala"
457
+ },
458
+ {
459
+ "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))",
460
+ "name": "entity.name.export.scala"
461
+ },
462
+ {
463
+ "match": "\\.",
464
+ "name": "punctuation.definition.export"
465
+ },
466
+ {
467
+ "begin": "{",
468
+ "beginCaptures": {
469
+ "0": {
470
+ "name": "meta.bracket.scala"
471
+ }
472
+ },
473
+ "end": "}",
474
+ "endCaptures": {
475
+ "0": {
476
+ "name": "meta.bracket.scala"
477
+ }
478
+ },
479
+ "name": "meta.export.selector.scala",
480
+ "patterns": [
481
+ {
482
+ "captures": {
483
+ "1": {
484
+ "name": "keyword.other.export.given.scala"
485
+ },
486
+ "2": {
487
+ "name": "entity.name.class.export.renamed-from.scala"
488
+ },
489
+ "3": {
490
+ "name": "entity.name.export.renamed-from.scala"
491
+ },
492
+ "4": {
493
+ "name": "keyword.other.arrow.scala"
494
+ },
495
+ "5": {
496
+ "name": "entity.name.class.export.renamed-to.scala"
497
+ },
498
+ "6": {
499
+ "name": "entity.name.export.renamed-to.scala"
500
+ }
501
+ },
502
+ "match": "(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*"
503
+ },
504
+ {
505
+ "match": "\\b(given)\\b",
506
+ "name": "keyword.other.export.given.scala"
507
+ },
508
+ {
509
+ "captures": {
510
+ "1": {
511
+ "name": "keyword.other.export.given.scala"
512
+ },
513
+ "2": {
514
+ "name": "entity.name.class.export.scala"
515
+ },
516
+ "3": {
517
+ "name": "entity.name.export.scala"
518
+ }
519
+ },
520
+ "match": "(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))"
521
+ }
522
+ ]
523
+ }
524
+ ]
525
+ },
526
+ "extension": {
527
+ "patterns": [
528
+ {
529
+ "captures": {
530
+ "1": {
531
+ "name": "keyword.declaration.scala"
532
+ }
533
+ },
534
+ "match": "^\\s*(extension)\\s+(?=[\\[\\(])"
535
+ }
536
+ ]
537
+ },
538
+ "imports": {
539
+ "begin": "\\b(import)\\s+",
540
+ "beginCaptures": {
541
+ "1": {
542
+ "name": "keyword.other.import.scala"
543
+ }
544
+ },
545
+ "end": "(?<=[\\n;])",
546
+ "name": "meta.import.scala",
547
+ "patterns": [
548
+ {
549
+ "include": "#comments"
550
+ },
551
+ {
552
+ "match": "\\b(given)\\b",
553
+ "name": "keyword.other.import.given.scala"
554
+ },
555
+ {
556
+ "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?",
557
+ "name": "entity.name.class.import.scala"
558
+ },
559
+ {
560
+ "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))",
561
+ "name": "entity.name.import.scala"
562
+ },
563
+ {
564
+ "match": "\\.",
565
+ "name": "punctuation.definition.import"
566
+ },
567
+ {
568
+ "begin": "{",
569
+ "beginCaptures": {
570
+ "0": {
571
+ "name": "meta.bracket.scala"
572
+ }
573
+ },
574
+ "end": "}",
575
+ "endCaptures": {
576
+ "0": {
577
+ "name": "meta.bracket.scala"
578
+ }
579
+ },
580
+ "name": "meta.import.selector.scala",
581
+ "patterns": [
582
+ {
583
+ "captures": {
584
+ "1": {
585
+ "name": "keyword.other.import.given.scala"
586
+ },
587
+ "2": {
588
+ "name": "entity.name.class.import.renamed-from.scala"
589
+ },
590
+ "3": {
591
+ "name": "entity.name.import.renamed-from.scala"
592
+ },
593
+ "4": {
594
+ "name": "keyword.other.arrow.scala"
595
+ },
596
+ "5": {
597
+ "name": "entity.name.class.import.renamed-to.scala"
598
+ },
599
+ "6": {
600
+ "name": "entity.name.import.renamed-to.scala"
601
+ }
602
+ },
603
+ "match": "(?x)(given\\s)?\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*(=>)\\s*(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))\\s*"
604
+ },
605
+ {
606
+ "match": "\\b(given)\\b",
607
+ "name": "keyword.other.import.given.scala"
608
+ },
609
+ {
610
+ "captures": {
611
+ "1": {
612
+ "name": "keyword.other.import.given.scala"
613
+ },
614
+ "2": {
615
+ "name": "entity.name.class.import.scala"
616
+ },
617
+ "3": {
618
+ "name": "entity.name.import.scala"
619
+ }
620
+ },
621
+ "match": "(given\\s+)?(?:([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)|(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))"
622
+ }
623
+ ]
624
+ }
625
+ ]
626
+ },
627
+ "inheritance": {
628
+ "patterns": [
629
+ {
630
+ "captures": {
631
+ "1": {
632
+ "name": "keyword.declaration.scala"
633
+ },
634
+ "2": {
635
+ "name": "entity.name.class"
636
+ }
637
+ },
638
+ "match": "\\b(extends|with|derives)\\b\\s*([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?=\\([^\\)]+=>)|(?=(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))|(?=\"))?"
639
+ }
640
+ ]
641
+ },
642
+ "initialization": {
643
+ "captures": {
644
+ "1": {
645
+ "name": "keyword.declaration.scala"
646
+ }
647
+ },
648
+ "match": "\\b(new)\\b"
649
+ },
650
+ "inline": {
651
+ "patterns": [
652
+ {
653
+ "match": "\\b(inline)(?=\\s+((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)|`[^`]+`)\\s*:)",
654
+ "name": "storage.modifier.other"
655
+ },
656
+ {
657
+ "match": "\\b(inline)\\b(?=(?:.(?!\\b(?:val|def|given)\\b))*\\b(if|match)\\b)",
658
+ "name": "keyword.control.flow.scala"
659
+ }
660
+ ]
661
+ },
662
+ "keywords": {
663
+ "patterns": [
664
+ {
665
+ "match": "\\b(return|throw)\\b",
666
+ "name": "keyword.control.flow.jump.scala"
667
+ },
668
+ {
669
+ "match": "\\b(classOf|isInstanceOf|asInstanceOf)\\b",
670
+ "name": "support.function.type-of.scala"
671
+ },
672
+ {
673
+ "match": "\\b(else|if|then|do|while|for|yield|match|case)\\b",
674
+ "name": "keyword.control.flow.scala"
675
+ },
676
+ {
677
+ "match": "^\\s*(end)\\s+(if|while|for|match)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)",
678
+ "name": "keyword.control.flow.end.scala"
679
+ },
680
+ {
681
+ "match": "^\\s*(end)\\s+(val)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)",
682
+ "name": "keyword.declaration.stable.end.scala"
683
+ },
684
+ {
685
+ "match": "^\\s*(end)\\s+(var)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)",
686
+ "name": "keyword.declaration.volatile.end.scala"
687
+ },
688
+ {
689
+ "captures": {
690
+ "1": {
691
+ "name": "keyword.declaration.end.scala"
692
+ },
693
+ "2": {
694
+ "name": "keyword.declaration.end.scala"
695
+ },
696
+ "3": {
697
+ "name": "entity.name.type.declaration"
698
+ }
699
+ },
700
+ "match": "^\\s*(end)\\s+(?:(new|extension)|([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)"
701
+ },
702
+ {
703
+ "match": "\\b(catch|finally|try)\\b",
704
+ "name": "keyword.control.exception.scala"
705
+ },
706
+ {
707
+ "match": "^\\s*(end)\\s+(try)(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)",
708
+ "name": "keyword.control.exception.end.scala"
709
+ },
710
+ {
711
+ "captures": {
712
+ "1": {
713
+ "name": "keyword.declaration.end.scala"
714
+ },
715
+ "2": {
716
+ "name": "entity.name.declaration"
717
+ }
718
+ },
719
+ "match": "^\\s*(end)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+))?(?=\\s*(//.*|/\\*(?!.*\\*/\\s*\\S.*).*)?$)"
720
+ },
721
+ {
722
+ "match": "(==?|!=|<=|>=|<>|<|>)",
723
+ "name": "keyword.operator.comparison.scala"
724
+ },
725
+ {
726
+ "match": "(\\-|\\+|\\*|/(?![/*])|%|~)",
727
+ "name": "keyword.operator.arithmetic.scala"
728
+ },
729
+ {
730
+ "match": "(?<![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]|_)(!|&&|\\|\\|)(?![!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}])",
731
+ "name": "keyword.operator.logical.scala"
732
+ },
733
+ {
734
+ "match": "(<-|←|->|→|=>|⇒|\\?|\\:+|@|\\|)+",
735
+ "name": "keyword.operator.scala"
736
+ }
737
+ ]
738
+ },
739
+ "meta-bounds": {
740
+ "comment": "For themes: Matching view bounds",
741
+ "match": "<%|=:=|<:<|<%<|>:|<:",
742
+ "name": "meta.bounds.scala"
743
+ },
744
+ "meta-brackets": {
745
+ "comment": "For themes: Brackets look nice when colored.",
746
+ "patterns": [
747
+ {
748
+ "comment": "The punctuation.section.*.begin is needed for return snippet in source bundle",
749
+ "match": "\\{",
750
+ "name": "punctuation.section.block.begin.scala"
751
+ },
752
+ {
753
+ "comment": "The punctuation.section.*.end is needed for return snippet in source bundle",
754
+ "match": "\\}",
755
+ "name": "punctuation.section.block.end.scala"
756
+ },
757
+ {
758
+ "match": "{|}|\\(|\\)|\\[|\\]",
759
+ "name": "meta.bracket.scala"
760
+ }
761
+ ]
762
+ },
763
+ "meta-colons": {
764
+ "comment": "For themes: Matching type colons",
765
+ "patterns": [
766
+ {
767
+ "match": "(?<!:):(?!:)",
768
+ "name": "meta.colon.scala"
769
+ }
770
+ ]
771
+ },
772
+ "parameter-list": {
773
+ "patterns": [
774
+ {
775
+ "captures": {
776
+ "1": {
777
+ "name": "variable.parameter.scala"
778
+ },
779
+ "2": {
780
+ "name": "meta.colon.scala"
781
+ }
782
+ },
783
+ "match": "(?<=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+"
784
+ }
785
+ ]
786
+ },
787
+ "qualifiedClassName": {
788
+ "captures": {
789
+ "1": {
790
+ "name": "entity.name.class"
791
+ }
792
+ },
793
+ "match": "(\\b([A-Z][\\w]*)(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?)"
794
+ },
795
+ "scala-quoted-or-symbol": {
796
+ "patterns": [
797
+ {
798
+ "captures": {
799
+ "1": {
800
+ "name": "keyword.control.flow.staging.scala constant.other.symbol.scala"
801
+ },
802
+ "2": {
803
+ "name": "constant.other.symbol.scala"
804
+ }
805
+ },
806
+ "match": "(')((?>(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)))(?!')"
807
+ },
808
+ {
809
+ "match": "'(?=\\s*\\{(?!'))",
810
+ "name": "keyword.control.flow.staging.scala"
811
+ },
812
+ {
813
+ "match": "'(?=\\s*\\[(?!'))",
814
+ "name": "keyword.control.flow.staging.scala"
815
+ },
816
+ {
817
+ "match": "\\$(?=\\s*\\{)",
818
+ "name": "keyword.control.flow.staging.scala"
819
+ }
820
+ ]
821
+ },
822
+ "script-header": {
823
+ "captures": {
824
+ "1": {
825
+ "name": "string.unquoted.shebang.scala"
826
+ }
827
+ },
828
+ "match": "^#!(.*)$",
829
+ "name": "comment.block.shebang.scala"
830
+ },
831
+ "singleton-type": {
832
+ "captures": {
833
+ "1": {
834
+ "name": "keyword.type.scala"
835
+ }
836
+ },
837
+ "match": "\\.(type)(?![A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[0-9])"
838
+ },
839
+ "storage-modifiers": {
840
+ "patterns": [
841
+ {
842
+ "match": "\\b(private\\[\\S+\\]|protected\\[\\S+\\]|private|protected)\\b",
843
+ "name": "storage.modifier.access"
844
+ },
845
+ {
846
+ "match": "\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b",
847
+ "name": "storage.modifier.other"
848
+ },
849
+ {
850
+ "match": "(?<=^|\\s)\\b(transparent|opaque|infix|open|inline)\\b(?=[a-z\\s]*\\b(def|val|var|given|type|class|trait|object|enum)\\b)",
851
+ "name": "storage.modifier.other"
852
+ }
853
+ ]
854
+ },
855
+ "string-interpolation": {
856
+ "patterns": [
857
+ {
858
+ "match": "\\$\\$",
859
+ "name": "constant.character.escape.interpolation.scala"
860
+ },
861
+ {
862
+ "captures": {
863
+ "1": {
864
+ "name": "punctuation.definition.template-expression.begin.scala"
865
+ }
866
+ },
867
+ "match": "(\\$)([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\p{Lo}\\p{Nl}\\p{Ll}0-9]*)",
868
+ "name": "meta.template.expression.scala"
869
+ },
870
+ {
871
+ "begin": "\\$\\{",
872
+ "beginCaptures": {
873
+ "0": {
874
+ "name": "punctuation.definition.template-expression.begin.scala"
875
+ }
876
+ },
877
+ "contentName": "meta.embedded.line.scala",
878
+ "end": "\\}",
879
+ "endCaptures": {
880
+ "0": {
881
+ "name": "punctuation.definition.template-expression.end.scala"
882
+ }
883
+ },
884
+ "name": "meta.template.expression.scala",
885
+ "patterns": [
886
+ {
887
+ "include": "#code"
888
+ }
889
+ ]
890
+ }
891
+ ]
892
+ },
893
+ "strings": {
894
+ "patterns": [
895
+ {
896
+ "begin": "\"\"\"",
897
+ "beginCaptures": {
898
+ "0": {
899
+ "name": "punctuation.definition.string.begin.scala"
900
+ }
901
+ },
902
+ "end": "\"\"\"(?!\")",
903
+ "endCaptures": {
904
+ "0": {
905
+ "name": "punctuation.definition.string.end.scala"
906
+ }
907
+ },
908
+ "name": "string.quoted.triple.scala",
909
+ "patterns": [
910
+ {
911
+ "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}",
912
+ "name": "constant.character.escape.scala"
913
+ }
914
+ ]
915
+ },
916
+ {
917
+ "begin": "\\b(raw)(\"\"\")",
918
+ "beginCaptures": {
919
+ "1": {
920
+ "name": "keyword.interpolation.scala"
921
+ },
922
+ "2": {
923
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"
924
+ }
925
+ },
926
+ "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])",
927
+ "endCaptures": {
928
+ "1": {
929
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"
930
+ },
931
+ "2": {
932
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
933
+ }
934
+ },
935
+ "patterns": [
936
+ {
937
+ "match": "\\$[\\$\"]",
938
+ "name": "constant.character.escape.scala"
939
+ },
940
+ {
941
+ "include": "#string-interpolation"
942
+ },
943
+ {
944
+ "match": ".",
945
+ "name": "string.quoted.triple.interpolated.scala"
946
+ }
947
+ ]
948
+ },
949
+ {
950
+ "begin": "\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\"\"\")",
951
+ "beginCaptures": {
952
+ "1": {
953
+ "name": "keyword.interpolation.scala"
954
+ },
955
+ "2": {
956
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"
957
+ }
958
+ },
959
+ "end": "(\"\"\")(?!\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])",
960
+ "endCaptures": {
961
+ "1": {
962
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"
963
+ },
964
+ "2": {
965
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
966
+ }
967
+ },
968
+ "patterns": [
969
+ {
970
+ "include": "#string-interpolation"
971
+ },
972
+ {
973
+ "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}",
974
+ "name": "constant.character.escape.scala"
975
+ },
976
+ {
977
+ "match": ".",
978
+ "name": "string.quoted.triple.interpolated.scala"
979
+ }
980
+ ]
981
+ },
982
+ {
983
+ "begin": "\"",
984
+ "beginCaptures": {
985
+ "0": {
986
+ "name": "punctuation.definition.string.begin.scala"
987
+ }
988
+ },
989
+ "end": "\"",
990
+ "endCaptures": {
991
+ "0": {
992
+ "name": "punctuation.definition.string.end.scala"
993
+ }
994
+ },
995
+ "name": "string.quoted.double.scala",
996
+ "patterns": [
997
+ {
998
+ "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})",
999
+ "name": "constant.character.escape.scala"
1000
+ },
1001
+ {
1002
+ "match": "\\\\.",
1003
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
1004
+ }
1005
+ ]
1006
+ },
1007
+ {
1008
+ "begin": "\\b(raw)(\")",
1009
+ "beginCaptures": {
1010
+ "1": {
1011
+ "name": "keyword.interpolation.scala"
1012
+ },
1013
+ "2": {
1014
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"
1015
+ }
1016
+ },
1017
+ "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])",
1018
+ "endCaptures": {
1019
+ "1": {
1020
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"
1021
+ },
1022
+ "2": {
1023
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
1024
+ }
1025
+ },
1026
+ "patterns": [
1027
+ {
1028
+ "match": "\\$[\\$\"]",
1029
+ "name": "constant.character.escape.scala"
1030
+ },
1031
+ {
1032
+ "include": "#string-interpolation"
1033
+ },
1034
+ {
1035
+ "match": ".",
1036
+ "name": "string.quoted.double.interpolated.scala"
1037
+ }
1038
+ ]
1039
+ },
1040
+ {
1041
+ "begin": "\\b((?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?))(\")",
1042
+ "beginCaptures": {
1043
+ "1": {
1044
+ "name": "keyword.interpolation.scala"
1045
+ },
1046
+ "2": {
1047
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"
1048
+ }
1049
+ },
1050
+ "end": "(\")|\\$\n|(\\$[^\\$\"_{A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}])",
1051
+ "endCaptures": {
1052
+ "1": {
1053
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"
1054
+ },
1055
+ "2": {
1056
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
1057
+ }
1058
+ },
1059
+ "patterns": [
1060
+ {
1061
+ "match": "\\$[\\$\"]",
1062
+ "name": "constant.character.escape.scala"
1063
+ },
1064
+ {
1065
+ "include": "#string-interpolation"
1066
+ },
1067
+ {
1068
+ "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})",
1069
+ "name": "constant.character.escape.scala"
1070
+ },
1071
+ {
1072
+ "match": "\\\\.",
1073
+ "name": "invalid.illegal.unrecognized-string-escape.scala"
1074
+ },
1075
+ {
1076
+ "match": ".",
1077
+ "name": "string.quoted.double.interpolated.scala"
1078
+ }
1079
+ ]
1080
+ }
1081
+ ]
1082
+ },
1083
+ "using": {
1084
+ "patterns": [
1085
+ {
1086
+ "captures": {
1087
+ "1": {
1088
+ "name": "keyword.declaration.scala"
1089
+ }
1090
+ },
1091
+ "match": "(?<=\\()\\s*(using)\\s"
1092
+ }
1093
+ ]
1094
+ },
1095
+ "using-directive": {
1096
+ "begin": "^\\s*(//>)\\s*(using)[^\\S\\n]+(?:(\\S+))?",
1097
+ "beginCaptures": {
1098
+ "1": {
1099
+ "name": "punctuation.definition.comment.scala"
1100
+ },
1101
+ "2": {
1102
+ "name": "keyword.other.import.scala"
1103
+ },
1104
+ "3": {
1105
+ "patterns": [
1106
+ {
1107
+ "match": "[A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?<=_)[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)?|[!#%&*+\\-\\/:<>=?@^|~\\p{Sm}\\p{So}]+)",
1108
+ "name": "entity.name.import.scala"
1109
+ },
1110
+ {
1111
+ "match": "\\.",
1112
+ "name": "punctuation.definition.import"
1113
+ }
1114
+ ]
1115
+ }
1116
+ },
1117
+ "end": "\\n",
1118
+ "name": "comment.line.shebang.scala",
1119
+ "patterns": [
1120
+ {
1121
+ "include": "#constants"
1122
+ },
1123
+ {
1124
+ "include": "#strings"
1125
+ },
1126
+ {
1127
+ "match": "[^\\s,]+",
1128
+ "name": "string.quoted.double.scala"
1129
+ }
1130
+ ]
1131
+ },
1132
+ "xml-doublequotedString": {
1133
+ "begin": "\"",
1134
+ "beginCaptures": {
1135
+ "0": {
1136
+ "name": "punctuation.definition.string.begin.xml"
1137
+ }
1138
+ },
1139
+ "end": "\"",
1140
+ "endCaptures": {
1141
+ "0": {
1142
+ "name": "punctuation.definition.string.end.xml"
1143
+ }
1144
+ },
1145
+ "name": "string.quoted.double.xml",
1146
+ "patterns": [
1147
+ {
1148
+ "include": "#xml-entity"
1149
+ }
1150
+ ]
1151
+ },
1152
+ "xml-embedded-content": {
1153
+ "patterns": [
1154
+ {
1155
+ "begin": "{",
1156
+ "captures": {
1157
+ "0": {
1158
+ "name": "meta.bracket.scala"
1159
+ }
1160
+ },
1161
+ "end": "}",
1162
+ "name": "meta.source.embedded.scala",
1163
+ "patterns": [
1164
+ {
1165
+ "include": "#code"
1166
+ }
1167
+ ]
1168
+ },
1169
+ {
1170
+ "captures": {
1171
+ "1": {
1172
+ "name": "entity.other.attribute-name.namespace.xml"
1173
+ },
1174
+ "2": {
1175
+ "name": "entity.other.attribute-name.xml"
1176
+ },
1177
+ "3": {
1178
+ "name": "punctuation.separator.namespace.xml"
1179
+ },
1180
+ "4": {
1181
+ "name": "entity.other.attribute-name.localname.xml"
1182
+ }
1183
+ },
1184
+ "match": " (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)="
1185
+ },
1186
+ {
1187
+ "include": "#xml-doublequotedString"
1188
+ },
1189
+ {
1190
+ "include": "#xml-singlequotedString"
1191
+ }
1192
+ ]
1193
+ },
1194
+ "xml-entity": {
1195
+ "captures": {
1196
+ "1": {
1197
+ "name": "punctuation.definition.constant.xml"
1198
+ },
1199
+ "3": {
1200
+ "name": "punctuation.definition.constant.xml"
1201
+ }
1202
+ },
1203
+ "match": "(&)([:a-zA-Z_][:a-zA-Z0-9_.-]*|#[0-9]+|#x[0-9a-fA-F]+)(;)",
1204
+ "name": "constant.character.entity.xml"
1205
+ },
1206
+ "xml-literal": {
1207
+ "patterns": [
1208
+ {
1209
+ "begin": "(<)((?:([_a-zA-Z0-9][_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*))(?=(\\s[^>]*)?></\\2>)",
1210
+ "beginCaptures": {
1211
+ "1": {
1212
+ "name": "punctuation.definition.tag.xml"
1213
+ },
1214
+ "3": {
1215
+ "name": "entity.name.tag.namespace.xml"
1216
+ },
1217
+ "4": {
1218
+ "name": "entity.name.tag.xml"
1219
+ },
1220
+ "5": {
1221
+ "name": "punctuation.separator.namespace.xml"
1222
+ },
1223
+ "6": {
1224
+ "name": "entity.name.tag.localname.xml"
1225
+ }
1226
+ },
1227
+ "comment": "We do not allow a tag name to start with a - since this would likely conflict with the <- operator. This is not very common for tag names anyway. Also code such as -- if (val <val2 || val> val3) will falsly be recognized as an xml tag. The solution is to put a space on either side of the comparison operator",
1228
+ "end": "(>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]*[_a-zA-Z0-9])(>)",
1229
+ "endCaptures": {
1230
+ "1": {
1231
+ "name": "punctuation.definition.tag.xml"
1232
+ },
1233
+ "2": {
1234
+ "name": "meta.scope.between-tag-pair.xml"
1235
+ },
1236
+ "3": {
1237
+ "name": "entity.name.tag.namespace.xml"
1238
+ },
1239
+ "4": {
1240
+ "name": "entity.name.tag.xml"
1241
+ },
1242
+ "5": {
1243
+ "name": "punctuation.separator.namespace.xml"
1244
+ },
1245
+ "6": {
1246
+ "name": "entity.name.tag.localname.xml"
1247
+ },
1248
+ "7": {
1249
+ "name": "punctuation.definition.tag.xml"
1250
+ }
1251
+ },
1252
+ "name": "meta.tag.no-content.xml",
1253
+ "patterns": [
1254
+ {
1255
+ "include": "#xml-embedded-content"
1256
+ }
1257
+ ]
1258
+ },
1259
+ {
1260
+ "begin": "(</?)(?:([_a-zA-Z0-9][-_a-zA-Z0-9]*)((:)))?([_a-zA-Z0-9][-_a-zA-Z0-9:]*)(?=[^>]*?>)",
1261
+ "captures": {
1262
+ "1": {
1263
+ "name": "punctuation.definition.tag.xml"
1264
+ },
1265
+ "2": {
1266
+ "name": "entity.name.tag.namespace.xml"
1267
+ },
1268
+ "3": {
1269
+ "name": "entity.name.tag.xml"
1270
+ },
1271
+ "4": {
1272
+ "name": "punctuation.separator.namespace.xml"
1273
+ },
1274
+ "5": {
1275
+ "name": "entity.name.tag.localname.xml"
1276
+ }
1277
+ },
1278
+ "end": "(/?>)",
1279
+ "name": "meta.tag.xml",
1280
+ "patterns": [
1281
+ {
1282
+ "include": "#xml-embedded-content"
1283
+ }
1284
+ ]
1285
+ },
1286
+ {
1287
+ "include": "#xml-entity"
1288
+ }
1289
+ ]
1290
+ },
1291
+ "xml-singlequotedString": {
1292
+ "begin": "'",
1293
+ "beginCaptures": {
1294
+ "0": {
1295
+ "name": "punctuation.definition.string.begin.xml"
1296
+ }
1297
+ },
1298
+ "end": "'",
1299
+ "endCaptures": {
1300
+ "0": {
1301
+ "name": "punctuation.definition.string.end.xml"
1302
+ }
1303
+ },
1304
+ "name": "string.quoted.single.xml",
1305
+ "patterns": [
1306
+ {
1307
+ "include": "#xml-entity"
1308
+ }
1309
+ ]
1310
+ }
1311
+ },
1312
+ "scopeName": "source.scala"
1313
+ }