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