| 1 | { |
| 2 | "name": "TypeScript", |
| 3 | "scopeName": "source.ts", |
| 4 | "fileTypes": ["ts"], |
| 5 | "uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a66", |
| 6 | "patterns": [ |
| 7 | { |
| 8 | "include": "#directives" |
| 9 | }, |
| 10 | { |
| 11 | "include": "#statements" |
| 12 | }, |
| 13 | { |
| 14 | "name": "comment.line.shebang.ts", |
| 15 | "match": "\\A(#!).*(?=$)", |
| 16 | "captures": { |
| 17 | "1": { |
| 18 | "name": "punctuation.definition.comment.ts" |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | ], |
| 23 | "repository": { |
| 24 | "statements": { |
| 25 | "patterns": [ |
| 26 | { |
| 27 | "include": "#string" |
| 28 | }, |
| 29 | { |
| 30 | "include": "#template" |
| 31 | }, |
| 32 | { |
| 33 | "include": "#comment" |
| 34 | }, |
| 35 | { |
| 36 | "include": "#literal" |
| 37 | }, |
| 38 | { |
| 39 | "include": "#declaration" |
| 40 | }, |
| 41 | { |
| 42 | "include": "#switch-statement" |
| 43 | }, |
| 44 | { |
| 45 | "include": "#for-loop" |
| 46 | }, |
| 47 | { |
| 48 | "include": "#after-operator-block" |
| 49 | }, |
| 50 | { |
| 51 | "include": "#decl-block" |
| 52 | }, |
| 53 | { |
| 54 | "include": "#control-statement" |
| 55 | }, |
| 56 | { |
| 57 | "include": "#expression" |
| 58 | }, |
| 59 | { |
| 60 | "include": "#punctuation-semicolon" |
| 61 | } |
| 62 | ] |
| 63 | }, |
| 64 | "var-expr": { |
| 65 | "name": "meta.var.expr.ts", |
| 66 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)", |
| 67 | "beginCaptures": { |
| 68 | "1": { |
| 69 | "name": "keyword.control.export.ts" |
| 70 | }, |
| 71 | "2": { |
| 72 | "name": "storage.type.ts" |
| 73 | } |
| 74 | }, |
| 75 | "end": "(?=$|;|}|(\\s+(of|in)\\s+))", |
| 76 | "patterns": [ |
| 77 | { |
| 78 | "include": "#destructuring-variable" |
| 79 | }, |
| 80 | { |
| 81 | "include": "#var-single-variable" |
| 82 | }, |
| 83 | { |
| 84 | "include": "#variable-initializer" |
| 85 | }, |
| 86 | { |
| 87 | "include": "#comment" |
| 88 | }, |
| 89 | { |
| 90 | "include": "#punctuation-comma" |
| 91 | } |
| 92 | ] |
| 93 | }, |
| 94 | "var-single-variable": { |
| 95 | "patterns": [ |
| 96 | { |
| 97 | "name": "meta.var-single-variable.expr.ts", |
| 98 | "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))", |
| 99 | "beginCaptures": { |
| 100 | "1": { |
| 101 | "name": "entity.name.function.ts" |
| 102 | } |
| 103 | }, |
| 104 | "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", |
| 105 | "patterns": [ |
| 106 | { |
| 107 | "include": "#type-annotation" |
| 108 | }, |
| 109 | { |
| 110 | "include": "#string" |
| 111 | }, |
| 112 | { |
| 113 | "include": "#comment" |
| 114 | } |
| 115 | ] |
| 116 | }, |
| 117 | { |
| 118 | "name": "meta.var-single-variable.expr.ts", |
| 119 | "begin": "([_$[:alpha:]][_$[:alnum:]]*)", |
| 120 | "beginCaptures": { |
| 121 | "1": { |
| 122 | "name": "variable.other.readwrite.ts" |
| 123 | } |
| 124 | }, |
| 125 | "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", |
| 126 | "patterns": [ |
| 127 | { |
| 128 | "include": "#type-annotation" |
| 129 | }, |
| 130 | { |
| 131 | "include": "#string" |
| 132 | }, |
| 133 | { |
| 134 | "include": "#comment" |
| 135 | } |
| 136 | ] |
| 137 | } |
| 138 | ] |
| 139 | }, |
| 140 | "destructuring-variable": { |
| 141 | "patterns": [ |
| 142 | { |
| 143 | "name": "meta.object-binding-pattern-variable.ts", |
| 144 | "begin": "(?<!=|:|of|in)\\s*(?=\\{)", |
| 145 | "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", |
| 146 | "patterns": [ |
| 147 | { |
| 148 | "include": "#object-binding-pattern" |
| 149 | }, |
| 150 | { |
| 151 | "include": "#type-annotation" |
| 152 | }, |
| 153 | { |
| 154 | "include": "#comment" |
| 155 | } |
| 156 | ] |
| 157 | }, |
| 158 | { |
| 159 | "name": "meta.array-binding-pattern-variable.ts", |
| 160 | "begin": "(?<!=|:|of|in)\\s*(?=\\[)", |
| 161 | "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", |
| 162 | "patterns": [ |
| 163 | { |
| 164 | "include": "#array-binding-pattern" |
| 165 | }, |
| 166 | { |
| 167 | "include": "#type-annotation" |
| 168 | }, |
| 169 | { |
| 170 | "include": "#comment" |
| 171 | } |
| 172 | ] |
| 173 | } |
| 174 | ] |
| 175 | }, |
| 176 | "object-binding-element": { |
| 177 | "patterns": [ |
| 178 | { |
| 179 | "include": "#comment" |
| 180 | }, |
| 181 | { |
| 182 | "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))", |
| 183 | "end": "(?=,|\\})", |
| 184 | "patterns": [ |
| 185 | { |
| 186 | "include": "#object-binding-element-propertyName" |
| 187 | }, |
| 188 | { |
| 189 | "include": "#binding-element" |
| 190 | } |
| 191 | ] |
| 192 | }, |
| 193 | { |
| 194 | "include": "#object-binding-pattern" |
| 195 | }, |
| 196 | { |
| 197 | "include": "#destructuring-variable-rest" |
| 198 | }, |
| 199 | { |
| 200 | "include": "#variable-initializer" |
| 201 | }, |
| 202 | { |
| 203 | "include": "#punctuation-comma" |
| 204 | } |
| 205 | ] |
| 206 | }, |
| 207 | "object-binding-element-propertyName": { |
| 208 | "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))", |
| 209 | "end": "(:)", |
| 210 | "endCaptures": { |
| 211 | "0": { |
| 212 | "name": "punctuation.destructuring.ts" |
| 213 | } |
| 214 | }, |
| 215 | "patterns": [ |
| 216 | { |
| 217 | "include": "#string" |
| 218 | }, |
| 219 | { |
| 220 | "include": "#array-literal" |
| 221 | }, |
| 222 | { |
| 223 | "name": "variable.object.property.ts", |
| 224 | "match": "([_$[:alpha:]][_$[:alnum:]]*)" |
| 225 | } |
| 226 | ] |
| 227 | }, |
| 228 | "binding-element": { |
| 229 | "patterns": [ |
| 230 | { |
| 231 | "include": "#comment" |
| 232 | }, |
| 233 | { |
| 234 | "include": "#object-binding-pattern" |
| 235 | }, |
| 236 | { |
| 237 | "include": "#array-binding-pattern" |
| 238 | }, |
| 239 | { |
| 240 | "include": "#destructuring-variable-rest" |
| 241 | }, |
| 242 | { |
| 243 | "include": "#variable-initializer" |
| 244 | } |
| 245 | ] |
| 246 | }, |
| 247 | "destructuring-variable-rest": { |
| 248 | "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", |
| 249 | "captures": { |
| 250 | "1": { |
| 251 | "name": "keyword.operator.rest.ts" |
| 252 | }, |
| 253 | "2": { |
| 254 | "name": "variable.other.readwrite.ts" |
| 255 | } |
| 256 | } |
| 257 | }, |
| 258 | "object-binding-pattern": { |
| 259 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", |
| 260 | "beginCaptures": { |
| 261 | "1": { |
| 262 | "name": "keyword.operator.rest.ts" |
| 263 | }, |
| 264 | "2": { |
| 265 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 266 | } |
| 267 | }, |
| 268 | "end": "\\}", |
| 269 | "endCaptures": { |
| 270 | "0": { |
| 271 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 272 | } |
| 273 | }, |
| 274 | "patterns": [ |
| 275 | { |
| 276 | "include": "#object-binding-element" |
| 277 | } |
| 278 | ] |
| 279 | }, |
| 280 | "array-binding-pattern": { |
| 281 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", |
| 282 | "beginCaptures": { |
| 283 | "1": { |
| 284 | "name": "keyword.operator.rest.ts" |
| 285 | }, |
| 286 | "2": { |
| 287 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 288 | } |
| 289 | }, |
| 290 | "end": "\\]", |
| 291 | "endCaptures": { |
| 292 | "0": { |
| 293 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 294 | } |
| 295 | }, |
| 296 | "patterns": [ |
| 297 | { |
| 298 | "include": "#binding-element" |
| 299 | }, |
| 300 | { |
| 301 | "include": "#punctuation-comma" |
| 302 | } |
| 303 | ] |
| 304 | }, |
| 305 | "ternary-expression": { |
| 306 | "begin": "(?=\\?)", |
| 307 | "end": "(?=$|[;,})\\]])", |
| 308 | "patterns": [ |
| 309 | { |
| 310 | "include": "#ternary-operator" |
| 311 | }, |
| 312 | { |
| 313 | "include": "#expression" |
| 314 | } |
| 315 | ] |
| 316 | }, |
| 317 | "ternary-operator": { |
| 318 | "begin": "(\\?)", |
| 319 | "beginCaptures": { |
| 320 | "0": { |
| 321 | "name": "keyword.operator.ternary.ts" |
| 322 | } |
| 323 | }, |
| 324 | "end": "(:)", |
| 325 | "endCaptures": { |
| 326 | "0": { |
| 327 | "name": "keyword.operator.ternary.ts" |
| 328 | } |
| 329 | }, |
| 330 | "patterns": [ |
| 331 | { |
| 332 | "include": "#expression" |
| 333 | } |
| 334 | ] |
| 335 | }, |
| 336 | "expression": { |
| 337 | "name": "meta.expression.ts", |
| 338 | "patterns": [ |
| 339 | { |
| 340 | "include": "#string" |
| 341 | }, |
| 342 | { |
| 343 | "include": "#regex" |
| 344 | }, |
| 345 | { |
| 346 | "include": "#template" |
| 347 | }, |
| 348 | { |
| 349 | "include": "#comment" |
| 350 | }, |
| 351 | { |
| 352 | "include": "#literal" |
| 353 | }, |
| 354 | { |
| 355 | "include": "#function-declaration" |
| 356 | }, |
| 357 | { |
| 358 | "include": "#class-or-interface-declaration" |
| 359 | }, |
| 360 | { |
| 361 | "include": "#arrow-function" |
| 362 | }, |
| 363 | { |
| 364 | "include": "#cast" |
| 365 | }, |
| 366 | { |
| 367 | "include": "#ternary-expression" |
| 368 | }, |
| 369 | { |
| 370 | "include": "#new-expr" |
| 371 | }, |
| 372 | { |
| 373 | "include": "#object-literal" |
| 374 | }, |
| 375 | { |
| 376 | "include": "#expression-operators" |
| 377 | }, |
| 378 | { |
| 379 | "include": "#function-call" |
| 380 | }, |
| 381 | { |
| 382 | "include": "#support-objects" |
| 383 | }, |
| 384 | { |
| 385 | "include": "#identifiers" |
| 386 | }, |
| 387 | { |
| 388 | "include": "#paren-expression" |
| 389 | }, |
| 390 | { |
| 391 | "include": "#punctuation-comma" |
| 392 | }, |
| 393 | { |
| 394 | "include": "#punctuation-accessor" |
| 395 | } |
| 396 | ] |
| 397 | }, |
| 398 | "control-statement": { |
| 399 | "patterns": [ |
| 400 | { |
| 401 | "name": "keyword.control.trycatch.ts", |
| 402 | "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)" |
| 403 | }, |
| 404 | { |
| 405 | "name": "keyword.control.loop.ts", |
| 406 | "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)" |
| 407 | }, |
| 408 | { |
| 409 | "name": "keyword.control.flow.ts", |
| 410 | "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)" |
| 411 | }, |
| 412 | { |
| 413 | "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?", |
| 414 | "captures": { |
| 415 | "1": { |
| 416 | "name": "keyword.control.flow.ts" |
| 417 | }, |
| 418 | "2": { |
| 419 | "name": "keyword.generator.asterisk.ts" |
| 420 | } |
| 421 | } |
| 422 | }, |
| 423 | { |
| 424 | "name": "keyword.control.switch.ts", |
| 425 | "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)" |
| 426 | }, |
| 427 | { |
| 428 | "name": "keyword.control.conditional.ts", |
| 429 | "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)" |
| 430 | }, |
| 431 | { |
| 432 | "name": "keyword.control.with.ts", |
| 433 | "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)" |
| 434 | }, |
| 435 | { |
| 436 | "name": "keyword.other.debugger.ts", |
| 437 | "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)" |
| 438 | }, |
| 439 | { |
| 440 | "name": "storage.modifier.ts", |
| 441 | "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)" |
| 442 | } |
| 443 | ] |
| 444 | }, |
| 445 | "declaration": { |
| 446 | "name": "meta.declaration.ts", |
| 447 | "patterns": [ |
| 448 | { |
| 449 | "include": "#decorator" |
| 450 | }, |
| 451 | { |
| 452 | "include": "#var-expr" |
| 453 | }, |
| 454 | { |
| 455 | "include": "#function-declaration" |
| 456 | }, |
| 457 | { |
| 458 | "include": "#class-or-interface-declaration" |
| 459 | }, |
| 460 | { |
| 461 | "include": "#type-declaration" |
| 462 | }, |
| 463 | { |
| 464 | "include": "#enum-declaration" |
| 465 | }, |
| 466 | { |
| 467 | "include": "#namespace-declaration" |
| 468 | }, |
| 469 | { |
| 470 | "include": "#import-equals-declaration" |
| 471 | }, |
| 472 | { |
| 473 | "include": "#import-declaration" |
| 474 | }, |
| 475 | { |
| 476 | "include": "#export-declaration" |
| 477 | } |
| 478 | ] |
| 479 | }, |
| 480 | "decorator": { |
| 481 | "name": "meta.decorator.ts", |
| 482 | "begin": "(?<!\\.|\\$)\\@", |
| 483 | "beginCaptures": { |
| 484 | "0": { |
| 485 | "name": "punctuation.decorator.ts" |
| 486 | } |
| 487 | }, |
| 488 | "end": "(?=\\s)", |
| 489 | "patterns": [ |
| 490 | { |
| 491 | "include": "#expression" |
| 492 | } |
| 493 | ] |
| 494 | }, |
| 495 | "type-declaration": { |
| 496 | "name": "meta.type.declaration.ts", |
| 497 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", |
| 498 | "beginCaptures": { |
| 499 | "1": { |
| 500 | "name": "keyword.control.export.ts" |
| 501 | }, |
| 502 | "2": { |
| 503 | "name": "storage.type.type.ts" |
| 504 | }, |
| 505 | "3": { |
| 506 | "name": "entity.name.type.ts" |
| 507 | } |
| 508 | }, |
| 509 | "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)", |
| 510 | "patterns": [ |
| 511 | { |
| 512 | "include": "#comment" |
| 513 | }, |
| 514 | { |
| 515 | "include": "#type-parameters" |
| 516 | }, |
| 517 | { |
| 518 | "include": "#type" |
| 519 | }, |
| 520 | { |
| 521 | "match": "(=)\\s*", |
| 522 | "captures": { |
| 523 | "1": { |
| 524 | "name": "keyword.operator.assignment.ts" |
| 525 | } |
| 526 | } |
| 527 | } |
| 528 | ] |
| 529 | }, |
| 530 | "enum-declaration": { |
| 531 | "name": "meta.enum.declaration.ts", |
| 532 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", |
| 533 | "beginCaptures": { |
| 534 | "1": { |
| 535 | "name": "keyword.control.export.ts" |
| 536 | }, |
| 537 | "2": { |
| 538 | "name": "storage.modifier.ts" |
| 539 | }, |
| 540 | "3": { |
| 541 | "name": "storage.type.enum.ts" |
| 542 | }, |
| 543 | "4": { |
| 544 | "name": "entity.name.type.enum.ts" |
| 545 | } |
| 546 | }, |
| 547 | "end": "(?<=\\})", |
| 548 | "patterns": [ |
| 549 | { |
| 550 | "include": "#comment" |
| 551 | }, |
| 552 | { |
| 553 | "begin": "\\{", |
| 554 | "beginCaptures": { |
| 555 | "0": { |
| 556 | "name": "punctuation.definition.block.ts" |
| 557 | } |
| 558 | }, |
| 559 | "end": "\\}", |
| 560 | "endCaptures": { |
| 561 | "0": { |
| 562 | "name": "punctuation.definition.block.ts" |
| 563 | } |
| 564 | }, |
| 565 | "patterns": [ |
| 566 | { |
| 567 | "include": "#comment" |
| 568 | }, |
| 569 | { |
| 570 | "begin": "([_$[:alpha:]][_$[:alnum:]]*)", |
| 571 | "beginCaptures": { |
| 572 | "0": { |
| 573 | "name": "variable.other.enummember.ts" |
| 574 | } |
| 575 | }, |
| 576 | "end": "(?=,|\\}|$)", |
| 577 | "patterns": [ |
| 578 | { |
| 579 | "include": "#comment" |
| 580 | }, |
| 581 | { |
| 582 | "include": "#variable-initializer" |
| 583 | } |
| 584 | ] |
| 585 | }, |
| 586 | { |
| 587 | "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\])))", |
| 588 | "end": "(?=,|\\}|$)", |
| 589 | "patterns": [ |
| 590 | { |
| 591 | "include": "#string" |
| 592 | }, |
| 593 | { |
| 594 | "include": "#array-literal" |
| 595 | }, |
| 596 | { |
| 597 | "include": "#comment" |
| 598 | }, |
| 599 | { |
| 600 | "include": "#variable-initializer" |
| 601 | } |
| 602 | ] |
| 603 | }, |
| 604 | { |
| 605 | "include": "#punctuation-comma" |
| 606 | } |
| 607 | ] |
| 608 | } |
| 609 | ] |
| 610 | }, |
| 611 | "namespace-declaration": { |
| 612 | "name": "meta.namespace.declaration.ts", |
| 613 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+", |
| 614 | "beginCaptures": { |
| 615 | "1": { |
| 616 | "name": "keyword.control.export.ts" |
| 617 | }, |
| 618 | "2": { |
| 619 | "name": "storage.type.namespace.ts" |
| 620 | } |
| 621 | }, |
| 622 | "end": "(?=$|\\{)", |
| 623 | "patterns": [ |
| 624 | { |
| 625 | "include": "#comment" |
| 626 | }, |
| 627 | { |
| 628 | "include": "#string" |
| 629 | }, |
| 630 | { |
| 631 | "name": "entity.name.type.module.ts", |
| 632 | "match": "([_$[:alpha:]][_$[:alnum:]]*)" |
| 633 | }, |
| 634 | { |
| 635 | "name": "punctuation.accessor.ts", |
| 636 | "match": "\\." |
| 637 | } |
| 638 | ] |
| 639 | }, |
| 640 | "import-equals-declaration": { |
| 641 | "patterns": [ |
| 642 | { |
| 643 | "name": "meta.import-equals.external.ts", |
| 644 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", |
| 645 | "beginCaptures": { |
| 646 | "1": { |
| 647 | "name": "keyword.control.export.ts" |
| 648 | }, |
| 649 | "2": { |
| 650 | "name": "keyword.control.import.ts" |
| 651 | }, |
| 652 | "3": { |
| 653 | "name": "variable.other.readwrite.alias.ts" |
| 654 | }, |
| 655 | "4": { |
| 656 | "name": "keyword.operator.assignment.ts" |
| 657 | }, |
| 658 | "5": { |
| 659 | "name": "keyword.control.require.ts" |
| 660 | }, |
| 661 | "6": { |
| 662 | "name": "meta.brace.round.ts" |
| 663 | } |
| 664 | }, |
| 665 | "end": "\\)", |
| 666 | "endCaptures": { |
| 667 | "0": { |
| 668 | "name": "meta.brace.round.ts" |
| 669 | } |
| 670 | }, |
| 671 | "patterns": [ |
| 672 | { |
| 673 | "include": "#comment" |
| 674 | }, |
| 675 | { |
| 676 | "include": "#string" |
| 677 | } |
| 678 | ] |
| 679 | }, |
| 680 | { |
| 681 | "name": "meta.import-equals.internal.ts", |
| 682 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", |
| 683 | "beginCaptures": { |
| 684 | "1": { |
| 685 | "name": "keyword.control.export.ts" |
| 686 | }, |
| 687 | "2": { |
| 688 | "name": "keyword.control.import.ts" |
| 689 | }, |
| 690 | "3": { |
| 691 | "name": "variable.other.readwrite.alias.ts" |
| 692 | }, |
| 693 | "4": { |
| 694 | "name": "keyword.operator.assignment.ts" |
| 695 | } |
| 696 | }, |
| 697 | "end": "(?=;|$)", |
| 698 | "patterns": [ |
| 699 | { |
| 700 | "include": "#comment" |
| 701 | }, |
| 702 | { |
| 703 | "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)", |
| 704 | "captures": { |
| 705 | "1": { |
| 706 | "name": "entity.name.type.module.ts" |
| 707 | }, |
| 708 | "2": { |
| 709 | "name": "punctuation.accessor.ts" |
| 710 | } |
| 711 | } |
| 712 | }, |
| 713 | { |
| 714 | "name": "variable.other.readwrite.ts", |
| 715 | "match": "([_$[:alpha:]][_$[:alnum:]]*)" |
| 716 | } |
| 717 | ] |
| 718 | } |
| 719 | ] |
| 720 | }, |
| 721 | "import-declaration": { |
| 722 | "name": "meta.import.ts", |
| 723 | "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b", |
| 724 | "beginCaptures": { |
| 725 | "1": { |
| 726 | "name": "keyword.control.export.ts" |
| 727 | }, |
| 728 | "2": { |
| 729 | "name": "keyword.control.import.ts" |
| 730 | } |
| 731 | }, |
| 732 | "end": "(?=;|$)", |
| 733 | "patterns": [ |
| 734 | { |
| 735 | "include": "#import-export-declaration" |
| 736 | } |
| 737 | ] |
| 738 | }, |
| 739 | "export-declaration": { |
| 740 | "patterns": [ |
| 741 | { |
| 742 | "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", |
| 743 | "captures": { |
| 744 | "1": { |
| 745 | "name": "keyword.control.export.ts" |
| 746 | }, |
| 747 | "2": { |
| 748 | "name": "keyword.control.as.ts" |
| 749 | }, |
| 750 | "3": { |
| 751 | "name": "storage.type.namespace.ts" |
| 752 | }, |
| 753 | "4": { |
| 754 | "name": "entity.name.type.module.ts" |
| 755 | } |
| 756 | } |
| 757 | }, |
| 758 | { |
| 759 | "name": "meta.export.default.ts", |
| 760 | "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", |
| 761 | "beginCaptures": { |
| 762 | "1": { |
| 763 | "name": "keyword.control.export.ts" |
| 764 | }, |
| 765 | "2": { |
| 766 | "name": "keyword.operator.assignment.ts" |
| 767 | }, |
| 768 | "3": { |
| 769 | "name": "keyword.control.default.ts" |
| 770 | } |
| 771 | }, |
| 772 | "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)", |
| 773 | "patterns": [ |
| 774 | { |
| 775 | "include": "#expression" |
| 776 | } |
| 777 | ] |
| 778 | }, |
| 779 | { |
| 780 | "name": "meta.export.ts", |
| 781 | "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b", |
| 782 | "beginCaptures": { |
| 783 | "0": { |
| 784 | "name": "keyword.control.export.ts" |
| 785 | } |
| 786 | }, |
| 787 | "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)", |
| 788 | "patterns": [ |
| 789 | { |
| 790 | "include": "#import-export-declaration" |
| 791 | } |
| 792 | ] |
| 793 | } |
| 794 | ] |
| 795 | }, |
| 796 | "import-export-declaration": { |
| 797 | "patterns": [ |
| 798 | { |
| 799 | "include": "#comment" |
| 800 | }, |
| 801 | { |
| 802 | "include": "#string" |
| 803 | }, |
| 804 | { |
| 805 | "include": "#import-export-block" |
| 806 | }, |
| 807 | { |
| 808 | "name": "keyword.control.from.ts", |
| 809 | "match": "\\bfrom\\b" |
| 810 | }, |
| 811 | { |
| 812 | "include": "#import-export-clause" |
| 813 | } |
| 814 | ] |
| 815 | }, |
| 816 | "import-export-block": { |
| 817 | "name": "meta.block.ts", |
| 818 | "begin": "\\{", |
| 819 | "beginCaptures": { |
| 820 | "0": { |
| 821 | "name": "punctuation.definition.block.ts" |
| 822 | } |
| 823 | }, |
| 824 | "end": "\\}", |
| 825 | "endCaptures": { |
| 826 | "0": { |
| 827 | "name": "punctuation.definition.block.ts" |
| 828 | } |
| 829 | }, |
| 830 | "patterns": [ |
| 831 | { |
| 832 | "include": "#import-export-clause" |
| 833 | } |
| 834 | ] |
| 835 | }, |
| 836 | "import-export-clause": { |
| 837 | "patterns": [ |
| 838 | { |
| 839 | "include": "#comment" |
| 840 | }, |
| 841 | { |
| 842 | "comment": "(default|*|name) as alias", |
| 843 | "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))", |
| 844 | "captures": { |
| 845 | "1": { |
| 846 | "name": "keyword.control.default.ts" |
| 847 | }, |
| 848 | "2": { |
| 849 | "name": "constant.language.import-export-all.ts" |
| 850 | }, |
| 851 | "3": { |
| 852 | "name": "variable.other.readwrite.ts" |
| 853 | }, |
| 854 | "4": { |
| 855 | "name": "keyword.control.as.ts" |
| 856 | }, |
| 857 | "5": { |
| 858 | "name": "invalid.illegal.ts" |
| 859 | }, |
| 860 | "6": { |
| 861 | "name": "variable.other.readwrite.alias.ts" |
| 862 | } |
| 863 | } |
| 864 | }, |
| 865 | { |
| 866 | "include": "#punctuation-comma" |
| 867 | }, |
| 868 | { |
| 869 | "name": "constant.language.import-export-all.ts", |
| 870 | "match": "\\*" |
| 871 | }, |
| 872 | { |
| 873 | "name": "keyword.control.default.ts", |
| 874 | "match": "\\b(default)\\b" |
| 875 | }, |
| 876 | { |
| 877 | "name": "variable.other.readwrite.alias.ts", |
| 878 | "match": "([_$[:alpha:]][_$[:alnum:]]*)" |
| 879 | } |
| 880 | ] |
| 881 | }, |
| 882 | "class-or-interface-declaration": { |
| 883 | "name": "meta.class.ts", |
| 884 | "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b", |
| 885 | "beginCaptures": { |
| 886 | "1": { |
| 887 | "name": "keyword.control.export.ts" |
| 888 | }, |
| 889 | "2": { |
| 890 | "name": "storage.modifier.ts" |
| 891 | }, |
| 892 | "3": { |
| 893 | "name": "storage.type.class.ts" |
| 894 | }, |
| 895 | "4": { |
| 896 | "name": "storage.type.interface.ts" |
| 897 | } |
| 898 | }, |
| 899 | "end": "(?<=\\})", |
| 900 | "endCaptures": { |
| 901 | "1": { |
| 902 | "name": "punctuation.definition.block.ts" |
| 903 | } |
| 904 | }, |
| 905 | "patterns": [ |
| 906 | { |
| 907 | "include": "#comment" |
| 908 | }, |
| 909 | { |
| 910 | "include": "#class-or-interface-heritage" |
| 911 | }, |
| 912 | { |
| 913 | "match": "[_$[:alpha:]][_$[:alnum:]]*", |
| 914 | "captures": { |
| 915 | "0": { |
| 916 | "name": "entity.name.type.class.ts" |
| 917 | } |
| 918 | } |
| 919 | }, |
| 920 | { |
| 921 | "include": "#type-parameters" |
| 922 | }, |
| 923 | { |
| 924 | "include": "#class-or-interface-body" |
| 925 | } |
| 926 | ] |
| 927 | }, |
| 928 | "class-or-interface-heritage": { |
| 929 | "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)", |
| 930 | "beginCaptures": { |
| 931 | "1": { |
| 932 | "name": "storage.modifier.ts" |
| 933 | } |
| 934 | }, |
| 935 | "end": "(?=\\{)", |
| 936 | "endCaptures": { |
| 937 | "1": { |
| 938 | "name": "punctuation.definition.block.ts" |
| 939 | } |
| 940 | }, |
| 941 | "patterns": [ |
| 942 | { |
| 943 | "include": "#comment" |
| 944 | }, |
| 945 | { |
| 946 | "include": "#class-or-interface-heritage" |
| 947 | }, |
| 948 | { |
| 949 | "include": "#type-parameters" |
| 950 | }, |
| 951 | { |
| 952 | "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))", |
| 953 | "captures": { |
| 954 | "1": { |
| 955 | "name": "entity.name.type.module.ts" |
| 956 | }, |
| 957 | "2": { |
| 958 | "name": "punctuation.accessor.ts" |
| 959 | } |
| 960 | } |
| 961 | }, |
| 962 | { |
| 963 | "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))", |
| 964 | "captures": { |
| 965 | "1": { |
| 966 | "name": "entity.other.inherited-class.ts" |
| 967 | } |
| 968 | } |
| 969 | }, |
| 970 | { |
| 971 | "include": "#expression" |
| 972 | } |
| 973 | ] |
| 974 | }, |
| 975 | "class-or-interface-body": { |
| 976 | "begin": "\\{", |
| 977 | "beginCaptures": { |
| 978 | "0": { |
| 979 | "name": "punctuation.definition.block.ts" |
| 980 | } |
| 981 | }, |
| 982 | "end": "\\}", |
| 983 | "endCaptures": { |
| 984 | "0": { |
| 985 | "name": "punctuation.definition.block.ts" |
| 986 | } |
| 987 | }, |
| 988 | "patterns": [ |
| 989 | { |
| 990 | "include": "#string" |
| 991 | }, |
| 992 | { |
| 993 | "include": "#comment" |
| 994 | }, |
| 995 | { |
| 996 | "include": "#decorator" |
| 997 | }, |
| 998 | { |
| 999 | "include": "#method-declaration" |
| 1000 | }, |
| 1001 | { |
| 1002 | "include": "#indexer-declaration" |
| 1003 | }, |
| 1004 | { |
| 1005 | "include": "#field-declaration" |
| 1006 | }, |
| 1007 | { |
| 1008 | "include": "#type-annotation" |
| 1009 | }, |
| 1010 | { |
| 1011 | "include": "#variable-initializer" |
| 1012 | }, |
| 1013 | { |
| 1014 | "include": "#access-modifier" |
| 1015 | }, |
| 1016 | { |
| 1017 | "include": "#property-accessor" |
| 1018 | }, |
| 1019 | { |
| 1020 | "include": "#expression" |
| 1021 | }, |
| 1022 | { |
| 1023 | "include": "#punctuation-comma" |
| 1024 | }, |
| 1025 | { |
| 1026 | "include": "#punctuation-semicolon" |
| 1027 | } |
| 1028 | ] |
| 1029 | }, |
| 1030 | "type-object": { |
| 1031 | "name": "meta.object.type.ts", |
| 1032 | "begin": "\\{", |
| 1033 | "beginCaptures": { |
| 1034 | "0": { |
| 1035 | "name": "punctuation.definition.block.ts" |
| 1036 | } |
| 1037 | }, |
| 1038 | "end": "\\}", |
| 1039 | "endCaptures": { |
| 1040 | "0": { |
| 1041 | "name": "punctuation.definition.block.ts" |
| 1042 | } |
| 1043 | }, |
| 1044 | "patterns": [ |
| 1045 | { |
| 1046 | "include": "#type-object-members" |
| 1047 | } |
| 1048 | ] |
| 1049 | }, |
| 1050 | "type-object-members": { |
| 1051 | "patterns": [ |
| 1052 | { |
| 1053 | "include": "#comment" |
| 1054 | }, |
| 1055 | { |
| 1056 | "include": "#method-declaration" |
| 1057 | }, |
| 1058 | { |
| 1059 | "include": "#indexer-declaration" |
| 1060 | }, |
| 1061 | { |
| 1062 | "include": "#field-declaration" |
| 1063 | }, |
| 1064 | { |
| 1065 | "include": "#type-annotation" |
| 1066 | }, |
| 1067 | { |
| 1068 | "begin": "\\.\\.\\.", |
| 1069 | "beginCaptures": { |
| 1070 | "0": { |
| 1071 | "name": "keyword.operator.spread.ts" |
| 1072 | } |
| 1073 | }, |
| 1074 | "end": "(?=\\}|;|,|$)|(?<=\\})", |
| 1075 | "patterns": [ |
| 1076 | { |
| 1077 | "include": "#type" |
| 1078 | } |
| 1079 | ] |
| 1080 | }, |
| 1081 | { |
| 1082 | "include": "#punctuation-comma" |
| 1083 | }, |
| 1084 | { |
| 1085 | "include": "#punctuation-semicolon" |
| 1086 | } |
| 1087 | ] |
| 1088 | }, |
| 1089 | "field-declaration": { |
| 1090 | "name": "meta.field.declaration.ts", |
| 1091 | "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))", |
| 1092 | "beginCaptures": { |
| 1093 | "1": { |
| 1094 | "name": "storage.modifier.ts" |
| 1095 | } |
| 1096 | }, |
| 1097 | "end": "(?=\\}|;|,|$)|(?<=\\})", |
| 1098 | "patterns": [ |
| 1099 | { |
| 1100 | "include": "#variable-initializer" |
| 1101 | }, |
| 1102 | { |
| 1103 | "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))", |
| 1104 | "end": "(?=[};,=]|$)|(?<=\\})", |
| 1105 | "patterns": [ |
| 1106 | { |
| 1107 | "include": "#type-annotation" |
| 1108 | }, |
| 1109 | { |
| 1110 | "include": "#string" |
| 1111 | }, |
| 1112 | { |
| 1113 | "include": "#array-literal" |
| 1114 | }, |
| 1115 | { |
| 1116 | "include": "#comment" |
| 1117 | }, |
| 1118 | { |
| 1119 | "name": "entity.name.function.ts", |
| 1120 | "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))" |
| 1121 | }, |
| 1122 | { |
| 1123 | "name": "variable.object.property.ts", |
| 1124 | "match": "[_$[:alpha:]][_$[:alnum:]]*" |
| 1125 | }, |
| 1126 | { |
| 1127 | "name": "keyword.operator.optional.ts", |
| 1128 | "match": "\\?" |
| 1129 | } |
| 1130 | ] |
| 1131 | } |
| 1132 | ] |
| 1133 | }, |
| 1134 | "method-declaration": { |
| 1135 | "name": "meta.method.declaration.ts", |
| 1136 | "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))", |
| 1137 | "beginCaptures": { |
| 1138 | "1": { |
| 1139 | "name": "storage.modifier.ts" |
| 1140 | }, |
| 1141 | "2": { |
| 1142 | "name": "storage.modifier.ts" |
| 1143 | }, |
| 1144 | "3": { |
| 1145 | "name": "storage.modifier.async.ts" |
| 1146 | }, |
| 1147 | "4": { |
| 1148 | "name": "storage.type.property.ts" |
| 1149 | }, |
| 1150 | "5": { |
| 1151 | "name": "keyword.operator.new.ts" |
| 1152 | }, |
| 1153 | "6": { |
| 1154 | "name": "storage.type.ts" |
| 1155 | }, |
| 1156 | "7": { |
| 1157 | "name": "keyword.generator.asterisk.ts" |
| 1158 | } |
| 1159 | }, |
| 1160 | "end": "(?=\\}|;|,)|(?<=\\})", |
| 1161 | "patterns": [ |
| 1162 | { |
| 1163 | "include": "#method-declaration-name" |
| 1164 | }, |
| 1165 | { |
| 1166 | "include": "#comment" |
| 1167 | }, |
| 1168 | { |
| 1169 | "include": "#type-parameters" |
| 1170 | }, |
| 1171 | { |
| 1172 | "include": "#function-parameters" |
| 1173 | }, |
| 1174 | { |
| 1175 | "include": "#return-type" |
| 1176 | }, |
| 1177 | { |
| 1178 | "include": "#method-overload-declaration" |
| 1179 | }, |
| 1180 | { |
| 1181 | "include": "#decl-block" |
| 1182 | } |
| 1183 | ] |
| 1184 | }, |
| 1185 | "method-overload-declaration": { |
| 1186 | "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))", |
| 1187 | "beginCaptures": { |
| 1188 | "1": { |
| 1189 | "name": "storage.modifier.ts" |
| 1190 | }, |
| 1191 | "2": { |
| 1192 | "name": "storage.modifier.ts" |
| 1193 | }, |
| 1194 | "3": { |
| 1195 | "name": "storage.modifier.async.ts" |
| 1196 | }, |
| 1197 | "4": { |
| 1198 | "name": "storage.type.property.ts" |
| 1199 | }, |
| 1200 | "5": { |
| 1201 | "name": "keyword.operator.new.ts" |
| 1202 | }, |
| 1203 | "6": { |
| 1204 | "name": "storage.type.ts" |
| 1205 | }, |
| 1206 | "7": { |
| 1207 | "name": "keyword.generator.asterisk.ts" |
| 1208 | } |
| 1209 | }, |
| 1210 | "end": "(?=\\(|\\<)", |
| 1211 | "patterns": [ |
| 1212 | { |
| 1213 | "include": "#method-declaration-name" |
| 1214 | } |
| 1215 | ] |
| 1216 | }, |
| 1217 | "method-declaration-name": { |
| 1218 | "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", |
| 1219 | "end": "(?=\\(|\\<)", |
| 1220 | "patterns": [ |
| 1221 | { |
| 1222 | "include": "#string" |
| 1223 | }, |
| 1224 | { |
| 1225 | "include": "#array-literal" |
| 1226 | }, |
| 1227 | { |
| 1228 | "name": "entity.name.function.ts", |
| 1229 | "match": "[_$[:alpha:]][_$[:alnum:]]*" |
| 1230 | }, |
| 1231 | { |
| 1232 | "name": "keyword.operator.optional.ts", |
| 1233 | "match": "\\?" |
| 1234 | } |
| 1235 | ] |
| 1236 | }, |
| 1237 | "indexer-declaration": { |
| 1238 | "name": "meta.indexer.declaration.ts", |
| 1239 | "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", |
| 1240 | "beginCaptures": { |
| 1241 | "1": { |
| 1242 | "name": "storage.modifier.ts" |
| 1243 | }, |
| 1244 | "2": { |
| 1245 | "name": "meta.brace.square.ts" |
| 1246 | }, |
| 1247 | "3": { |
| 1248 | "name": "variable.parameter.ts" |
| 1249 | } |
| 1250 | }, |
| 1251 | "end": "(\\])\\s*(\\?\\s*)?|$", |
| 1252 | "endCaptures": { |
| 1253 | "1": { |
| 1254 | "name": "meta.brace.square.ts" |
| 1255 | }, |
| 1256 | "2": { |
| 1257 | "name": "keyword.operator.optional.ts" |
| 1258 | } |
| 1259 | }, |
| 1260 | "patterns": [ |
| 1261 | { |
| 1262 | "include": "#type-annotation" |
| 1263 | } |
| 1264 | ] |
| 1265 | }, |
| 1266 | "function-declaration": { |
| 1267 | "name": "meta.function.ts", |
| 1268 | "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", |
| 1269 | "beginCaptures": { |
| 1270 | "1": { |
| 1271 | "name": "keyword.control.export.ts" |
| 1272 | }, |
| 1273 | "2": { |
| 1274 | "name": "storage.modifier.async.ts" |
| 1275 | }, |
| 1276 | "3": { |
| 1277 | "name": "storage.type.function.ts" |
| 1278 | }, |
| 1279 | "4": { |
| 1280 | "name": "keyword.generator.asterisk.ts" |
| 1281 | }, |
| 1282 | "5": { |
| 1283 | "name": "entity.name.function.ts" |
| 1284 | } |
| 1285 | }, |
| 1286 | "end": "(?=;|\\})|(?<=\\})", |
| 1287 | "patterns": [ |
| 1288 | { |
| 1289 | "include": "#comment" |
| 1290 | }, |
| 1291 | { |
| 1292 | "include": "#type-parameters" |
| 1293 | }, |
| 1294 | { |
| 1295 | "include": "#function-parameters" |
| 1296 | }, |
| 1297 | { |
| 1298 | "include": "#return-type" |
| 1299 | }, |
| 1300 | { |
| 1301 | "include": "#function-overload-declaration" |
| 1302 | }, |
| 1303 | { |
| 1304 | "include": "#decl-block" |
| 1305 | } |
| 1306 | ] |
| 1307 | }, |
| 1308 | "function-overload-declaration": { |
| 1309 | "name": "meta.function.overload.ts", |
| 1310 | "match": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", |
| 1311 | "captures": { |
| 1312 | "1": { |
| 1313 | "name": "keyword.control.export.ts" |
| 1314 | }, |
| 1315 | "2": { |
| 1316 | "name": "storage.modifier.async.ts" |
| 1317 | }, |
| 1318 | "3": { |
| 1319 | "name": "storage.type.function.ts" |
| 1320 | }, |
| 1321 | "4": { |
| 1322 | "name": "keyword.generator.asterisk.ts" |
| 1323 | }, |
| 1324 | "5": { |
| 1325 | "name": "entity.name.function.ts" |
| 1326 | } |
| 1327 | } |
| 1328 | }, |
| 1329 | "object-literal": { |
| 1330 | "name": "meta.objectliteral.ts", |
| 1331 | "begin": "\\{", |
| 1332 | "beginCaptures": { |
| 1333 | "0": { |
| 1334 | "name": "punctuation.definition.block.ts" |
| 1335 | } |
| 1336 | }, |
| 1337 | "end": "\\}", |
| 1338 | "endCaptures": { |
| 1339 | "0": { |
| 1340 | "name": "punctuation.definition.block.ts" |
| 1341 | } |
| 1342 | }, |
| 1343 | "patterns": [ |
| 1344 | { |
| 1345 | "include": "#object-member" |
| 1346 | } |
| 1347 | ] |
| 1348 | }, |
| 1349 | "decl-block": { |
| 1350 | "name": "meta.block.ts", |
| 1351 | "begin": "\\{", |
| 1352 | "beginCaptures": { |
| 1353 | "0": { |
| 1354 | "name": "punctuation.definition.block.ts" |
| 1355 | } |
| 1356 | }, |
| 1357 | "end": "\\}", |
| 1358 | "endCaptures": { |
| 1359 | "0": { |
| 1360 | "name": "punctuation.definition.block.ts" |
| 1361 | } |
| 1362 | }, |
| 1363 | "patterns": [ |
| 1364 | { |
| 1365 | "include": "#statements" |
| 1366 | } |
| 1367 | ] |
| 1368 | }, |
| 1369 | "after-operator-block": { |
| 1370 | "name": "meta.objectliteral.ts", |
| 1371 | "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)", |
| 1372 | "beginCaptures": { |
| 1373 | "1": { |
| 1374 | "name": "punctuation.definition.block.ts" |
| 1375 | } |
| 1376 | }, |
| 1377 | "end": "\\}", |
| 1378 | "endCaptures": { |
| 1379 | "0": { |
| 1380 | "name": "punctuation.definition.block.ts" |
| 1381 | } |
| 1382 | }, |
| 1383 | "patterns": [ |
| 1384 | { |
| 1385 | "include": "#object-member" |
| 1386 | } |
| 1387 | ] |
| 1388 | }, |
| 1389 | "parameter-name": { |
| 1390 | "patterns": [ |
| 1391 | { |
| 1392 | "match": "(?x)(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))", |
| 1393 | "captures": { |
| 1394 | "1": { |
| 1395 | "name": "storage.modifier.ts" |
| 1396 | }, |
| 1397 | "2": { |
| 1398 | "name": "storage.modifier.ts" |
| 1399 | }, |
| 1400 | "3": { |
| 1401 | "name": "keyword.operator.rest.ts" |
| 1402 | }, |
| 1403 | "4": { |
| 1404 | "name": "entity.name.function.ts" |
| 1405 | }, |
| 1406 | "5": { |
| 1407 | "name": "keyword.operator.optional.ts" |
| 1408 | } |
| 1409 | } |
| 1410 | }, |
| 1411 | { |
| 1412 | "match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)", |
| 1413 | "captures": { |
| 1414 | "1": { |
| 1415 | "name": "storage.modifier.ts" |
| 1416 | }, |
| 1417 | "2": { |
| 1418 | "name": "storage.modifier.ts" |
| 1419 | }, |
| 1420 | "3": { |
| 1421 | "name": "keyword.operator.rest.ts" |
| 1422 | }, |
| 1423 | "4": { |
| 1424 | "name": "variable.parameter.ts" |
| 1425 | }, |
| 1426 | "5": { |
| 1427 | "name": "keyword.operator.optional.ts" |
| 1428 | } |
| 1429 | } |
| 1430 | } |
| 1431 | ] |
| 1432 | }, |
| 1433 | "destructuring-parameter": { |
| 1434 | "patterns": [ |
| 1435 | { |
| 1436 | "name": "meta.parameter.object-binding-pattern.ts", |
| 1437 | "begin": "(?<!=|:)\\s*(\\{)", |
| 1438 | "beginCaptures": { |
| 1439 | "1": { |
| 1440 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 1441 | } |
| 1442 | }, |
| 1443 | "end": "\\}", |
| 1444 | "endCaptures": { |
| 1445 | "0": { |
| 1446 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 1447 | } |
| 1448 | }, |
| 1449 | "patterns": [ |
| 1450 | { |
| 1451 | "include": "#parameter-object-binding-element" |
| 1452 | } |
| 1453 | ] |
| 1454 | }, |
| 1455 | { |
| 1456 | "name": "meta.paramter.array-binding-pattern.ts", |
| 1457 | "begin": "(?<!=|:)\\s*(\\[)", |
| 1458 | "beginCaptures": { |
| 1459 | "1": { |
| 1460 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 1461 | } |
| 1462 | }, |
| 1463 | "end": "\\]", |
| 1464 | "endCaptures": { |
| 1465 | "0": { |
| 1466 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 1467 | } |
| 1468 | }, |
| 1469 | "patterns": [ |
| 1470 | { |
| 1471 | "include": "#parameter-binding-element" |
| 1472 | }, |
| 1473 | { |
| 1474 | "include": "#punctuation-comma" |
| 1475 | } |
| 1476 | ] |
| 1477 | } |
| 1478 | ] |
| 1479 | }, |
| 1480 | "parameter-object-binding-element": { |
| 1481 | "patterns": [ |
| 1482 | { |
| 1483 | "include": "#comment" |
| 1484 | }, |
| 1485 | { |
| 1486 | "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))", |
| 1487 | "end": "(?=,|\\})", |
| 1488 | "patterns": [ |
| 1489 | { |
| 1490 | "include": "#object-binding-element-propertyName" |
| 1491 | }, |
| 1492 | { |
| 1493 | "include": "#parameter-binding-element" |
| 1494 | } |
| 1495 | ] |
| 1496 | }, |
| 1497 | { |
| 1498 | "include": "#parameter-object-binding-pattern" |
| 1499 | }, |
| 1500 | { |
| 1501 | "include": "#destructuring-parameter-rest" |
| 1502 | }, |
| 1503 | { |
| 1504 | "include": "#variable-initializer" |
| 1505 | }, |
| 1506 | { |
| 1507 | "include": "#punctuation-comma" |
| 1508 | } |
| 1509 | ] |
| 1510 | }, |
| 1511 | "parameter-binding-element": { |
| 1512 | "patterns": [ |
| 1513 | { |
| 1514 | "include": "#comment" |
| 1515 | }, |
| 1516 | { |
| 1517 | "include": "#parameter-object-binding-pattern" |
| 1518 | }, |
| 1519 | { |
| 1520 | "include": "#parameter-array-binding-pattern" |
| 1521 | }, |
| 1522 | { |
| 1523 | "include": "#destructuring-parameter-rest" |
| 1524 | }, |
| 1525 | { |
| 1526 | "include": "#variable-initializer" |
| 1527 | } |
| 1528 | ] |
| 1529 | }, |
| 1530 | "destructuring-parameter-rest": { |
| 1531 | "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", |
| 1532 | "captures": { |
| 1533 | "1": { |
| 1534 | "name": "keyword.operator.rest.ts" |
| 1535 | }, |
| 1536 | "2": { |
| 1537 | "name": "variable.parameter.ts" |
| 1538 | } |
| 1539 | } |
| 1540 | }, |
| 1541 | "parameter-object-binding-pattern": { |
| 1542 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", |
| 1543 | "beginCaptures": { |
| 1544 | "1": { |
| 1545 | "name": "keyword.operator.rest.ts" |
| 1546 | }, |
| 1547 | "2": { |
| 1548 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 1549 | } |
| 1550 | }, |
| 1551 | "end": "\\}", |
| 1552 | "endCaptures": { |
| 1553 | "0": { |
| 1554 | "name": "punctuation.definition.binding-pattern.object.ts" |
| 1555 | } |
| 1556 | }, |
| 1557 | "patterns": [ |
| 1558 | { |
| 1559 | "include": "#parameter-object-binding-element" |
| 1560 | } |
| 1561 | ] |
| 1562 | }, |
| 1563 | "parameter-array-binding-pattern": { |
| 1564 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", |
| 1565 | "beginCaptures": { |
| 1566 | "1": { |
| 1567 | "name": "keyword.operator.rest.ts" |
| 1568 | }, |
| 1569 | "2": { |
| 1570 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 1571 | } |
| 1572 | }, |
| 1573 | "end": "\\]", |
| 1574 | "endCaptures": { |
| 1575 | "0": { |
| 1576 | "name": "punctuation.definition.binding-pattern.array.ts" |
| 1577 | } |
| 1578 | }, |
| 1579 | "patterns": [ |
| 1580 | { |
| 1581 | "include": "#parameter-binding-element" |
| 1582 | }, |
| 1583 | { |
| 1584 | "include": "#punctuation-comma" |
| 1585 | } |
| 1586 | ] |
| 1587 | }, |
| 1588 | "return-type": { |
| 1589 | "name": "meta.return.type.ts", |
| 1590 | "begin": "(?<=\\))\\s*(:)", |
| 1591 | "beginCaptures": { |
| 1592 | "1": { |
| 1593 | "name": "keyword.operator.type.annotation.ts" |
| 1594 | } |
| 1595 | }, |
| 1596 | "end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))", |
| 1597 | "patterns": [ |
| 1598 | { |
| 1599 | "include": "#comment" |
| 1600 | }, |
| 1601 | { |
| 1602 | "name": "meta.object.type.ts", |
| 1603 | "begin": "(?<=:)\\s*(\\{)", |
| 1604 | "beginCaptures": { |
| 1605 | "1": { |
| 1606 | "name": "punctuation.definition.block.ts" |
| 1607 | } |
| 1608 | }, |
| 1609 | "end": "\\}", |
| 1610 | "endCaptures": { |
| 1611 | "0": { |
| 1612 | "name": "punctuation.definition.block.ts" |
| 1613 | } |
| 1614 | }, |
| 1615 | "patterns": [ |
| 1616 | { |
| 1617 | "include": "#type-object-members" |
| 1618 | } |
| 1619 | ] |
| 1620 | }, |
| 1621 | { |
| 1622 | "include": "#type-predicate-operator" |
| 1623 | }, |
| 1624 | { |
| 1625 | "include": "#type" |
| 1626 | } |
| 1627 | ] |
| 1628 | }, |
| 1629 | "type-predicate-operator": { |
| 1630 | "name": "keyword.operator.expression.is.ts", |
| 1631 | "match": "(?<!\\.|\\$)\\bis\\b(?!\\$)" |
| 1632 | }, |
| 1633 | "type-annotation": { |
| 1634 | "name": "meta.type.annotation.ts", |
| 1635 | "begin": ":", |
| 1636 | "beginCaptures": { |
| 1637 | "0": { |
| 1638 | "name": "keyword.operator.type.annotation.ts" |
| 1639 | } |
| 1640 | }, |
| 1641 | "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", |
| 1642 | "patterns": [ |
| 1643 | { |
| 1644 | "include": "#comment" |
| 1645 | }, |
| 1646 | { |
| 1647 | "include": "#type" |
| 1648 | } |
| 1649 | ] |
| 1650 | }, |
| 1651 | "type": { |
| 1652 | "name": "meta.type.ts", |
| 1653 | "patterns": [ |
| 1654 | { |
| 1655 | "include": "#comment" |
| 1656 | }, |
| 1657 | { |
| 1658 | "include": "#string" |
| 1659 | }, |
| 1660 | { |
| 1661 | "include": "#numeric-literal" |
| 1662 | }, |
| 1663 | { |
| 1664 | "include": "#type-primitive" |
| 1665 | }, |
| 1666 | { |
| 1667 | "include": "#type-builtin-literals" |
| 1668 | }, |
| 1669 | { |
| 1670 | "include": "#type-parameters" |
| 1671 | }, |
| 1672 | { |
| 1673 | "include": "#type-tuple" |
| 1674 | }, |
| 1675 | { |
| 1676 | "include": "#type-object" |
| 1677 | }, |
| 1678 | { |
| 1679 | "include": "#type-operators" |
| 1680 | }, |
| 1681 | { |
| 1682 | "include": "#type-fn-type-parameters" |
| 1683 | }, |
| 1684 | { |
| 1685 | "include": "#type-paren-or-function-parameters" |
| 1686 | }, |
| 1687 | { |
| 1688 | "include": "#type-function-return-type" |
| 1689 | }, |
| 1690 | { |
| 1691 | "include": "#type-name" |
| 1692 | } |
| 1693 | ] |
| 1694 | }, |
| 1695 | "function-parameters": { |
| 1696 | "name": "meta.parameters.ts", |
| 1697 | "begin": "\\(", |
| 1698 | "beginCaptures": { |
| 1699 | "0": { |
| 1700 | "name": "punctuation.definition.parameters.begin.ts" |
| 1701 | } |
| 1702 | }, |
| 1703 | "end": "\\)", |
| 1704 | "endCaptures": { |
| 1705 | "0": { |
| 1706 | "name": "punctuation.definition.parameters.end.ts" |
| 1707 | } |
| 1708 | }, |
| 1709 | "patterns": [ |
| 1710 | { |
| 1711 | "include": "#comment" |
| 1712 | }, |
| 1713 | { |
| 1714 | "include": "#decorator" |
| 1715 | }, |
| 1716 | { |
| 1717 | "include": "#destructuring-parameter" |
| 1718 | }, |
| 1719 | { |
| 1720 | "include": "#parameter-name" |
| 1721 | }, |
| 1722 | { |
| 1723 | "include": "#type-annotation" |
| 1724 | }, |
| 1725 | { |
| 1726 | "include": "#variable-initializer" |
| 1727 | }, |
| 1728 | { |
| 1729 | "name": "punctuation.separator.parameter.ts", |
| 1730 | "match": "," |
| 1731 | } |
| 1732 | ] |
| 1733 | }, |
| 1734 | "type-primitive": { |
| 1735 | "name": "support.type.primitive.ts", |
| 1736 | "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)" |
| 1737 | }, |
| 1738 | "type-builtin-literals": { |
| 1739 | "name": "support.type.builtin.ts", |
| 1740 | "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)" |
| 1741 | }, |
| 1742 | "type-paren-or-function-parameters": { |
| 1743 | "name": "meta.type.paren.cover.ts", |
| 1744 | "begin": "\\(", |
| 1745 | "beginCaptures": { |
| 1746 | "0": { |
| 1747 | "name": "meta.brace.round.ts" |
| 1748 | } |
| 1749 | }, |
| 1750 | "end": "\\)", |
| 1751 | "endCaptures": { |
| 1752 | "0": { |
| 1753 | "name": "meta.brace.round.ts" |
| 1754 | } |
| 1755 | }, |
| 1756 | "patterns": [ |
| 1757 | { |
| 1758 | "include": "#type" |
| 1759 | }, |
| 1760 | { |
| 1761 | "include": "#function-parameters" |
| 1762 | } |
| 1763 | ] |
| 1764 | }, |
| 1765 | "type-fn-type-parameters": { |
| 1766 | "patterns": [ |
| 1767 | { |
| 1768 | "name": "meta.type.constructor.ts", |
| 1769 | "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)", |
| 1770 | "captures": { |
| 1771 | "1": { |
| 1772 | "name": "keyword.control.new.ts" |
| 1773 | } |
| 1774 | } |
| 1775 | }, |
| 1776 | { |
| 1777 | "name": "meta.type.constructor.ts", |
| 1778 | "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()", |
| 1779 | "beginCaptures": { |
| 1780 | "1": { |
| 1781 | "name": "keyword.control.new.ts" |
| 1782 | } |
| 1783 | }, |
| 1784 | "end": "(?<=\\))", |
| 1785 | "patterns": [ |
| 1786 | { |
| 1787 | "include": "#function-parameters" |
| 1788 | } |
| 1789 | ] |
| 1790 | }, |
| 1791 | { |
| 1792 | "name": "meta.type.function.ts", |
| 1793 | "begin": "(?<=\\>)\\s*(?=\\()", |
| 1794 | "end": "(?<=\\))", |
| 1795 | "patterns": [ |
| 1796 | { |
| 1797 | "include": "#function-parameters" |
| 1798 | } |
| 1799 | ] |
| 1800 | }, |
| 1801 | { |
| 1802 | "name": "meta.type.function.ts", |
| 1803 | "begin": "(?x)( (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )", |
| 1804 | "end": "(?<=\\))", |
| 1805 | "patterns": [ |
| 1806 | { |
| 1807 | "include": "#function-parameters" |
| 1808 | } |
| 1809 | ] |
| 1810 | } |
| 1811 | ] |
| 1812 | }, |
| 1813 | "type-operators": { |
| 1814 | "patterns": [ |
| 1815 | { |
| 1816 | "include": "#typeof-operator" |
| 1817 | }, |
| 1818 | { |
| 1819 | "name": "keyword.operator.type.ts", |
| 1820 | "match": "[&|]" |
| 1821 | }, |
| 1822 | { |
| 1823 | "name": "keyword.operator.expression.keyof.ts", |
| 1824 | "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)" |
| 1825 | } |
| 1826 | ] |
| 1827 | }, |
| 1828 | "type-function-return-type": { |
| 1829 | "name": "meta.type.function.return.ts", |
| 1830 | "begin": "=>", |
| 1831 | "beginCaptures": { |
| 1832 | "0": { |
| 1833 | "name": "storage.type.function.arrow.ts" |
| 1834 | } |
| 1835 | }, |
| 1836 | "end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)", |
| 1837 | "patterns": [ |
| 1838 | { |
| 1839 | "include": "#comment" |
| 1840 | }, |
| 1841 | { |
| 1842 | "name": "meta.object.type.ts", |
| 1843 | "begin": "(?<==>)\\s*(\\{)", |
| 1844 | "beginCaptures": { |
| 1845 | "1": { |
| 1846 | "name": "punctuation.definition.block.ts" |
| 1847 | } |
| 1848 | }, |
| 1849 | "end": "\\}", |
| 1850 | "endCaptures": { |
| 1851 | "0": { |
| 1852 | "name": "punctuation.definition.block.ts" |
| 1853 | } |
| 1854 | }, |
| 1855 | "patterns": [ |
| 1856 | { |
| 1857 | "include": "#type-object-members" |
| 1858 | } |
| 1859 | ] |
| 1860 | }, |
| 1861 | { |
| 1862 | "include": "#type-predicate-operator" |
| 1863 | }, |
| 1864 | { |
| 1865 | "include": "#type" |
| 1866 | } |
| 1867 | ] |
| 1868 | }, |
| 1869 | "type-tuple": { |
| 1870 | "name": "meta.type.tuple.ts", |
| 1871 | "begin": "\\[", |
| 1872 | "beginCaptures": { |
| 1873 | "0": { |
| 1874 | "name": "meta.brace.square.ts" |
| 1875 | } |
| 1876 | }, |
| 1877 | "end": "\\]", |
| 1878 | "endCaptures": { |
| 1879 | "0": { |
| 1880 | "name": "meta.brace.square.ts" |
| 1881 | } |
| 1882 | }, |
| 1883 | "patterns": [ |
| 1884 | { |
| 1885 | "include": "#type" |
| 1886 | }, |
| 1887 | { |
| 1888 | "include": "#punctuation-comma" |
| 1889 | } |
| 1890 | ] |
| 1891 | }, |
| 1892 | "type-name": { |
| 1893 | "patterns": [ |
| 1894 | { |
| 1895 | "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)", |
| 1896 | "captures": { |
| 1897 | "1": { |
| 1898 | "name": "entity.name.type.module.ts" |
| 1899 | }, |
| 1900 | "2": { |
| 1901 | "name": "punctuation.accessor.ts" |
| 1902 | } |
| 1903 | } |
| 1904 | }, |
| 1905 | { |
| 1906 | "name": "entity.name.type.ts", |
| 1907 | "match": "[_$[:alpha:]][_$[:alnum:]]*" |
| 1908 | } |
| 1909 | ] |
| 1910 | }, |
| 1911 | "type-parameters": { |
| 1912 | "name": "meta.type.parameters.ts", |
| 1913 | "begin": "(<)", |
| 1914 | "beginCaptures": { |
| 1915 | "1": { |
| 1916 | "name": "punctuation.definition.typeparameters.begin.ts" |
| 1917 | } |
| 1918 | }, |
| 1919 | "end": "(?=$)|(>)", |
| 1920 | "endCaptures": { |
| 1921 | "1": { |
| 1922 | "name": "punctuation.definition.typeparameters.end.ts" |
| 1923 | } |
| 1924 | }, |
| 1925 | "patterns": [ |
| 1926 | { |
| 1927 | "include": "#comment" |
| 1928 | }, |
| 1929 | { |
| 1930 | "name": "storage.modifier.ts", |
| 1931 | "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)" |
| 1932 | }, |
| 1933 | { |
| 1934 | "include": "#type" |
| 1935 | }, |
| 1936 | { |
| 1937 | "include": "#punctuation-comma" |
| 1938 | } |
| 1939 | ] |
| 1940 | }, |
| 1941 | "variable-initializer": { |
| 1942 | "begin": "(?<!=|!)(=)(?!=)", |
| 1943 | "beginCaptures": { |
| 1944 | "1": { |
| 1945 | "name": "keyword.operator.assignment.ts" |
| 1946 | } |
| 1947 | }, |
| 1948 | "end": "(?=$|[,);}\\]])", |
| 1949 | "patterns": [ |
| 1950 | { |
| 1951 | "include": "#expression" |
| 1952 | } |
| 1953 | ] |
| 1954 | }, |
| 1955 | "for-loop": { |
| 1956 | "begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()", |
| 1957 | "beginCaptures": { |
| 1958 | "1": { |
| 1959 | "name": "keyword.control.loop.ts" |
| 1960 | }, |
| 1961 | "2": { |
| 1962 | "name": "meta.brace.round.ts" |
| 1963 | } |
| 1964 | }, |
| 1965 | "end": "\\)", |
| 1966 | "endCaptures": { |
| 1967 | "0": { |
| 1968 | "name": "meta.brace.round.ts" |
| 1969 | } |
| 1970 | }, |
| 1971 | "patterns": [ |
| 1972 | { |
| 1973 | "include": "#var-expr" |
| 1974 | }, |
| 1975 | { |
| 1976 | "include": "#expression" |
| 1977 | }, |
| 1978 | { |
| 1979 | "include": "#punctuation-semicolon" |
| 1980 | } |
| 1981 | ] |
| 1982 | }, |
| 1983 | "switch-expression": { |
| 1984 | "name": "switch-expression.expr.ts", |
| 1985 | "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()", |
| 1986 | "beginCaptures": { |
| 1987 | "1": { |
| 1988 | "name": "keyword.control.switch.ts" |
| 1989 | }, |
| 1990 | "2": { |
| 1991 | "name": "meta.brace.round.ts" |
| 1992 | } |
| 1993 | }, |
| 1994 | "end": "\\)", |
| 1995 | "endCaptures": { |
| 1996 | "0": { |
| 1997 | "name": "meta.brace.round.ts" |
| 1998 | } |
| 1999 | }, |
| 2000 | "patterns": [ |
| 2001 | { |
| 2002 | "include": "#expression" |
| 2003 | } |
| 2004 | ] |
| 2005 | }, |
| 2006 | "switch-block": { |
| 2007 | "name": "switch-block.expr.ts", |
| 2008 | "begin": "{", |
| 2009 | "beginCaptures": { |
| 2010 | "0": { |
| 2011 | "name": "punctuation.definition.block.ts" |
| 2012 | } |
| 2013 | }, |
| 2014 | "end": "(?=\\})", |
| 2015 | "patterns": [ |
| 2016 | { |
| 2017 | "include": "#case-clause" |
| 2018 | }, |
| 2019 | { |
| 2020 | "include": "#statements" |
| 2021 | } |
| 2022 | ] |
| 2023 | }, |
| 2024 | "case-clause": { |
| 2025 | "name": "case-clause.expr.ts", |
| 2026 | "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)", |
| 2027 | "beginCaptures": { |
| 2028 | "1": { |
| 2029 | "name": "keyword.control.switch.ts" |
| 2030 | } |
| 2031 | }, |
| 2032 | "end": ":", |
| 2033 | "endCaptures": { |
| 2034 | "0": { |
| 2035 | "name": "punctuation.definition.section.case-statement.ts" |
| 2036 | } |
| 2037 | }, |
| 2038 | "patterns": [ |
| 2039 | { |
| 2040 | "include": "#expression" |
| 2041 | } |
| 2042 | ] |
| 2043 | }, |
| 2044 | "switch-statement": { |
| 2045 | "name": "switch-statement.expr.ts", |
| 2046 | "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()", |
| 2047 | "end": "}", |
| 2048 | "endCaptures": { |
| 2049 | "0": { |
| 2050 | "name": "punctuation.definition.block.ts" |
| 2051 | } |
| 2052 | }, |
| 2053 | "patterns": [ |
| 2054 | { |
| 2055 | "include": "#switch-expression" |
| 2056 | }, |
| 2057 | { |
| 2058 | "include": "#switch-block" |
| 2059 | } |
| 2060 | ] |
| 2061 | }, |
| 2062 | "support-objects": { |
| 2063 | "patterns": [ |
| 2064 | { |
| 2065 | "name": "variable.language.arguments.ts", |
| 2066 | "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)" |
| 2067 | }, |
| 2068 | { |
| 2069 | "name": "support.class.builtin.ts", |
| 2070 | "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)" |
| 2071 | }, |
| 2072 | { |
| 2073 | "name": "support.class.error.ts", |
| 2074 | "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)" |
| 2075 | }, |
| 2076 | { |
| 2077 | "name": "support.function.ts", |
| 2078 | "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()" |
| 2079 | }, |
| 2080 | { |
| 2081 | "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)", |
| 2082 | "captures": { |
| 2083 | "1": { |
| 2084 | "name": "support.constant.math.ts" |
| 2085 | }, |
| 2086 | "2": { |
| 2087 | "name": "punctuation.accessor.ts" |
| 2088 | }, |
| 2089 | "3": { |
| 2090 | "name": "support.function.math.ts" |
| 2091 | }, |
| 2092 | "4": { |
| 2093 | "name": "support.constant.property.math.ts" |
| 2094 | } |
| 2095 | } |
| 2096 | }, |
| 2097 | { |
| 2098 | "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)", |
| 2099 | "captures": { |
| 2100 | "1": { |
| 2101 | "name": "support.class.console.ts" |
| 2102 | }, |
| 2103 | "2": { |
| 2104 | "name": "punctuation.accessor.ts" |
| 2105 | }, |
| 2106 | "3": { |
| 2107 | "name": "support.function.console.ts" |
| 2108 | } |
| 2109 | } |
| 2110 | }, |
| 2111 | { |
| 2112 | "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)", |
| 2113 | "captures": { |
| 2114 | "1": { |
| 2115 | "name": "support.constant.json.ts" |
| 2116 | }, |
| 2117 | "2": { |
| 2118 | "name": "punctuation.accessor.ts" |
| 2119 | }, |
| 2120 | "3": { |
| 2121 | "name": "support.function.json.ts" |
| 2122 | } |
| 2123 | } |
| 2124 | }, |
| 2125 | { |
| 2126 | "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)", |
| 2127 | "captures": { |
| 2128 | "1": { |
| 2129 | "name": "punctuation.accessor.ts" |
| 2130 | }, |
| 2131 | "2": { |
| 2132 | "name": "support.variable.property.ts" |
| 2133 | }, |
| 2134 | "3": { |
| 2135 | "name": "support.constant.ts" |
| 2136 | } |
| 2137 | } |
| 2138 | }, |
| 2139 | { |
| 2140 | "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)", |
| 2141 | "captures": { |
| 2142 | "1": { |
| 2143 | "name": "support.variable.dom.ts" |
| 2144 | }, |
| 2145 | "2": { |
| 2146 | "name": "support.class.dom.ts" |
| 2147 | } |
| 2148 | } |
| 2149 | }, |
| 2150 | { |
| 2151 | "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()", |
| 2152 | "captures": { |
| 2153 | "1": { |
| 2154 | "name": "punctuation.accessor.ts" |
| 2155 | }, |
| 2156 | "2": { |
| 2157 | "name": "support.constant.dom.ts" |
| 2158 | }, |
| 2159 | "3": { |
| 2160 | "name": "support.variable.property.dom.ts" |
| 2161 | } |
| 2162 | } |
| 2163 | }, |
| 2164 | { |
| 2165 | "name": "support.class.node.ts", |
| 2166 | "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)" |
| 2167 | }, |
| 2168 | { |
| 2169 | "name": "support.module.node.ts", |
| 2170 | "match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)" |
| 2171 | }, |
| 2172 | { |
| 2173 | "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)", |
| 2174 | "captures": { |
| 2175 | "1": { |
| 2176 | "name": "support.variable.object.process.ts" |
| 2177 | }, |
| 2178 | "2": { |
| 2179 | "name": "punctuation.accessor.ts" |
| 2180 | }, |
| 2181 | "3": { |
| 2182 | "name": "support.variable.property.process.ts" |
| 2183 | }, |
| 2184 | "4": { |
| 2185 | "name": "support.function.process.ts" |
| 2186 | } |
| 2187 | } |
| 2188 | }, |
| 2189 | { |
| 2190 | "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", |
| 2191 | "captures": { |
| 2192 | "1": { |
| 2193 | "name": "support.type.object.module.ts" |
| 2194 | }, |
| 2195 | "2": { |
| 2196 | "name": "support.type.object.module.ts" |
| 2197 | }, |
| 2198 | "3": { |
| 2199 | "name": "punctuation.accessor.ts" |
| 2200 | }, |
| 2201 | "4": { |
| 2202 | "name": "support.type.object.module.ts" |
| 2203 | } |
| 2204 | } |
| 2205 | }, |
| 2206 | { |
| 2207 | "name": "support.variable.object.node.ts", |
| 2208 | "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)" |
| 2209 | }, |
| 2210 | { |
| 2211 | "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()", |
| 2212 | "captures": { |
| 2213 | "1": { |
| 2214 | "name": "punctuation.accessor.ts" |
| 2215 | }, |
| 2216 | "2": { |
| 2217 | "name": "support.function.event-handler.ts" |
| 2218 | }, |
| 2219 | "3": { |
| 2220 | "name": "support.function.ts" |
| 2221 | }, |
| 2222 | "4": { |
| 2223 | "name": "support.function.dom.ts" |
| 2224 | } |
| 2225 | } |
| 2226 | } |
| 2227 | ] |
| 2228 | }, |
| 2229 | "function-call": { |
| 2230 | "begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()", |
| 2231 | "end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()", |
| 2232 | "patterns": [ |
| 2233 | { |
| 2234 | "include": "#support-objects" |
| 2235 | }, |
| 2236 | { |
| 2237 | "name": "punctuation.accessor.ts", |
| 2238 | "match": "\\." |
| 2239 | }, |
| 2240 | { |
| 2241 | "name": "entity.name.function.ts", |
| 2242 | "match": "([_$[:alpha:]][_$[:alnum:]]*)" |
| 2243 | }, |
| 2244 | { |
| 2245 | "include": "#comment" |
| 2246 | }, |
| 2247 | { |
| 2248 | "name": "meta.type.parameters.ts", |
| 2249 | "begin": "\\<", |
| 2250 | "beginCaptures": { |
| 2251 | "0": { |
| 2252 | "name": "punctuation.definition.typeparameters.begin.ts" |
| 2253 | } |
| 2254 | }, |
| 2255 | "end": "\\>", |
| 2256 | "endCaptures": { |
| 2257 | "0": { |
| 2258 | "name": "punctuation.definition.typeparameters.end.ts" |
| 2259 | } |
| 2260 | }, |
| 2261 | "patterns": [ |
| 2262 | { |
| 2263 | "include": "#type" |
| 2264 | }, |
| 2265 | { |
| 2266 | "include": "#punctuation-comma" |
| 2267 | } |
| 2268 | ] |
| 2269 | }, |
| 2270 | { |
| 2271 | "include": "#paren-expression" |
| 2272 | } |
| 2273 | ] |
| 2274 | }, |
| 2275 | "identifiers": { |
| 2276 | "patterns": [ |
| 2277 | { |
| 2278 | "name": "support.class.ts", |
| 2279 | "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))" |
| 2280 | }, |
| 2281 | { |
| 2282 | "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)", |
| 2283 | "captures": { |
| 2284 | "1": { |
| 2285 | "name": "punctuation.accessor.ts" |
| 2286 | }, |
| 2287 | "2": { |
| 2288 | "name": "constant.other.object.property.ts" |
| 2289 | }, |
| 2290 | "3": { |
| 2291 | "name": "variable.other.object.property.ts" |
| 2292 | } |
| 2293 | } |
| 2294 | }, |
| 2295 | { |
| 2296 | "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))", |
| 2297 | "captures": { |
| 2298 | "1": { |
| 2299 | "name": "punctuation.accessor.ts" |
| 2300 | }, |
| 2301 | "2": { |
| 2302 | "name": "entity.name.function.ts" |
| 2303 | } |
| 2304 | } |
| 2305 | }, |
| 2306 | { |
| 2307 | "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", |
| 2308 | "captures": { |
| 2309 | "1": { |
| 2310 | "name": "punctuation.accessor.ts" |
| 2311 | }, |
| 2312 | "2": { |
| 2313 | "name": "constant.other.property.ts" |
| 2314 | } |
| 2315 | } |
| 2316 | }, |
| 2317 | { |
| 2318 | "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)", |
| 2319 | "captures": { |
| 2320 | "1": { |
| 2321 | "name": "punctuation.accessor.ts" |
| 2322 | }, |
| 2323 | "2": { |
| 2324 | "name": "variable.other.property.ts" |
| 2325 | } |
| 2326 | } |
| 2327 | }, |
| 2328 | { |
| 2329 | "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)", |
| 2330 | "captures": { |
| 2331 | "1": { |
| 2332 | "name": "constant.other.object.ts" |
| 2333 | }, |
| 2334 | "2": { |
| 2335 | "name": "variable.other.object.ts" |
| 2336 | } |
| 2337 | } |
| 2338 | }, |
| 2339 | { |
| 2340 | "name": "constant.other.ts", |
| 2341 | "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" |
| 2342 | }, |
| 2343 | { |
| 2344 | "name": "variable.other.readwrite.ts", |
| 2345 | "match": "[_$[:alpha:]][_$[:alnum:]]*" |
| 2346 | } |
| 2347 | ] |
| 2348 | }, |
| 2349 | "cast": { |
| 2350 | "name": "cast.expr.ts", |
| 2351 | "begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*]))\\s*(<)(?!<?\\=)", |
| 2352 | "beginCaptures": { |
| 2353 | "1": { |
| 2354 | "name": "meta.brace.angle.ts" |
| 2355 | } |
| 2356 | }, |
| 2357 | "end": ">", |
| 2358 | "endCaptures": { |
| 2359 | "0": { |
| 2360 | "name": "meta.brace.angle.ts" |
| 2361 | } |
| 2362 | }, |
| 2363 | "patterns": [ |
| 2364 | { |
| 2365 | "include": "#type" |
| 2366 | } |
| 2367 | ] |
| 2368 | }, |
| 2369 | "new-expr": { |
| 2370 | "name": "new.expr.ts", |
| 2371 | "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)", |
| 2372 | "beginCaptures": { |
| 2373 | "1": { |
| 2374 | "name": "keyword.operator.new.ts" |
| 2375 | } |
| 2376 | }, |
| 2377 | "end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))", |
| 2378 | "patterns": [ |
| 2379 | { |
| 2380 | "include": "#paren-expression" |
| 2381 | }, |
| 2382 | { |
| 2383 | "include": "#class-or-interface-declaration" |
| 2384 | }, |
| 2385 | { |
| 2386 | "include": "#type" |
| 2387 | } |
| 2388 | ] |
| 2389 | }, |
| 2390 | "object-member": { |
| 2391 | "patterns": [ |
| 2392 | { |
| 2393 | "include": "#comment" |
| 2394 | }, |
| 2395 | { |
| 2396 | "include": "#method-declaration" |
| 2397 | }, |
| 2398 | { |
| 2399 | "name": "meta.object.member.ts", |
| 2400 | "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)", |
| 2401 | "end": "(?=,|\\})", |
| 2402 | "patterns": [ |
| 2403 | { |
| 2404 | "name": "meta.object-literal.key.ts", |
| 2405 | "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)", |
| 2406 | "end": ":", |
| 2407 | "endCaptures": { |
| 2408 | "0": { |
| 2409 | "name": "punctuation.separator.key-value.ts" |
| 2410 | } |
| 2411 | }, |
| 2412 | "patterns": [ |
| 2413 | { |
| 2414 | "include": "#string" |
| 2415 | }, |
| 2416 | { |
| 2417 | "include": "#array-literal" |
| 2418 | } |
| 2419 | ] |
| 2420 | }, |
| 2421 | { |
| 2422 | "include": "#expression" |
| 2423 | } |
| 2424 | ] |
| 2425 | }, |
| 2426 | { |
| 2427 | "name": "meta.object.member.ts", |
| 2428 | "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))", |
| 2429 | "beginCaptures": { |
| 2430 | "0": { |
| 2431 | "name": "meta.object-literal.key.ts" |
| 2432 | }, |
| 2433 | "1": { |
| 2434 | "name": "entity.name.function.ts" |
| 2435 | }, |
| 2436 | "2": { |
| 2437 | "name": "punctuation.separator.key-value.ts" |
| 2438 | } |
| 2439 | }, |
| 2440 | "end": "(?=,|\\})", |
| 2441 | "patterns": [ |
| 2442 | { |
| 2443 | "include": "#expression" |
| 2444 | } |
| 2445 | ] |
| 2446 | }, |
| 2447 | { |
| 2448 | "name": "meta.object.member.ts", |
| 2449 | "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)", |
| 2450 | "beginCaptures": { |
| 2451 | "0": { |
| 2452 | "name": "meta.object-literal.key.ts" |
| 2453 | }, |
| 2454 | "1": { |
| 2455 | "name": "punctuation.separator.key-value.ts" |
| 2456 | } |
| 2457 | }, |
| 2458 | "end": "(?=,|\\})", |
| 2459 | "patterns": [ |
| 2460 | { |
| 2461 | "include": "#expression" |
| 2462 | } |
| 2463 | ] |
| 2464 | }, |
| 2465 | { |
| 2466 | "name": "meta.object.member.ts", |
| 2467 | "begin": "\\.\\.\\.", |
| 2468 | "beginCaptures": { |
| 2469 | "0": { |
| 2470 | "name": "keyword.operator.spread.ts" |
| 2471 | } |
| 2472 | }, |
| 2473 | "end": "(?=,|\\})", |
| 2474 | "patterns": [ |
| 2475 | { |
| 2476 | "include": "#expression" |
| 2477 | } |
| 2478 | ] |
| 2479 | }, |
| 2480 | { |
| 2481 | "name": "meta.object.member.ts", |
| 2482 | "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)", |
| 2483 | "captures": { |
| 2484 | "1": { |
| 2485 | "name": "variable.other.readwrite.ts" |
| 2486 | } |
| 2487 | } |
| 2488 | }, |
| 2489 | { |
| 2490 | "include": "#punctuation-comma" |
| 2491 | } |
| 2492 | ] |
| 2493 | }, |
| 2494 | "expression-operators": { |
| 2495 | "patterns": [ |
| 2496 | { |
| 2497 | "name": "keyword.control.flow.ts", |
| 2498 | "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)" |
| 2499 | }, |
| 2500 | { |
| 2501 | "name": "keyword.operator.expression.delete.ts", |
| 2502 | "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)" |
| 2503 | }, |
| 2504 | { |
| 2505 | "name": "keyword.operator.expression.in.ts", |
| 2506 | "match": "(?<!\\.|\\$)\\bin\\b(?!\\$)" |
| 2507 | }, |
| 2508 | { |
| 2509 | "name": "keyword.operator.expression.of.ts", |
| 2510 | "match": "(?<!\\.|\\$)\\bof\\b(?!\\$)" |
| 2511 | }, |
| 2512 | { |
| 2513 | "name": "keyword.operator.expression.instanceof.ts", |
| 2514 | "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)" |
| 2515 | }, |
| 2516 | { |
| 2517 | "name": "keyword.operator.new.ts", |
| 2518 | "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)" |
| 2519 | }, |
| 2520 | { |
| 2521 | "include": "#typeof-operator" |
| 2522 | }, |
| 2523 | { |
| 2524 | "name": "keyword.operator.expression.void.ts", |
| 2525 | "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)" |
| 2526 | }, |
| 2527 | { |
| 2528 | "begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)", |
| 2529 | "beginCaptures": { |
| 2530 | "0": { |
| 2531 | "name": "keyword.control.as.ts" |
| 2532 | } |
| 2533 | }, |
| 2534 | "end": "(?=$|[;,:})\\]])", |
| 2535 | "patterns": [ |
| 2536 | { |
| 2537 | "include": "#type" |
| 2538 | } |
| 2539 | ] |
| 2540 | }, |
| 2541 | { |
| 2542 | "name": "keyword.operator.spread.ts", |
| 2543 | "match": "\\.\\.\\." |
| 2544 | }, |
| 2545 | { |
| 2546 | "name": "keyword.operator.assignment.compound.ts", |
| 2547 | "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" |
| 2548 | }, |
| 2549 | { |
| 2550 | "name": "keyword.operator.assignment.compound.bitwise.ts", |
| 2551 | "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" |
| 2552 | }, |
| 2553 | { |
| 2554 | "name": "keyword.operator.bitwise.shift.ts", |
| 2555 | "match": "<<|>>>|>>" |
| 2556 | }, |
| 2557 | { |
| 2558 | "name": "keyword.operator.comparison.ts", |
| 2559 | "match": "===|!==|==|!=" |
| 2560 | }, |
| 2561 | { |
| 2562 | "name": "keyword.operator.relational.ts", |
| 2563 | "match": "<=|>=|<>|<|>" |
| 2564 | }, |
| 2565 | { |
| 2566 | "name": "keyword.operator.logical.ts", |
| 2567 | "match": "\\!|&&|\\|\\|" |
| 2568 | }, |
| 2569 | { |
| 2570 | "name": "keyword.operator.bitwise.ts", |
| 2571 | "match": "\\&|~|\\^|\\|" |
| 2572 | }, |
| 2573 | { |
| 2574 | "name": "keyword.operator.assignment.ts", |
| 2575 | "match": "\\=" |
| 2576 | }, |
| 2577 | { |
| 2578 | "name": "keyword.operator.decrement.ts", |
| 2579 | "match": "--" |
| 2580 | }, |
| 2581 | { |
| 2582 | "name": "keyword.operator.increment.ts", |
| 2583 | "match": "\\+\\+" |
| 2584 | }, |
| 2585 | { |
| 2586 | "name": "keyword.operator.arithmetic.ts", |
| 2587 | "match": "%|\\*|/|-|\\+" |
| 2588 | }, |
| 2589 | { |
| 2590 | "match": "(?<=[_$[:alnum:]])\\s*(/)(?![/*])", |
| 2591 | "captures": { |
| 2592 | "1": { |
| 2593 | "name": "keyword.operator.arithmetic.ts" |
| 2594 | } |
| 2595 | } |
| 2596 | } |
| 2597 | ] |
| 2598 | }, |
| 2599 | "typeof-operator": { |
| 2600 | "name": "keyword.operator.expression.typeof.ts", |
| 2601 | "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)" |
| 2602 | }, |
| 2603 | "arrow-function": { |
| 2604 | "patterns": [ |
| 2605 | { |
| 2606 | "name": "meta.arrow.ts", |
| 2607 | "match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])", |
| 2608 | "captures": { |
| 2609 | "1": { |
| 2610 | "name": "storage.modifier.async.ts" |
| 2611 | } |
| 2612 | } |
| 2613 | }, |
| 2614 | { |
| 2615 | "name": "meta.arrow.ts", |
| 2616 | "match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", |
| 2617 | "captures": { |
| 2618 | "1": { |
| 2619 | "name": "storage.modifier.async.ts" |
| 2620 | }, |
| 2621 | "2": { |
| 2622 | "name": "variable.parameter.ts" |
| 2623 | } |
| 2624 | } |
| 2625 | }, |
| 2626 | { |
| 2627 | "name": "meta.arrow.ts", |
| 2628 | "begin": "(?x)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)", |
| 2629 | "end": "(?==>)", |
| 2630 | "patterns": [ |
| 2631 | { |
| 2632 | "include": "#comment" |
| 2633 | }, |
| 2634 | { |
| 2635 | "include": "#type-parameters" |
| 2636 | }, |
| 2637 | { |
| 2638 | "include": "#function-parameters" |
| 2639 | }, |
| 2640 | { |
| 2641 | "include": "#arrow-return-type" |
| 2642 | } |
| 2643 | ] |
| 2644 | }, |
| 2645 | { |
| 2646 | "name": "meta.arrow.ts", |
| 2647 | "begin": "=>", |
| 2648 | "beginCaptures": { |
| 2649 | "0": { |
| 2650 | "name": "storage.type.function.arrow.ts" |
| 2651 | } |
| 2652 | }, |
| 2653 | "end": "(?<=\\})|((?!\\{)(?=\\S))", |
| 2654 | "patterns": [ |
| 2655 | { |
| 2656 | "include": "#decl-block" |
| 2657 | }, |
| 2658 | { |
| 2659 | "include": "#expression" |
| 2660 | } |
| 2661 | ] |
| 2662 | } |
| 2663 | ] |
| 2664 | }, |
| 2665 | "arrow-return-type": { |
| 2666 | "name": "meta.return.type.arrow.ts", |
| 2667 | "begin": "(?<=\\))\\s*(:)", |
| 2668 | "beginCaptures": { |
| 2669 | "1": { |
| 2670 | "name": "keyword.operator.type.annotation.ts" |
| 2671 | } |
| 2672 | }, |
| 2673 | "end": "(?<!:)((?=$)|(?==>|;|//))", |
| 2674 | "patterns": [ |
| 2675 | { |
| 2676 | "include": "#type-predicate-operator" |
| 2677 | }, |
| 2678 | { |
| 2679 | "include": "#type" |
| 2680 | } |
| 2681 | ] |
| 2682 | }, |
| 2683 | "punctuation-comma": { |
| 2684 | "name": "punctuation.separator.comma.ts", |
| 2685 | "match": "," |
| 2686 | }, |
| 2687 | "punctuation-semicolon": { |
| 2688 | "name": "punctuation.terminator.statement.ts", |
| 2689 | "match": ";" |
| 2690 | }, |
| 2691 | "punctuation-accessor": { |
| 2692 | "name": "punctuation.accessor.ts", |
| 2693 | "match": "\\." |
| 2694 | }, |
| 2695 | "paren-expression": { |
| 2696 | "begin": "\\(", |
| 2697 | "beginCaptures": { |
| 2698 | "0": { |
| 2699 | "name": "meta.brace.round.ts" |
| 2700 | } |
| 2701 | }, |
| 2702 | "end": "\\)", |
| 2703 | "endCaptures": { |
| 2704 | "0": { |
| 2705 | "name": "meta.brace.round.ts" |
| 2706 | } |
| 2707 | }, |
| 2708 | "patterns": [ |
| 2709 | { |
| 2710 | "include": "#expression" |
| 2711 | }, |
| 2712 | { |
| 2713 | "include": "#punctuation-comma" |
| 2714 | } |
| 2715 | ] |
| 2716 | }, |
| 2717 | "qstring-double": { |
| 2718 | "name": "string.quoted.double.ts", |
| 2719 | "begin": "\"", |
| 2720 | "beginCaptures": { |
| 2721 | "0": { |
| 2722 | "name": "punctuation.definition.string.begin.ts" |
| 2723 | } |
| 2724 | }, |
| 2725 | "end": "(\")|((?:[^\\\\\\n])$)", |
| 2726 | "endCaptures": { |
| 2727 | "1": { |
| 2728 | "name": "punctuation.definition.string.end.ts" |
| 2729 | }, |
| 2730 | "2": { |
| 2731 | "name": "invalid.illegal.newline.ts" |
| 2732 | } |
| 2733 | }, |
| 2734 | "patterns": [ |
| 2735 | { |
| 2736 | "include": "#string-character-escape" |
| 2737 | } |
| 2738 | ] |
| 2739 | }, |
| 2740 | "qstring-single": { |
| 2741 | "name": "string.quoted.single.ts", |
| 2742 | "begin": "'", |
| 2743 | "beginCaptures": { |
| 2744 | "0": { |
| 2745 | "name": "punctuation.definition.string.begin.ts" |
| 2746 | } |
| 2747 | }, |
| 2748 | "end": "(\\')|((?:[^\\\\\\n])$)", |
| 2749 | "endCaptures": { |
| 2750 | "1": { |
| 2751 | "name": "punctuation.definition.string.end.ts" |
| 2752 | }, |
| 2753 | "2": { |
| 2754 | "name": "invalid.illegal.newline.ts" |
| 2755 | } |
| 2756 | }, |
| 2757 | "patterns": [ |
| 2758 | { |
| 2759 | "include": "#string-character-escape" |
| 2760 | } |
| 2761 | ] |
| 2762 | }, |
| 2763 | "regex": { |
| 2764 | "patterns": [ |
| 2765 | { |
| 2766 | "name": "string.regex.ts", |
| 2767 | "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))", |
| 2768 | "beginCaptures": { |
| 2769 | "1": { |
| 2770 | "name": "punctuation.definition.string.begin.ts" |
| 2771 | } |
| 2772 | }, |
| 2773 | "end": "(/)([gimuy]*)", |
| 2774 | "endCaptures": { |
| 2775 | "1": { |
| 2776 | "name": "punctuation.definition.string.end.ts" |
| 2777 | }, |
| 2778 | "2": { |
| 2779 | "name": "keyword.other.ts" |
| 2780 | } |
| 2781 | }, |
| 2782 | "patterns": [ |
| 2783 | { |
| 2784 | "include": "#regexp" |
| 2785 | } |
| 2786 | ] |
| 2787 | }, |
| 2788 | { |
| 2789 | "name": "string.regex.ts", |
| 2790 | "begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))", |
| 2791 | "beginCaptures": { |
| 2792 | "0": { |
| 2793 | "name": "punctuation.definition.string.begin.ts" |
| 2794 | } |
| 2795 | }, |
| 2796 | "end": "(/)([gimuy]*)", |
| 2797 | "endCaptures": { |
| 2798 | "1": { |
| 2799 | "name": "punctuation.definition.string.end.ts" |
| 2800 | }, |
| 2801 | "2": { |
| 2802 | "name": "keyword.other.ts" |
| 2803 | } |
| 2804 | }, |
| 2805 | "patterns": [ |
| 2806 | { |
| 2807 | "include": "#regexp" |
| 2808 | } |
| 2809 | ] |
| 2810 | } |
| 2811 | ] |
| 2812 | }, |
| 2813 | "regexp": { |
| 2814 | "patterns": [ |
| 2815 | { |
| 2816 | "name": "keyword.control.anchor.regexp", |
| 2817 | "match": "\\\\[bB]|\\^|\\$" |
| 2818 | }, |
| 2819 | { |
| 2820 | "name": "keyword.other.back-reference.regexp", |
| 2821 | "match": "\\\\[1-9]\\d*" |
| 2822 | }, |
| 2823 | { |
| 2824 | "name": "keyword.operator.quantifier.regexp", |
| 2825 | "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" |
| 2826 | }, |
| 2827 | { |
| 2828 | "name": "keyword.operator.or.regexp", |
| 2829 | "match": "\\|" |
| 2830 | }, |
| 2831 | { |
| 2832 | "name": "meta.group.assertion.regexp", |
| 2833 | "begin": "(\\()((\\?=)|(\\?!))", |
| 2834 | "beginCaptures": { |
| 2835 | "1": { |
| 2836 | "name": "punctuation.definition.group.regexp" |
| 2837 | }, |
| 2838 | "2": { |
| 2839 | "name": "punctuation.definition.group.assertion.regexp" |
| 2840 | }, |
| 2841 | "3": { |
| 2842 | "name": "meta.assertion.look-ahead.regexp" |
| 2843 | }, |
| 2844 | "4": { |
| 2845 | "name": "meta.assertion.negative-look-ahead.regexp" |
| 2846 | } |
| 2847 | }, |
| 2848 | "end": "(\\))", |
| 2849 | "endCaptures": { |
| 2850 | "1": { |
| 2851 | "name": "punctuation.definition.group.regexp" |
| 2852 | } |
| 2853 | }, |
| 2854 | "patterns": [ |
| 2855 | { |
| 2856 | "include": "#regexp" |
| 2857 | } |
| 2858 | ] |
| 2859 | }, |
| 2860 | { |
| 2861 | "name": "meta.group.regexp", |
| 2862 | "begin": "\\((\\?:)?", |
| 2863 | "beginCaptures": { |
| 2864 | "0": { |
| 2865 | "name": "punctuation.definition.group.regexp" |
| 2866 | }, |
| 2867 | "1": { |
| 2868 | "name": "punctuation.definition.group.capture.regexp" |
| 2869 | } |
| 2870 | }, |
| 2871 | "end": "\\)", |
| 2872 | "endCaptures": { |
| 2873 | "0": { |
| 2874 | "name": "punctuation.definition.group.regexp" |
| 2875 | } |
| 2876 | }, |
| 2877 | "patterns": [ |
| 2878 | { |
| 2879 | "include": "#regexp" |
| 2880 | } |
| 2881 | ] |
| 2882 | }, |
| 2883 | { |
| 2884 | "name": "constant.other.character-class.set.regexp", |
| 2885 | "begin": "(\\[)(\\^)?", |
| 2886 | "beginCaptures": { |
| 2887 | "1": { |
| 2888 | "name": "punctuation.definition.character-class.regexp" |
| 2889 | }, |
| 2890 | "2": { |
| 2891 | "name": "keyword.operator.negation.regexp" |
| 2892 | } |
| 2893 | }, |
| 2894 | "end": "(\\])", |
| 2895 | "endCaptures": { |
| 2896 | "1": { |
| 2897 | "name": "punctuation.definition.character-class.regexp" |
| 2898 | } |
| 2899 | }, |
| 2900 | "patterns": [ |
| 2901 | { |
| 2902 | "name": "constant.other.character-class.range.regexp", |
| 2903 | "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))", |
| 2904 | "captures": { |
| 2905 | "1": { |
| 2906 | "name": "constant.character.numeric.regexp" |
| 2907 | }, |
| 2908 | "2": { |
| 2909 | "name": "constant.character.control.regexp" |
| 2910 | }, |
| 2911 | "3": { |
| 2912 | "name": "constant.character.escape.backslash.regexp" |
| 2913 | }, |
| 2914 | "4": { |
| 2915 | "name": "constant.character.numeric.regexp" |
| 2916 | }, |
| 2917 | "5": { |
| 2918 | "name": "constant.character.control.regexp" |
| 2919 | }, |
| 2920 | "6": { |
| 2921 | "name": "constant.character.escape.backslash.regexp" |
| 2922 | } |
| 2923 | } |
| 2924 | }, |
| 2925 | { |
| 2926 | "include": "#regex-character-class" |
| 2927 | } |
| 2928 | ] |
| 2929 | }, |
| 2930 | { |
| 2931 | "include": "#regex-character-class" |
| 2932 | } |
| 2933 | ] |
| 2934 | }, |
| 2935 | "regex-character-class": { |
| 2936 | "patterns": [ |
| 2937 | { |
| 2938 | "name": "constant.other.character-class.regexp", |
| 2939 | "match": "\\\\[wWsSdDtrnvf]|\\." |
| 2940 | }, |
| 2941 | { |
| 2942 | "name": "constant.character.numeric.regexp", |
| 2943 | "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)" |
| 2944 | }, |
| 2945 | { |
| 2946 | "name": "constant.character.control.regexp", |
| 2947 | "match": "\\\\c[A-Z]" |
| 2948 | }, |
| 2949 | { |
| 2950 | "name": "constant.character.escape.backslash.regexp", |
| 2951 | "match": "\\\\." |
| 2952 | } |
| 2953 | ] |
| 2954 | }, |
| 2955 | "string": { |
| 2956 | "patterns": [ |
| 2957 | { |
| 2958 | "include": "#qstring-single" |
| 2959 | }, |
| 2960 | { |
| 2961 | "include": "#qstring-double" |
| 2962 | } |
| 2963 | ] |
| 2964 | }, |
| 2965 | "template": { |
| 2966 | "name": "string.template.ts", |
| 2967 | "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", |
| 2968 | "beginCaptures": { |
| 2969 | "1": { |
| 2970 | "name": "entity.name.function.tagged-template.ts" |
| 2971 | }, |
| 2972 | "2": { |
| 2973 | "name": "punctuation.definition.string.template.begin.ts" |
| 2974 | } |
| 2975 | }, |
| 2976 | "end": "`", |
| 2977 | "endCaptures": { |
| 2978 | "0": { |
| 2979 | "name": "punctuation.definition.string.template.end.ts" |
| 2980 | } |
| 2981 | }, |
| 2982 | "patterns": [ |
| 2983 | { |
| 2984 | "include": "#template-substitution-element" |
| 2985 | }, |
| 2986 | { |
| 2987 | "include": "#string-character-escape" |
| 2988 | } |
| 2989 | ] |
| 2990 | }, |
| 2991 | "string-character-escape": { |
| 2992 | "name": "constant.character.escape.ts", |
| 2993 | "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" |
| 2994 | }, |
| 2995 | "template-substitution-element": { |
| 2996 | "name": "meta.template.expression.ts", |
| 2997 | "begin": "\\$\\{", |
| 2998 | "beginCaptures": { |
| 2999 | "0": { |
| 3000 | "name": "punctuation.definition.template-expression.begin.ts" |
| 3001 | } |
| 3002 | }, |
| 3003 | "end": "\\}", |
| 3004 | "endCaptures": { |
| 3005 | "0": { |
| 3006 | "name": "punctuation.definition.template-expression.end.ts" |
| 3007 | } |
| 3008 | }, |
| 3009 | "patterns": [ |
| 3010 | { |
| 3011 | "include": "#expression" |
| 3012 | } |
| 3013 | ] |
| 3014 | }, |
| 3015 | "literal": { |
| 3016 | "name": "literal.ts", |
| 3017 | "patterns": [ |
| 3018 | { |
| 3019 | "include": "#numeric-literal" |
| 3020 | }, |
| 3021 | { |
| 3022 | "include": "#boolean-literal" |
| 3023 | }, |
| 3024 | { |
| 3025 | "include": "#null-literal" |
| 3026 | }, |
| 3027 | { |
| 3028 | "include": "#undefined-literal" |
| 3029 | }, |
| 3030 | { |
| 3031 | "include": "#numericConstant-literal" |
| 3032 | }, |
| 3033 | { |
| 3034 | "include": "#array-literal" |
| 3035 | }, |
| 3036 | { |
| 3037 | "include": "#this-literal" |
| 3038 | }, |
| 3039 | { |
| 3040 | "include": "#super-literal" |
| 3041 | } |
| 3042 | ] |
| 3043 | }, |
| 3044 | "array-literal": { |
| 3045 | "name": "meta.array.literal.ts", |
| 3046 | "begin": "\\[", |
| 3047 | "beginCaptures": { |
| 3048 | "0": { |
| 3049 | "name": "meta.brace.square.ts" |
| 3050 | } |
| 3051 | }, |
| 3052 | "end": "\\]", |
| 3053 | "endCaptures": { |
| 3054 | "0": { |
| 3055 | "name": "meta.brace.square.ts" |
| 3056 | } |
| 3057 | }, |
| 3058 | "patterns": [ |
| 3059 | { |
| 3060 | "include": "#expression" |
| 3061 | }, |
| 3062 | { |
| 3063 | "include": "#punctuation-comma" |
| 3064 | } |
| 3065 | ] |
| 3066 | }, |
| 3067 | "numeric-literal": { |
| 3068 | "patterns": [ |
| 3069 | { |
| 3070 | "name": "constant.numeric.hex.ts", |
| 3071 | "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)" |
| 3072 | }, |
| 3073 | { |
| 3074 | "name": "constant.numeric.binary.ts", |
| 3075 | "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)" |
| 3076 | }, |
| 3077 | { |
| 3078 | "name": "constant.numeric.octal.ts", |
| 3079 | "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)" |
| 3080 | }, |
| 3081 | { |
| 3082 | "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)", |
| 3083 | "captures": { |
| 3084 | "0": { |
| 3085 | "name": "constant.numeric.decimal.ts" |
| 3086 | }, |
| 3087 | "1": { |
| 3088 | "name": "meta.delimiter.decimal.period.ts" |
| 3089 | }, |
| 3090 | "2": { |
| 3091 | "name": "meta.delimiter.decimal.period.ts" |
| 3092 | }, |
| 3093 | "3": { |
| 3094 | "name": "meta.delimiter.decimal.period.ts" |
| 3095 | }, |
| 3096 | "4": { |
| 3097 | "name": "meta.delimiter.decimal.period.ts" |
| 3098 | }, |
| 3099 | "5": { |
| 3100 | "name": "meta.delimiter.decimal.period.ts" |
| 3101 | }, |
| 3102 | "6": { |
| 3103 | "name": "meta.delimiter.decimal.period.ts" |
| 3104 | } |
| 3105 | } |
| 3106 | } |
| 3107 | ] |
| 3108 | }, |
| 3109 | "boolean-literal": { |
| 3110 | "patterns": [ |
| 3111 | { |
| 3112 | "name": "constant.language.boolean.true.ts", |
| 3113 | "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)" |
| 3114 | }, |
| 3115 | { |
| 3116 | "name": "constant.language.boolean.false.ts", |
| 3117 | "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)" |
| 3118 | } |
| 3119 | ] |
| 3120 | }, |
| 3121 | "null-literal": { |
| 3122 | "name": "constant.language.null.ts", |
| 3123 | "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)" |
| 3124 | }, |
| 3125 | "this-literal": { |
| 3126 | "name": "variable.language.this.ts", |
| 3127 | "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)" |
| 3128 | }, |
| 3129 | "super-literal": { |
| 3130 | "name": "variable.language.super.ts", |
| 3131 | "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)" |
| 3132 | }, |
| 3133 | "undefined-literal": { |
| 3134 | "name": "constant.language.undefined.ts", |
| 3135 | "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)" |
| 3136 | }, |
| 3137 | "numericConstant-literal": { |
| 3138 | "patterns": [ |
| 3139 | { |
| 3140 | "name": "constant.language.nan.ts", |
| 3141 | "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)" |
| 3142 | }, |
| 3143 | { |
| 3144 | "name": "constant.language.infinity.ts", |
| 3145 | "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)" |
| 3146 | } |
| 3147 | ] |
| 3148 | }, |
| 3149 | "access-modifier": { |
| 3150 | "name": "storage.modifier.ts", |
| 3151 | "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)" |
| 3152 | }, |
| 3153 | "property-accessor": { |
| 3154 | "name": "storage.type.property.ts", |
| 3155 | "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)" |
| 3156 | }, |
| 3157 | "comment": { |
| 3158 | "patterns": [ |
| 3159 | { |
| 3160 | "name": "comment.block.documentation.ts", |
| 3161 | "begin": "/\\*\\*(?!/)", |
| 3162 | "beginCaptures": { |
| 3163 | "0": { |
| 3164 | "name": "punctuation.definition.comment.ts" |
| 3165 | } |
| 3166 | }, |
| 3167 | "end": "\\*/", |
| 3168 | "endCaptures": { |
| 3169 | "0": { |
| 3170 | "name": "punctuation.definition.comment.ts" |
| 3171 | } |
| 3172 | }, |
| 3173 | "patterns": [ |
| 3174 | { |
| 3175 | "include": "#docblock" |
| 3176 | } |
| 3177 | ] |
| 3178 | }, |
| 3179 | { |
| 3180 | "name": "comment.block.ts", |
| 3181 | "begin": "/\\*", |
| 3182 | "beginCaptures": { |
| 3183 | "0": { |
| 3184 | "name": "punctuation.definition.comment.ts" |
| 3185 | } |
| 3186 | }, |
| 3187 | "end": "\\*/", |
| 3188 | "endCaptures": { |
| 3189 | "0": { |
| 3190 | "name": "punctuation.definition.comment.ts" |
| 3191 | } |
| 3192 | } |
| 3193 | }, |
| 3194 | { |
| 3195 | "begin": "(^[ \\t]+)?(?=//)", |
| 3196 | "beginCaptures": { |
| 3197 | "1": { |
| 3198 | "name": "punctuation.whitespace.comment.leading.ts" |
| 3199 | } |
| 3200 | }, |
| 3201 | "end": "(?=$)", |
| 3202 | "patterns": [ |
| 3203 | { |
| 3204 | "name": "comment.line.double-slash.ts", |
| 3205 | "begin": "//", |
| 3206 | "beginCaptures": { |
| 3207 | "0": { |
| 3208 | "name": "punctuation.definition.comment.ts" |
| 3209 | } |
| 3210 | }, |
| 3211 | "end": "(?=$)" |
| 3212 | } |
| 3213 | ] |
| 3214 | } |
| 3215 | ] |
| 3216 | }, |
| 3217 | "directives": { |
| 3218 | "name": "comment.line.triple-slash.directive.ts", |
| 3219 | "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)", |
| 3220 | "beginCaptures": { |
| 3221 | "1": { |
| 3222 | "name": "punctuation.definition.comment.ts" |
| 3223 | } |
| 3224 | }, |
| 3225 | "end": "(?=$)", |
| 3226 | "patterns": [ |
| 3227 | { |
| 3228 | "name": "meta.tag.ts", |
| 3229 | "begin": "(<)(reference|amd-dependency|amd-module)", |
| 3230 | "beginCaptures": { |
| 3231 | "1": { |
| 3232 | "name": "punctuation.definition.tag.directive.ts" |
| 3233 | }, |
| 3234 | "2": { |
| 3235 | "name": "entity.name.tag.directive.ts" |
| 3236 | } |
| 3237 | }, |
| 3238 | "end": "/>", |
| 3239 | "endCaptures": { |
| 3240 | "0": { |
| 3241 | "name": "punctuation.definition.tag.directive.ts" |
| 3242 | } |
| 3243 | }, |
| 3244 | "patterns": [ |
| 3245 | { |
| 3246 | "name": "entity.other.attribute-name.directive.ts", |
| 3247 | "match": "path|types|no-default-lib|name" |
| 3248 | }, |
| 3249 | { |
| 3250 | "name": "keyword.operator.assignment.ts", |
| 3251 | "match": "=" |
| 3252 | }, |
| 3253 | { |
| 3254 | "include": "#string" |
| 3255 | } |
| 3256 | ] |
| 3257 | } |
| 3258 | ] |
| 3259 | }, |
| 3260 | "docblock": { |
| 3261 | "patterns": [ |
| 3262 | { |
| 3263 | "name": "storage.type.class.jsdoc", |
| 3264 | "match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b" |
| 3265 | }, |
| 3266 | { |
| 3267 | "match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description", |
| 3268 | "captures": { |
| 3269 | "0": { |
| 3270 | "name": "other.meta.jsdoc" |
| 3271 | }, |
| 3272 | "1": { |
| 3273 | "name": "entity.name.type.instance.jsdoc" |
| 3274 | }, |
| 3275 | "2": { |
| 3276 | "name": "variable.other.jsdoc" |
| 3277 | }, |
| 3278 | "3": { |
| 3279 | "name": "other.description.jsdoc" |
| 3280 | } |
| 3281 | } |
| 3282 | }, |
| 3283 | { |
| 3284 | "match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description", |
| 3285 | "captures": { |
| 3286 | "0": { |
| 3287 | "name": "other.meta.jsdoc" |
| 3288 | }, |
| 3289 | "1": { |
| 3290 | "name": "entity.name.type.instance.jsdoc" |
| 3291 | }, |
| 3292 | "2": { |
| 3293 | "name": "other.description.jsdoc" |
| 3294 | } |
| 3295 | } |
| 3296 | } |
| 3297 | ] |
| 3298 | } |
| 3299 | }, |
| 3300 | "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/4d0bdebb93aadc25ecbb903ebc897e9cd5fab69c" |
| 3301 | } |