Monorepo for Aesthetic.Computer aesthetic.computer
at main 6204 lines 236 kB view raw
1{ 2 "information_for_contributors": [ 3 "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", 4 "If you want to provide a fix or improvement, please create a pull request against the original repository.", 5 "Once accepted there, we are happy to receive an update request." 6 ], 7 "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/b80b7509a78e642f789c567e144ed951ab98b4e3", 8 "name": "PeaceScript", 9 "scopeName": "source.pjs", 10 "patterns": [ 11 { 12 "include": "#peacescript" 13 }, 14 { 15 "include": "#directives" 16 }, 17 { 18 "include": "#statements" 19 }, 20 { 21 "include": "#shebang" 22 } 23 ], 24 "repository": { 25 "peacescript": { 26 "name": "string.quoted.other.peacescript", 27 "begin": "\\@", 28 "end": "\\@", 29 "patterns": [ 30 { 31 "match": ".+?", 32 "name": "string.interpolated.peacescript" 33 } 34 ] 35 }, 36 "shebang": { 37 "name": "comment.line.shebang.js", 38 "match": "\\A(#!).*(?=$)", 39 "captures": { 40 "1": { 41 "name": "punctuation.definition.comment.js" 42 } 43 } 44 }, 45 "statements": { 46 "patterns": [ 47 { 48 "include": "#peacescript" 49 }, 50 { 51 "include": "#declaration" 52 }, 53 { 54 "include": "#control-statement" 55 }, 56 { 57 "include": "#after-operator-block-as-object-literal" 58 }, 59 { 60 "include": "#decl-block" 61 }, 62 { 63 "include": "#label" 64 }, 65 { 66 "include": "#expression" 67 }, 68 { 69 "include": "#punctuation-semicolon" 70 }, 71 { 72 "include": "#string" 73 }, 74 { 75 "include": "#comment" 76 } 77 ] 78 }, 79 "declaration": { 80 "patterns": [ 81 { 82 "include": "#peacescript" 83 }, 84 { 85 "include": "#decorator" 86 }, 87 { 88 "include": "#var-expr" 89 }, 90 { 91 "include": "#function-declaration" 92 }, 93 { 94 "include": "#class-declaration" 95 }, 96 { 97 "include": "#interface-declaration" 98 }, 99 { 100 "include": "#enum-declaration" 101 }, 102 { 103 "include": "#namespace-declaration" 104 }, 105 { 106 "include": "#type-alias-declaration" 107 }, 108 { 109 "include": "#import-equals-declaration" 110 }, 111 { 112 "include": "#import-declaration" 113 }, 114 { 115 "include": "#export-declaration" 116 }, 117 { 118 "name": "storage.modifier.js", 119 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 120 } 121 ] 122 }, 123 "control-statement": { 124 "patterns": [ 125 { 126 "include": "#peacescript" 127 }, 128 { 129 "include": "#switch-statement" 130 }, 131 { 132 "include": "#for-loop" 133 }, 134 { 135 "name": "keyword.control.trycatch.js", 136 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 137 }, 138 { 139 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 140 "captures": { 141 "1": { 142 "name": "keyword.control.loop.js" 143 }, 144 "2": { 145 "name": "entity.name.label.js" 146 } 147 } 148 }, 149 { 150 "name": "keyword.control.loop.js", 151 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 152 }, 153 { 154 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 155 "beginCaptures": { 156 "0": { 157 "name": "keyword.control.flow.js" 158 } 159 }, 160 "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 161 "patterns": [ 162 { 163 "include": "#expression" 164 } 165 ] 166 }, 167 { 168 "name": "keyword.control.switch.js", 169 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 170 }, 171 { 172 "include": "#if-statement" 173 }, 174 { 175 "name": "keyword.control.conditional.js", 176 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 177 }, 178 { 179 "name": "keyword.control.with.js", 180 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 181 }, 182 { 183 "name": "keyword.control.js", 184 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 185 }, 186 { 187 "name": "keyword.other.debugger.js", 188 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 189 } 190 ] 191 }, 192 "label": { 193 "patterns": [ 194 { 195 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)", 196 "beginCaptures": { 197 "1": { 198 "name": "entity.name.label.js" 199 }, 200 "2": { 201 "name": "punctuation.separator.label.js" 202 } 203 }, 204 "end": "(?<=\\})", 205 "patterns": [ 206 { 207 "include": "#decl-block" 208 } 209 ] 210 }, 211 { 212 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)", 213 "captures": { 214 "1": { 215 "name": "entity.name.label.js" 216 }, 217 "2": { 218 "name": "punctuation.separator.label.js" 219 } 220 } 221 } 222 ] 223 }, 224 "expression": { 225 "patterns": [ 226 { 227 "include": "#peacescript" 228 }, 229 { 230 "include": "#expressionWithoutIdentifiers" 231 }, 232 { 233 "include": "#identifiers" 234 }, 235 { 236 "include": "#expressionPunctuations" 237 } 238 ] 239 }, 240 "expressionWithoutIdentifiers": { 241 "patterns": [ 242 { 243 "include": "#peacescript" 244 }, 245 { 246 "include": "#jsx" 247 }, 248 { 249 "include": "#string" 250 }, 251 { 252 "include": "#regex" 253 }, 254 { 255 "include": "#comment" 256 }, 257 { 258 "include": "#function-expression" 259 }, 260 { 261 "include": "#class-expression" 262 }, 263 { 264 "include": "#arrow-function" 265 }, 266 { 267 "include": "#paren-expression-possibly-arrow" 268 }, 269 { 270 "include": "#cast" 271 }, 272 { 273 "include": "#ternary-expression" 274 }, 275 { 276 "include": "#new-expr" 277 }, 278 { 279 "include": "#instanceof-expr" 280 }, 281 { 282 "include": "#object-literal" 283 }, 284 { 285 "include": "#expression-operators" 286 }, 287 { 288 "include": "#function-call" 289 }, 290 { 291 "include": "#literal" 292 }, 293 { 294 "include": "#support-objects" 295 }, 296 { 297 "include": "#paren-expression" 298 } 299 ] 300 }, 301 "expressionPunctuations": { 302 "patterns": [ 303 { 304 "include": "#punctuation-comma" 305 }, 306 { 307 "include": "#punctuation-accessor" 308 } 309 ] 310 }, 311 "decorator": { 312 "name": "meta.decorator.js", 313 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@", 314 "beginCaptures": { 315 "0": { 316 "name": "punctuation.decorator.js" 317 } 318 }, 319 "end": "(?=\\s)", 320 "patterns": [ 321 { 322 "include": "#expression" 323 } 324 ] 325 }, 326 "var-expr": { 327 "patterns": [ 328 { 329 "include": "#peacescript" 330 }, 331 { 332 "name": "meta.var.expr.js", 333 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", 334 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", 335 "patterns": [ 336 { 337 "include": "#peacescript" 338 }, 339 { 340 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", 341 "beginCaptures": { 342 "1": { 343 "name": "keyword.control.export.js" 344 }, 345 "2": { 346 "name": "storage.modifier.js" 347 }, 348 "3": { 349 "name": "storage.type.js" 350 } 351 }, 352 "end": "(?=\\S)" 353 }, 354 { 355 "include": "#destructuring-variable" 356 }, 357 { 358 "include": "#var-single-variable" 359 }, 360 { 361 "include": "#variable-initializer" 362 }, 363 { 364 "include": "#comment" 365 }, 366 { 367 "begin": "(,)\\s*(?=$|\\/\\/)", 368 "beginCaptures": { 369 "1": { 370 "name": "punctuation.separator.comma.js" 371 } 372 }, 373 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", 374 "patterns": [ 375 { 376 "include": "#peacescript" 377 }, 378 { 379 "include": "#single-line-comment-consuming-line-ending" 380 }, 381 { 382 "include": "#comment" 383 }, 384 { 385 "include": "#destructuring-variable" 386 }, 387 { 388 "include": "#var-single-variable" 389 }, 390 { 391 "include": "#punctuation-comma" 392 } 393 ] 394 }, 395 { 396 "include": "#punctuation-comma" 397 } 398 ] 399 }, 400 { 401 "name": "meta.var.expr.js", 402 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", 403 "beginCaptures": { 404 "1": { 405 "name": "keyword.control.export.js" 406 }, 407 "2": { 408 "name": "storage.modifier.js" 409 }, 410 "3": { 411 "name": "storage.type.js" 412 } 413 }, 414 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))", 415 "patterns": [ 416 { 417 "include": "#peacescript" 418 }, 419 { 420 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", 421 "beginCaptures": { 422 "1": { 423 "name": "keyword.control.export.js" 424 }, 425 "2": { 426 "name": "storage.modifier.js" 427 }, 428 "3": { 429 "name": "storage.type.js" 430 } 431 }, 432 "end": "(?=\\S)" 433 }, 434 { 435 "include": "#destructuring-const" 436 }, 437 { 438 "include": "#var-single-const" 439 }, 440 { 441 "include": "#variable-initializer" 442 }, 443 { 444 "include": "#comment" 445 }, 446 { 447 "begin": "(,)\\s*(?=$|\\/\\/)", 448 "beginCaptures": { 449 "1": { 450 "name": "punctuation.separator.comma.js" 451 } 452 }, 453 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", 454 "patterns": [ 455 { 456 "include": "#peacescript" 457 }, 458 { 459 "include": "#single-line-comment-consuming-line-ending" 460 }, 461 { 462 "include": "#comment" 463 }, 464 { 465 "include": "#destructuring-const" 466 }, 467 { 468 "include": "#var-single-const" 469 }, 470 { 471 "include": "#punctuation-comma" 472 } 473 ] 474 }, 475 { 476 "include": "#punctuation-comma" 477 } 478 ] 479 }, 480 { 481 "name": "meta.var.expr.js", 482 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))", 483 "beginCaptures": { 484 "1": { 485 "name": "keyword.control.export.js" 486 }, 487 "2": { 488 "name": "storage.modifier.js" 489 }, 490 "3": { 491 "name": "storage.type.js" 492 } 493 }, 494 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^using|[^\\._$[:alnum:]]using|^await\\s+using|[^\\._$[:alnum:]]await\\s+using)(?=\\s*$)))", 495 "patterns": [ 496 { 497 "include": "#peacescript" 498 }, 499 { 500 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", 501 "beginCaptures": { 502 "1": { 503 "name": "keyword.control.export.js" 504 }, 505 "2": { 506 "name": "storage.modifier.js" 507 }, 508 "3": { 509 "name": "storage.type.js" 510 } 511 }, 512 "end": "(?=\\S)" 513 }, 514 { 515 "include": "#var-single-const" 516 }, 517 { 518 "include": "#variable-initializer" 519 }, 520 { 521 "include": "#comment" 522 }, 523 { 524 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))", 525 "beginCaptures": { 526 "1": { 527 "name": "punctuation.separator.comma.js" 528 } 529 }, 530 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", 531 "patterns": [ 532 { 533 "include": "#peacescript" 534 }, 535 { 536 "include": "#single-line-comment-consuming-line-ending" 537 }, 538 { 539 "include": "#comment" 540 }, 541 { 542 "include": "#var-single-const" 543 }, 544 { 545 "include": "#punctuation-comma" 546 } 547 ] 548 }, 549 { 550 "include": "#punctuation-comma" 551 } 552 ] 553 } 554 ] 555 }, 556 "var-single-variable": { 557 "patterns": [ 558 { 559 "name": "meta.var-single-variable.expr.js", 560 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 561 "beginCaptures": { 562 "1": { 563 "name": "meta.definition.variable.js entity.name.function.js" 564 }, 565 "2": { 566 "name": "keyword.operator.definiteassignment.js" 567 } 568 }, 569 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 570 "patterns": [ 571 { 572 "include": "#var-single-variable-type-annotation" 573 } 574 ] 575 }, 576 { 577 "name": "meta.var-single-variable.expr.js", 578 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?", 579 "beginCaptures": { 580 "1": { 581 "name": "meta.definition.variable.js variable.other.constant.js" 582 }, 583 "2": { 584 "name": "keyword.operator.definiteassignment.js" 585 } 586 }, 587 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 588 "patterns": [ 589 { 590 "include": "#var-single-variable-type-annotation" 591 } 592 ] 593 }, 594 { 595 "name": "meta.var-single-variable.expr.js", 596 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?", 597 "beginCaptures": { 598 "1": { 599 "name": "meta.definition.variable.js variable.other.readwrite.js" 600 }, 601 "2": { 602 "name": "keyword.operator.definiteassignment.js" 603 } 604 }, 605 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 606 "patterns": [ 607 { 608 "include": "#var-single-variable-type-annotation" 609 } 610 ] 611 } 612 ] 613 }, 614 "var-single-const": { 615 "patterns": [ 616 { 617 "name": "meta.var-single-variable.expr.js", 618 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 619 "beginCaptures": { 620 "1": { 621 "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js" 622 } 623 }, 624 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 625 "patterns": [ 626 { 627 "include": "#var-single-variable-type-annotation" 628 } 629 ] 630 }, 631 { 632 "name": "meta.var-single-variable.expr.js", 633 "begin": "([_$[:alpha:]][_$[:alnum:]]*)", 634 "beginCaptures": { 635 "1": { 636 "name": "meta.definition.variable.js variable.other.constant.js" 637 } 638 }, 639 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 640 "patterns": [ 641 { 642 "include": "#var-single-variable-type-annotation" 643 } 644 ] 645 } 646 ] 647 }, 648 "var-single-variable-type-annotation": { 649 "patterns": [ 650 { 651 "include": "#peacescript" 652 }, 653 { 654 "include": "#type-annotation" 655 }, 656 { 657 "include": "#string" 658 }, 659 { 660 "include": "#comment" 661 } 662 ] 663 }, 664 "destructuring-variable": { 665 "patterns": [ 666 { 667 "name": "meta.object-binding-pattern-variable.js", 668 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", 669 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", 670 "patterns": [ 671 { 672 "include": "#peacescript" 673 }, 674 { 675 "include": "#object-binding-pattern" 676 }, 677 { 678 "include": "#type-annotation" 679 }, 680 { 681 "include": "#comment" 682 } 683 ] 684 }, 685 { 686 "name": "meta.array-binding-pattern-variable.js", 687 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", 688 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", 689 "patterns": [ 690 { 691 "include": "#peacescript" 692 }, 693 { 694 "include": "#array-binding-pattern" 695 }, 696 { 697 "include": "#type-annotation" 698 }, 699 { 700 "include": "#comment" 701 } 702 ] 703 } 704 ] 705 }, 706 "destructuring-const": { 707 "patterns": [ 708 { 709 "name": "meta.object-binding-pattern-variable.js", 710 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", 711 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", 712 "patterns": [ 713 { 714 "include": "#peacescript" 715 }, 716 { 717 "include": "#object-binding-pattern-const" 718 }, 719 { 720 "include": "#type-annotation" 721 }, 722 { 723 "include": "#comment" 724 } 725 ] 726 }, 727 { 728 "name": "meta.array-binding-pattern-variable.js", 729 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", 730 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", 731 "patterns": [ 732 { 733 "include": "#peacescript" 734 }, 735 { 736 "include": "#array-binding-pattern-const" 737 }, 738 { 739 "include": "#type-annotation" 740 }, 741 { 742 "include": "#comment" 743 } 744 ] 745 } 746 ] 747 }, 748 "object-binding-element": { 749 "patterns": [ 750 { 751 "include": "#peacescript" 752 }, 753 { 754 "include": "#comment" 755 }, 756 { 757 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", 758 "end": "(?=,|\\})", 759 "patterns": [ 760 { 761 "include": "#object-binding-element-propertyName" 762 }, 763 { 764 "include": "#binding-element" 765 } 766 ] 767 }, 768 { 769 "include": "#object-binding-pattern" 770 }, 771 { 772 "include": "#destructuring-variable-rest" 773 }, 774 { 775 "include": "#variable-initializer" 776 }, 777 { 778 "include": "#punctuation-comma" 779 } 780 ] 781 }, 782 "object-binding-element-const": { 783 "patterns": [ 784 { 785 "include": "#peacescript" 786 }, 787 { 788 "include": "#comment" 789 }, 790 { 791 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", 792 "end": "(?=,|\\})", 793 "patterns": [ 794 { 795 "include": "#object-binding-element-propertyName" 796 }, 797 { 798 "include": "#binding-element-const" 799 } 800 ] 801 }, 802 { 803 "include": "#object-binding-pattern-const" 804 }, 805 { 806 "include": "#destructuring-variable-rest-const" 807 }, 808 { 809 "include": "#variable-initializer" 810 }, 811 { 812 "include": "#punctuation-comma" 813 } 814 ] 815 }, 816 "object-binding-element-propertyName": { 817 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", 818 "end": "(:)", 819 "endCaptures": { 820 "0": { 821 "name": "punctuation.destructuring.js" 822 } 823 }, 824 "patterns": [ 825 { 826 "include": "#string" 827 }, 828 { 829 "include": "#array-literal" 830 }, 831 { 832 "include": "#numeric-literal" 833 }, 834 { 835 "name": "variable.object.property.js", 836 "match": "([_$[:alpha:]][_$[:alnum:]]*)" 837 } 838 ] 839 }, 840 "binding-element": { 841 "patterns": [ 842 { 843 "include": "#peacescript" 844 }, 845 { 846 "include": "#comment" 847 }, 848 { 849 "include": "#string" 850 }, 851 { 852 "include": "#numeric-literal" 853 }, 854 { 855 "include": "#regex" 856 }, 857 { 858 "include": "#object-binding-pattern" 859 }, 860 { 861 "include": "#array-binding-pattern" 862 }, 863 { 864 "include": "#destructuring-variable-rest" 865 }, 866 { 867 "include": "#variable-initializer" 868 } 869 ] 870 }, 871 "binding-element-const": { 872 "patterns": [ 873 { 874 "include": "#peacescript" 875 }, 876 { 877 "include": "#comment" 878 }, 879 { 880 "include": "#string" 881 }, 882 { 883 "include": "#numeric-literal" 884 }, 885 { 886 "include": "#regex" 887 }, 888 { 889 "include": "#object-binding-pattern-const" 890 }, 891 { 892 "include": "#array-binding-pattern-const" 893 }, 894 { 895 "include": "#destructuring-variable-rest-const" 896 }, 897 { 898 "include": "#variable-initializer" 899 } 900 ] 901 }, 902 "destructuring-variable-rest": { 903 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", 904 "captures": { 905 "1": { 906 "name": "keyword.operator.rest.js" 907 }, 908 "2": { 909 "name": "meta.definition.variable.js variable.other.readwrite.js" 910 } 911 } 912 }, 913 "destructuring-variable-rest-const": { 914 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", 915 "captures": { 916 "1": { 917 "name": "keyword.operator.rest.js" 918 }, 919 "2": { 920 "name": "meta.definition.variable.js variable.other.constant.js" 921 } 922 } 923 }, 924 "object-binding-pattern": { 925 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", 926 "beginCaptures": { 927 "1": { 928 "name": "keyword.operator.rest.js" 929 }, 930 "2": { 931 "name": "punctuation.definition.binding-pattern.object.js" 932 } 933 }, 934 "end": "\\}", 935 "endCaptures": { 936 "0": { 937 "name": "punctuation.definition.binding-pattern.object.js" 938 } 939 }, 940 "patterns": [ 941 { 942 "include": "#object-binding-element" 943 } 944 ] 945 }, 946 "object-binding-pattern-const": { 947 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", 948 "beginCaptures": { 949 "1": { 950 "name": "keyword.operator.rest.js" 951 }, 952 "2": { 953 "name": "punctuation.definition.binding-pattern.object.js" 954 } 955 }, 956 "end": "\\}", 957 "endCaptures": { 958 "0": { 959 "name": "punctuation.definition.binding-pattern.object.js" 960 } 961 }, 962 "patterns": [ 963 { 964 "include": "#object-binding-element-const" 965 } 966 ] 967 }, 968 "array-binding-pattern": { 969 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", 970 "beginCaptures": { 971 "1": { 972 "name": "keyword.operator.rest.js" 973 }, 974 "2": { 975 "name": "punctuation.definition.binding-pattern.array.js" 976 } 977 }, 978 "end": "\\]", 979 "endCaptures": { 980 "0": { 981 "name": "punctuation.definition.binding-pattern.array.js" 982 } 983 }, 984 "patterns": [ 985 { 986 "include": "#binding-element" 987 }, 988 { 989 "include": "#punctuation-comma" 990 } 991 ] 992 }, 993 "array-binding-pattern-const": { 994 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", 995 "beginCaptures": { 996 "1": { 997 "name": "keyword.operator.rest.js" 998 }, 999 "2": { 1000 "name": "punctuation.definition.binding-pattern.array.js" 1001 } 1002 }, 1003 "end": "\\]", 1004 "endCaptures": { 1005 "0": { 1006 "name": "punctuation.definition.binding-pattern.array.js" 1007 } 1008 }, 1009 "patterns": [ 1010 { 1011 "include": "#binding-element-const" 1012 }, 1013 { 1014 "include": "#punctuation-comma" 1015 } 1016 ] 1017 }, 1018 "parameter-name": { 1019 "patterns": [ 1020 { 1021 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", 1022 "captures": { 1023 "1": { 1024 "name": "storage.modifier.js" 1025 } 1026 } 1027 }, 1028 { 1029 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 1030 "captures": { 1031 "1": { 1032 "name": "storage.modifier.js" 1033 }, 1034 "2": { 1035 "name": "keyword.operator.rest.js" 1036 }, 1037 "3": { 1038 "name": "entity.name.function.js variable.language.this.js" 1039 }, 1040 "4": { 1041 "name": "entity.name.function.js" 1042 }, 1043 "5": { 1044 "name": "keyword.operator.optional.js" 1045 } 1046 } 1047 }, 1048 { 1049 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)", 1050 "captures": { 1051 "1": { 1052 "name": "storage.modifier.js" 1053 }, 1054 "2": { 1055 "name": "keyword.operator.rest.js" 1056 }, 1057 "3": { 1058 "name": "variable.parameter.js variable.language.this.js" 1059 }, 1060 "4": { 1061 "name": "variable.parameter.js" 1062 }, 1063 "5": { 1064 "name": "keyword.operator.optional.js" 1065 } 1066 } 1067 } 1068 ] 1069 }, 1070 "destructuring-parameter": { 1071 "patterns": [ 1072 { 1073 "name": "meta.parameter.object-binding-pattern.js", 1074 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)", 1075 "beginCaptures": { 1076 "1": { 1077 "name": "keyword.operator.rest.js" 1078 }, 1079 "2": { 1080 "name": "punctuation.definition.binding-pattern.object.js" 1081 } 1082 }, 1083 "end": "\\}", 1084 "endCaptures": { 1085 "0": { 1086 "name": "punctuation.definition.binding-pattern.object.js" 1087 } 1088 }, 1089 "patterns": [ 1090 { 1091 "include": "#parameter-object-binding-element" 1092 } 1093 ] 1094 }, 1095 { 1096 "name": "meta.paramter.array-binding-pattern.js", 1097 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)", 1098 "beginCaptures": { 1099 "1": { 1100 "name": "keyword.operator.rest.js" 1101 }, 1102 "2": { 1103 "name": "punctuation.definition.binding-pattern.array.js" 1104 } 1105 }, 1106 "end": "\\]", 1107 "endCaptures": { 1108 "0": { 1109 "name": "punctuation.definition.binding-pattern.array.js" 1110 } 1111 }, 1112 "patterns": [ 1113 { 1114 "include": "#parameter-binding-element" 1115 }, 1116 { 1117 "include": "#punctuation-comma" 1118 } 1119 ] 1120 } 1121 ] 1122 }, 1123 "parameter-object-binding-element": { 1124 "patterns": [ 1125 { 1126 "include": "#peacescript" 1127 }, 1128 { 1129 "include": "#comment" 1130 }, 1131 { 1132 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", 1133 "end": "(?=,|\\})", 1134 "patterns": [ 1135 { 1136 "include": "#object-binding-element-propertyName" 1137 }, 1138 { 1139 "include": "#parameter-binding-element" 1140 }, 1141 { 1142 "include": "#paren-expression" 1143 } 1144 ] 1145 }, 1146 { 1147 "include": "#parameter-object-binding-pattern" 1148 }, 1149 { 1150 "include": "#destructuring-parameter-rest" 1151 }, 1152 { 1153 "include": "#variable-initializer" 1154 }, 1155 { 1156 "include": "#punctuation-comma" 1157 } 1158 ] 1159 }, 1160 "parameter-binding-element": { 1161 "patterns": [ 1162 { 1163 "include": "#peacescript" 1164 }, 1165 { 1166 "include": "#comment" 1167 }, 1168 { 1169 "include": "#string" 1170 }, 1171 { 1172 "include": "#numeric-literal" 1173 }, 1174 { 1175 "include": "#regex" 1176 }, 1177 { 1178 "include": "#parameter-object-binding-pattern" 1179 }, 1180 { 1181 "include": "#parameter-array-binding-pattern" 1182 }, 1183 { 1184 "include": "#destructuring-parameter-rest" 1185 }, 1186 { 1187 "include": "#variable-initializer" 1188 } 1189 ] 1190 }, 1191 "destructuring-parameter-rest": { 1192 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", 1193 "captures": { 1194 "1": { 1195 "name": "keyword.operator.rest.js" 1196 }, 1197 "2": { 1198 "name": "variable.parameter.js" 1199 } 1200 } 1201 }, 1202 "parameter-object-binding-pattern": { 1203 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", 1204 "beginCaptures": { 1205 "1": { 1206 "name": "keyword.operator.rest.js" 1207 }, 1208 "2": { 1209 "name": "punctuation.definition.binding-pattern.object.js" 1210 } 1211 }, 1212 "end": "\\}", 1213 "endCaptures": { 1214 "0": { 1215 "name": "punctuation.definition.binding-pattern.object.js" 1216 } 1217 }, 1218 "patterns": [ 1219 { 1220 "include": "#parameter-object-binding-element" 1221 } 1222 ] 1223 }, 1224 "parameter-array-binding-pattern": { 1225 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", 1226 "beginCaptures": { 1227 "1": { 1228 "name": "keyword.operator.rest.js" 1229 }, 1230 "2": { 1231 "name": "punctuation.definition.binding-pattern.array.js" 1232 } 1233 }, 1234 "end": "\\]", 1235 "endCaptures": { 1236 "0": { 1237 "name": "punctuation.definition.binding-pattern.array.js" 1238 } 1239 }, 1240 "patterns": [ 1241 { 1242 "include": "#parameter-binding-element" 1243 }, 1244 { 1245 "include": "#punctuation-comma" 1246 } 1247 ] 1248 }, 1249 "field-declaration": { 1250 "name": "meta.field.declaration.js", 1251 "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))", 1252 "beginCaptures": { 1253 "1": { 1254 "name": "storage.modifier.js" 1255 } 1256 }, 1257 "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})", 1258 "patterns": [ 1259 { 1260 "include": "#peacescript" 1261 }, 1262 { 1263 "include": "#variable-initializer" 1264 }, 1265 { 1266 "include": "#type-annotation" 1267 }, 1268 { 1269 "include": "#string" 1270 }, 1271 { 1272 "include": "#array-literal" 1273 }, 1274 { 1275 "include": "#numeric-literal" 1276 }, 1277 { 1278 "include": "#comment" 1279 }, 1280 { 1281 "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 1282 "captures": { 1283 "1": { 1284 "name": "meta.definition.property.js entity.name.function.js" 1285 }, 1286 "2": { 1287 "name": "keyword.operator.optional.js" 1288 }, 1289 "3": { 1290 "name": "keyword.operator.definiteassignment.js" 1291 } 1292 } 1293 }, 1294 { 1295 "name": "meta.definition.property.js variable.object.property.js", 1296 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*" 1297 }, 1298 { 1299 "name": "keyword.operator.optional.js", 1300 "match": "\\?" 1301 }, 1302 { 1303 "name": "keyword.operator.definiteassignment.js", 1304 "match": "\\!" 1305 } 1306 ] 1307 }, 1308 "variable-initializer": { 1309 "patterns": [ 1310 { 1311 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)", 1312 "beginCaptures": { 1313 "1": { 1314 "name": "keyword.operator.assignment.js" 1315 } 1316 }, 1317 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))", 1318 "patterns": [ 1319 { 1320 "include": "#expression" 1321 } 1322 ] 1323 }, 1324 { 1325 "begin": "(?<!=|!)(=)(?!=)", 1326 "beginCaptures": { 1327 "1": { 1328 "name": "keyword.operator.assignment.js" 1329 } 1330 }, 1331 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![\\|\\&\\+\\-\\*\\/])(?<=\\S)(?<!=)(?=\\s*$)", 1332 "patterns": [ 1333 { 1334 "include": "#expression" 1335 } 1336 ] 1337 } 1338 ] 1339 }, 1340 "function-declaration": { 1341 "name": "meta.function.js", 1342 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", 1343 "beginCaptures": { 1344 "1": { 1345 "name": "keyword.control.export.js" 1346 }, 1347 "2": { 1348 "name": "storage.modifier.js" 1349 }, 1350 "3": { 1351 "name": "storage.modifier.async.js" 1352 }, 1353 "4": { 1354 "name": "storage.type.function.js" 1355 }, 1356 "5": { 1357 "name": "keyword.generator.asterisk.js" 1358 }, 1359 "6": { 1360 "name": "meta.definition.function.js entity.name.function.js" 1361 } 1362 }, 1363 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|(?<=\\})", 1364 "patterns": [ 1365 { 1366 "include": "#peacescript" 1367 }, 1368 { 1369 "include": "#function-name" 1370 }, 1371 { 1372 "include": "#function-body" 1373 } 1374 ] 1375 }, 1376 "function-expression": { 1377 "name": "meta.function.expression.js", 1378 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*", 1379 "beginCaptures": { 1380 "1": { 1381 "name": "storage.modifier.async.js" 1382 }, 1383 "2": { 1384 "name": "storage.type.function.js" 1385 }, 1386 "3": { 1387 "name": "keyword.generator.asterisk.js" 1388 }, 1389 "4": { 1390 "name": "meta.definition.function.js entity.name.function.js" 1391 } 1392 }, 1393 "end": "(?=;)|(?<=\\})", 1394 "patterns": [ 1395 { 1396 "include": "#function-name" 1397 }, 1398 { 1399 "include": "#single-line-comment-consuming-line-ending" 1400 }, 1401 { 1402 "include": "#function-body" 1403 } 1404 ] 1405 }, 1406 "function-name": { 1407 "name": "meta.definition.function.js entity.name.function.js", 1408 "match": "[_$[:alpha:]][_$[:alnum:]]*" 1409 }, 1410 "function-body": { 1411 "patterns": [ 1412 { 1413 "include": "#peacescript" 1414 }, 1415 { 1416 "include": "#comment" 1417 }, 1418 { 1419 "include": "#type-parameters" 1420 }, 1421 { 1422 "include": "#function-parameters" 1423 }, 1424 { 1425 "include": "#return-type" 1426 }, 1427 { 1428 "include": "#type-function-return-type" 1429 }, 1430 { 1431 "include": "#decl-block" 1432 }, 1433 { 1434 "name": "keyword.generator.asterisk.js", 1435 "match": "\\*" 1436 } 1437 ] 1438 }, 1439 "method-declaration": { 1440 "patterns": [ 1441 { 1442 "name": "meta.method.declaration.js", 1443 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 1444 "beginCaptures": { 1445 "1": { 1446 "name": "storage.modifier.js" 1447 }, 1448 "2": { 1449 "name": "storage.modifier.js" 1450 }, 1451 "3": { 1452 "name": "storage.modifier.js" 1453 }, 1454 "4": { 1455 "name": "storage.modifier.async.js" 1456 }, 1457 "5": { 1458 "name": "storage.type.js" 1459 } 1460 }, 1461 "end": "(?=\\}|;|,|$)|(?<=\\})", 1462 "patterns": [ 1463 { 1464 "include": "#method-declaration-name" 1465 }, 1466 { 1467 "include": "#function-body" 1468 } 1469 ] 1470 }, 1471 { 1472 "name": "meta.method.declaration.js", 1473 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", 1474 "beginCaptures": { 1475 "1": { 1476 "name": "storage.modifier.js" 1477 }, 1478 "2": { 1479 "name": "storage.modifier.js" 1480 }, 1481 "3": { 1482 "name": "storage.modifier.js" 1483 }, 1484 "4": { 1485 "name": "storage.modifier.async.js" 1486 }, 1487 "5": { 1488 "name": "keyword.operator.new.js" 1489 }, 1490 "6": { 1491 "name": "keyword.generator.asterisk.js" 1492 } 1493 }, 1494 "end": "(?=\\}|;|,|$)|(?<=\\})", 1495 "patterns": [ 1496 { 1497 "include": "#method-declaration-name" 1498 }, 1499 { 1500 "include": "#function-body" 1501 } 1502 ] 1503 }, 1504 { 1505 "name": "meta.method.declaration.js", 1506 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", 1507 "beginCaptures": { 1508 "1": { 1509 "name": "storage.modifier.js" 1510 }, 1511 "2": { 1512 "name": "storage.modifier.js" 1513 }, 1514 "3": { 1515 "name": "storage.modifier.js" 1516 }, 1517 "4": { 1518 "name": "storage.modifier.async.js" 1519 }, 1520 "5": { 1521 "name": "storage.type.property.js" 1522 }, 1523 "6": { 1524 "name": "keyword.generator.asterisk.js" 1525 } 1526 }, 1527 "end": "(?=\\}|;|,|$)|(?<=\\})", 1528 "patterns": [ 1529 { 1530 "include": "#method-declaration-name" 1531 }, 1532 { 1533 "include": "#function-body" 1534 } 1535 ] 1536 } 1537 ] 1538 }, 1539 "object-literal-method-declaration": { 1540 "name": "meta.method.declaration.js", 1541 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", 1542 "beginCaptures": { 1543 "1": { 1544 "name": "storage.modifier.async.js" 1545 }, 1546 "2": { 1547 "name": "storage.type.property.js" 1548 }, 1549 "3": { 1550 "name": "keyword.generator.asterisk.js" 1551 } 1552 }, 1553 "end": "(?=\\}|;|,)|(?<=\\})", 1554 "patterns": [ 1555 { 1556 "include": "#method-declaration-name" 1557 }, 1558 { 1559 "include": "#function-body" 1560 }, 1561 { 1562 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])", 1563 "beginCaptures": { 1564 "1": { 1565 "name": "storage.modifier.async.js" 1566 }, 1567 "2": { 1568 "name": "storage.type.property.js" 1569 }, 1570 "3": { 1571 "name": "keyword.generator.asterisk.js" 1572 } 1573 }, 1574 "end": "(?=\\(|\\<)", 1575 "patterns": [ 1576 { 1577 "include": "#method-declaration-name" 1578 } 1579 ] 1580 } 1581 ] 1582 }, 1583 "method-declaration-name": { 1584 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])", 1585 "end": "(?=\\(|\\<)", 1586 "patterns": [ 1587 { 1588 "include": "#string" 1589 }, 1590 { 1591 "include": "#array-literal" 1592 }, 1593 { 1594 "include": "#numeric-literal" 1595 }, 1596 { 1597 "name": "meta.definition.method.js entity.name.function.js", 1598 "match": "[_$[:alpha:]][_$[:alnum:]]*" 1599 }, 1600 { 1601 "name": "keyword.operator.optional.js", 1602 "match": "\\?" 1603 } 1604 ] 1605 }, 1606 "arrow-function": { 1607 "patterns": [ 1608 { 1609 "name": "meta.arrow.js", 1610 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)", 1611 "captures": { 1612 "1": { 1613 "name": "storage.modifier.async.js" 1614 }, 1615 "2": { 1616 "name": "variable.parameter.js" 1617 } 1618 } 1619 }, 1620 { 1621 "name": "meta.arrow.js", 1622 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)", 1623 "beginCaptures": { 1624 "1": { 1625 "name": "storage.modifier.async.js" 1626 } 1627 }, 1628 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", 1629 "patterns": [ 1630 { 1631 "include": "#peacescript" 1632 }, 1633 { 1634 "include": "#comment" 1635 }, 1636 { 1637 "include": "#type-parameters" 1638 }, 1639 { 1640 "include": "#function-parameters" 1641 }, 1642 { 1643 "include": "#arrow-return-type" 1644 }, 1645 { 1646 "include": "#possibly-arrow-return-type" 1647 } 1648 ] 1649 }, 1650 { 1651 "name": "meta.arrow.js", 1652 "begin": "=>", 1653 "beginCaptures": { 1654 "0": { 1655 "name": "storage.type.function.arrow.js" 1656 } 1657 }, 1658 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])", 1659 "patterns": [ 1660 { 1661 "include": "#single-line-comment-consuming-line-ending" 1662 }, 1663 { 1664 "include": "#decl-block" 1665 }, 1666 { 1667 "include": "#expression" 1668 } 1669 ] 1670 } 1671 ] 1672 }, 1673 "indexer-declaration": { 1674 "name": "meta.indexer.declaration.js", 1675 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)", 1676 "beginCaptures": { 1677 "1": { 1678 "name": "storage.modifier.js" 1679 }, 1680 "2": { 1681 "name": "meta.brace.square.js" 1682 }, 1683 "3": { 1684 "name": "variable.parameter.js" 1685 } 1686 }, 1687 "end": "(\\])\\s*(\\?\\s*)?|$", 1688 "endCaptures": { 1689 "1": { 1690 "name": "meta.brace.square.js" 1691 }, 1692 "2": { 1693 "name": "keyword.operator.optional.js" 1694 } 1695 }, 1696 "patterns": [ 1697 { 1698 "include": "#type-annotation" 1699 } 1700 ] 1701 }, 1702 "indexer-mapped-type-declaration": { 1703 "name": "meta.indexer.mappedtype.declaration.js", 1704 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+", 1705 "beginCaptures": { 1706 "1": { 1707 "name": "keyword.operator.type.modifier.js" 1708 }, 1709 "2": { 1710 "name": "storage.modifier.js" 1711 }, 1712 "3": { 1713 "name": "meta.brace.square.js" 1714 }, 1715 "4": { 1716 "name": "entity.name.type.js" 1717 }, 1718 "5": { 1719 "name": "keyword.operator.expression.in.js" 1720 } 1721 }, 1722 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$", 1723 "endCaptures": { 1724 "1": { 1725 "name": "meta.brace.square.js" 1726 }, 1727 "2": { 1728 "name": "keyword.operator.type.modifier.js" 1729 }, 1730 "3": { 1731 "name": "keyword.operator.optional.js" 1732 } 1733 }, 1734 "patterns": [ 1735 { 1736 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+", 1737 "captures": { 1738 "1": { 1739 "name": "keyword.control.as.js" 1740 } 1741 } 1742 }, 1743 { 1744 "include": "#type" 1745 } 1746 ] 1747 }, 1748 "function-parameters": { 1749 "name": "meta.parameters.js", 1750 "begin": "\\(", 1751 "beginCaptures": { 1752 "0": { 1753 "name": "punctuation.definition.parameters.begin.js" 1754 } 1755 }, 1756 "end": "\\)", 1757 "endCaptures": { 1758 "0": { 1759 "name": "punctuation.definition.parameters.end.js" 1760 } 1761 }, 1762 "patterns": [ 1763 { 1764 "include": "#peacescript" 1765 }, 1766 { 1767 "include": "#function-parameters-body" 1768 } 1769 ] 1770 }, 1771 "function-parameters-body": { 1772 "patterns": [ 1773 { 1774 "include": "#peacescript" 1775 }, 1776 { 1777 "include": "#comment" 1778 }, 1779 { 1780 "include": "#string" 1781 }, 1782 { 1783 "include": "#decorator" 1784 }, 1785 { 1786 "include": "#destructuring-parameter" 1787 }, 1788 { 1789 "include": "#parameter-name" 1790 }, 1791 { 1792 "include": "#parameter-type-annotation" 1793 }, 1794 { 1795 "include": "#variable-initializer" 1796 }, 1797 { 1798 "name": "punctuation.separator.parameter.js", 1799 "match": "," 1800 } 1801 ] 1802 }, 1803 "class-declaration": { 1804 "name": "meta.class.js", 1805 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])", 1806 "beginCaptures": { 1807 "1": { 1808 "name": "keyword.control.export.js" 1809 }, 1810 "2": { 1811 "name": "storage.modifier.js" 1812 }, 1813 "3": { 1814 "name": "storage.modifier.js" 1815 }, 1816 "4": { 1817 "name": "storage.type.class.js" 1818 } 1819 }, 1820 "end": "(?<=\\})", 1821 "patterns": [ 1822 { 1823 "include": "#class-declaration-or-expression-patterns" 1824 } 1825 ] 1826 }, 1827 "class-expression": { 1828 "name": "meta.class.js", 1829 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])", 1830 "beginCaptures": { 1831 "1": { 1832 "name": "storage.modifier.js" 1833 }, 1834 "2": { 1835 "name": "storage.type.class.js" 1836 } 1837 }, 1838 "end": "(?<=\\})", 1839 "patterns": [ 1840 { 1841 "include": "#class-declaration-or-expression-patterns" 1842 } 1843 ] 1844 }, 1845 "class-declaration-or-expression-patterns": { 1846 "patterns": [ 1847 { 1848 "include": "#peacescript" 1849 }, 1850 { 1851 "include": "#comment" 1852 }, 1853 { 1854 "include": "#class-or-interface-heritage" 1855 }, 1856 { 1857 "match": "[_$[:alpha:]][_$[:alnum:]]*", 1858 "captures": { 1859 "0": { 1860 "name": "entity.name.type.class.js" 1861 } 1862 } 1863 }, 1864 { 1865 "include": "#type-parameters" 1866 }, 1867 { 1868 "include": "#class-or-interface-body" 1869 } 1870 ] 1871 }, 1872 "interface-declaration": { 1873 "name": "meta.interface.js", 1874 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])", 1875 "beginCaptures": { 1876 "1": { 1877 "name": "keyword.control.export.js" 1878 }, 1879 "2": { 1880 "name": "storage.modifier.js" 1881 }, 1882 "3": { 1883 "name": "storage.modifier.js" 1884 }, 1885 "4": { 1886 "name": "storage.type.interface.js" 1887 } 1888 }, 1889 "end": "(?<=\\})", 1890 "patterns": [ 1891 { 1892 "include": "#peacescript" 1893 }, 1894 { 1895 "include": "#comment" 1896 }, 1897 { 1898 "include": "#class-or-interface-heritage" 1899 }, 1900 { 1901 "match": "[_$[:alpha:]][_$[:alnum:]]*", 1902 "captures": { 1903 "0": { 1904 "name": "entity.name.type.interface.js" 1905 } 1906 } 1907 }, 1908 { 1909 "include": "#type-parameters" 1910 }, 1911 { 1912 "include": "#class-or-interface-body" 1913 } 1914 ] 1915 }, 1916 "class-or-interface-heritage": { 1917 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 1918 "beginCaptures": { 1919 "1": { 1920 "name": "storage.modifier.js" 1921 } 1922 }, 1923 "end": "(?=\\{)", 1924 "patterns": [ 1925 { 1926 "include": "#peacescript" 1927 }, 1928 { 1929 "include": "#comment" 1930 }, 1931 { 1932 "include": "#class-or-interface-heritage" 1933 }, 1934 { 1935 "include": "#type-parameters" 1936 }, 1937 { 1938 "include": "#expressionWithoutIdentifiers" 1939 }, 1940 { 1941 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)", 1942 "captures": { 1943 "1": { 1944 "name": "entity.name.type.module.js" 1945 }, 1946 "2": { 1947 "name": "punctuation.accessor.js" 1948 }, 1949 "3": { 1950 "name": "punctuation.accessor.optional.js" 1951 } 1952 } 1953 }, 1954 { 1955 "match": "([_$[:alpha:]][_$[:alnum:]]*)", 1956 "captures": { 1957 "1": { 1958 "name": "entity.other.inherited-class.js" 1959 } 1960 } 1961 }, 1962 { 1963 "include": "#expressionPunctuations" 1964 } 1965 ] 1966 }, 1967 "class-or-interface-body": { 1968 "begin": "\\{", 1969 "beginCaptures": { 1970 "0": { 1971 "name": "punctuation.definition.block.js" 1972 } 1973 }, 1974 "end": "\\}", 1975 "endCaptures": { 1976 "0": { 1977 "name": "punctuation.definition.block.js" 1978 } 1979 }, 1980 "patterns": [ 1981 { 1982 "include": "#peacescript" 1983 }, 1984 { 1985 "include": "#comment" 1986 }, 1987 { 1988 "include": "#decorator" 1989 }, 1990 { 1991 "begin": "(?<=:)\\s*", 1992 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 1993 "patterns": [ 1994 { 1995 "include": "#expression" 1996 } 1997 ] 1998 }, 1999 { 2000 "include": "#method-declaration" 2001 }, 2002 { 2003 "include": "#indexer-declaration" 2004 }, 2005 { 2006 "include": "#field-declaration" 2007 }, 2008 { 2009 "include": "#string" 2010 }, 2011 { 2012 "include": "#type-annotation" 2013 }, 2014 { 2015 "include": "#variable-initializer" 2016 }, 2017 { 2018 "include": "#access-modifier" 2019 }, 2020 { 2021 "include": "#property-accessor" 2022 }, 2023 { 2024 "include": "#async-modifier" 2025 }, 2026 { 2027 "include": "#after-operator-block-as-object-literal" 2028 }, 2029 { 2030 "include": "#decl-block" 2031 }, 2032 { 2033 "include": "#expression" 2034 }, 2035 { 2036 "include": "#punctuation-comma" 2037 }, 2038 { 2039 "include": "#punctuation-semicolon" 2040 } 2041 ] 2042 }, 2043 "access-modifier": { 2044 "name": "storage.modifier.js", 2045 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 2046 }, 2047 "property-accessor": { 2048 "name": "storage.type.property.js", 2049 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 2050 }, 2051 "async-modifier": { 2052 "name": "storage.modifier.async.js", 2053 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 2054 }, 2055 "enum-declaration": { 2056 "name": "meta.enum.declaration.js", 2057 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)", 2058 "beginCaptures": { 2059 "1": { 2060 "name": "keyword.control.export.js" 2061 }, 2062 "2": { 2063 "name": "storage.modifier.js" 2064 }, 2065 "3": { 2066 "name": "storage.modifier.js" 2067 }, 2068 "4": { 2069 "name": "storage.type.enum.js" 2070 }, 2071 "5": { 2072 "name": "entity.name.type.enum.js" 2073 } 2074 }, 2075 "end": "(?<=\\})", 2076 "patterns": [ 2077 { 2078 "include": "#peacescript" 2079 }, 2080 { 2081 "include": "#comment" 2082 }, 2083 { 2084 "begin": "\\{", 2085 "beginCaptures": { 2086 "0": { 2087 "name": "punctuation.definition.block.js" 2088 } 2089 }, 2090 "end": "\\}", 2091 "endCaptures": { 2092 "0": { 2093 "name": "punctuation.definition.block.js" 2094 } 2095 }, 2096 "patterns": [ 2097 { 2098 "include": "#peacescript" 2099 }, 2100 { 2101 "include": "#comment" 2102 }, 2103 { 2104 "begin": "([_$[:alpha:]][_$[:alnum:]]*)", 2105 "beginCaptures": { 2106 "0": { 2107 "name": "variable.other.enummember.js" 2108 } 2109 }, 2110 "end": "(?=,|\\}|$)", 2111 "patterns": [ 2112 { 2113 "include": "#peacescript" 2114 }, 2115 { 2116 "include": "#comment" 2117 }, 2118 { 2119 "include": "#variable-initializer" 2120 } 2121 ] 2122 }, 2123 { 2124 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))", 2125 "end": "(?=,|\\}|$)", 2126 "patterns": [ 2127 { 2128 "include": "#peacescript" 2129 }, 2130 { 2131 "include": "#string" 2132 }, 2133 { 2134 "include": "#array-literal" 2135 }, 2136 { 2137 "include": "#comment" 2138 }, 2139 { 2140 "include": "#variable-initializer" 2141 } 2142 ] 2143 }, 2144 { 2145 "include": "#punctuation-comma" 2146 } 2147 ] 2148 } 2149 ] 2150 }, 2151 "namespace-declaration": { 2152 "name": "meta.namespace.declaration.js", 2153 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))", 2154 "beginCaptures": { 2155 "1": { 2156 "name": "keyword.control.export.js" 2157 }, 2158 "2": { 2159 "name": "storage.modifier.js" 2160 }, 2161 "3": { 2162 "name": "storage.type.namespace.js" 2163 } 2164 }, 2165 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2166 "patterns": [ 2167 { 2168 "include": "#peacescript" 2169 }, 2170 { 2171 "include": "#comment" 2172 }, 2173 { 2174 "include": "#string" 2175 }, 2176 { 2177 "name": "entity.name.type.module.js", 2178 "match": "([_$[:alpha:]][_$[:alnum:]]*)" 2179 }, 2180 { 2181 "include": "#punctuation-accessor" 2182 }, 2183 { 2184 "include": "#decl-block" 2185 } 2186 ] 2187 }, 2188 "type-alias-declaration": { 2189 "name": "meta.type.declaration.js", 2190 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*", 2191 "beginCaptures": { 2192 "1": { 2193 "name": "keyword.control.export.js" 2194 }, 2195 "2": { 2196 "name": "storage.modifier.js" 2197 }, 2198 "3": { 2199 "name": "storage.type.type.js" 2200 }, 2201 "4": { 2202 "name": "entity.name.type.alias.js" 2203 } 2204 }, 2205 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2206 "patterns": [ 2207 { 2208 "include": "#peacescript" 2209 }, 2210 { 2211 "include": "#comment" 2212 }, 2213 { 2214 "include": "#type-parameters" 2215 }, 2216 { 2217 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 2218 "beginCaptures": { 2219 "1": { 2220 "name": "keyword.operator.assignment.js" 2221 }, 2222 "2": { 2223 "name": "keyword.control.intrinsic.js" 2224 } 2225 }, 2226 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2227 "patterns": [ 2228 { 2229 "include": "#type" 2230 } 2231 ] 2232 }, 2233 { 2234 "begin": "(=)\\s*", 2235 "beginCaptures": { 2236 "1": { 2237 "name": "keyword.operator.assignment.js" 2238 } 2239 }, 2240 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2241 "patterns": [ 2242 { 2243 "include": "#type" 2244 } 2245 ] 2246 } 2247 ] 2248 }, 2249 "import-equals-declaration": { 2250 "patterns": [ 2251 { 2252 "name": "meta.import-equals.external.js", 2253 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()", 2254 "beginCaptures": { 2255 "1": { 2256 "name": "keyword.control.export.js" 2257 }, 2258 "2": { 2259 "name": "storage.modifier.js" 2260 }, 2261 "3": { 2262 "name": "keyword.control.import.js" 2263 }, 2264 "4": { 2265 "name": "keyword.control.type.js" 2266 }, 2267 "5": { 2268 "name": "variable.other.readwrite.alias.js" 2269 }, 2270 "6": { 2271 "name": "keyword.operator.assignment.js" 2272 }, 2273 "7": { 2274 "name": "keyword.control.require.js" 2275 }, 2276 "8": { 2277 "name": "meta.brace.round.js" 2278 } 2279 }, 2280 "end": "\\)", 2281 "endCaptures": { 2282 "0": { 2283 "name": "meta.brace.round.js" 2284 } 2285 }, 2286 "patterns": [ 2287 { 2288 "include": "#peacescript" 2289 }, 2290 { 2291 "include": "#comment" 2292 }, 2293 { 2294 "include": "#string" 2295 } 2296 ] 2297 }, 2298 { 2299 "name": "meta.import-equals.internal.js", 2300 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)", 2301 "beginCaptures": { 2302 "1": { 2303 "name": "keyword.control.export.js" 2304 }, 2305 "2": { 2306 "name": "storage.modifier.js" 2307 }, 2308 "3": { 2309 "name": "keyword.control.import.js" 2310 }, 2311 "4": { 2312 "name": "keyword.control.type.js" 2313 }, 2314 "5": { 2315 "name": "variable.other.readwrite.alias.js" 2316 }, 2317 "6": { 2318 "name": "keyword.operator.assignment.js" 2319 } 2320 }, 2321 "end": "(?=;|$|^)", 2322 "patterns": [ 2323 { 2324 "include": "#peacescript" 2325 }, 2326 { 2327 "include": "#single-line-comment-consuming-line-ending" 2328 }, 2329 { 2330 "include": "#comment" 2331 }, 2332 { 2333 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", 2334 "captures": { 2335 "1": { 2336 "name": "entity.name.type.module.js" 2337 }, 2338 "2": { 2339 "name": "punctuation.accessor.js" 2340 }, 2341 "3": { 2342 "name": "punctuation.accessor.optional.js" 2343 } 2344 } 2345 }, 2346 { 2347 "name": "variable.other.readwrite.js", 2348 "match": "([_$[:alpha:]][_$[:alnum:]]*)" 2349 } 2350 ] 2351 } 2352 ] 2353 }, 2354 "import-declaration": { 2355 "name": "meta.import.js", 2356 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 2357 "beginCaptures": { 2358 "1": { 2359 "name": "keyword.control.export.js" 2360 }, 2361 "2": { 2362 "name": "storage.modifier.js" 2363 }, 2364 "3": { 2365 "name": "keyword.control.import.js" 2366 }, 2367 "4": { 2368 "name": "keyword.control.type.js" 2369 } 2370 }, 2371 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)", 2372 "patterns": [ 2373 { 2374 "include": "#peacescript" 2375 }, 2376 { 2377 "include": "#single-line-comment-consuming-line-ending" 2378 }, 2379 { 2380 "include": "#comment" 2381 }, 2382 { 2383 "include": "#string" 2384 }, 2385 { 2386 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])", 2387 "end": "\\bfrom\\b", 2388 "endCaptures": { 2389 "0": { 2390 "name": "keyword.control.from.js" 2391 } 2392 }, 2393 "patterns": [ 2394 { 2395 "include": "#import-export-declaration" 2396 } 2397 ] 2398 }, 2399 { 2400 "include": "#import-export-declaration" 2401 } 2402 ] 2403 }, 2404 "export-declaration": { 2405 "patterns": [ 2406 { 2407 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)", 2408 "captures": { 2409 "1": { 2410 "name": "keyword.control.export.js" 2411 }, 2412 "2": { 2413 "name": "keyword.control.as.js" 2414 }, 2415 "3": { 2416 "name": "storage.type.namespace.js" 2417 }, 2418 "4": { 2419 "name": "entity.name.type.module.js" 2420 } 2421 } 2422 }, 2423 { 2424 "name": "meta.export.default.js", 2425 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))", 2426 "beginCaptures": { 2427 "1": { 2428 "name": "keyword.control.export.js" 2429 }, 2430 "2": { 2431 "name": "keyword.control.type.js" 2432 }, 2433 "3": { 2434 "name": "keyword.operator.assignment.js" 2435 }, 2436 "4": { 2437 "name": "keyword.control.default.js" 2438 } 2439 }, 2440 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2441 "patterns": [ 2442 { 2443 "include": "#interface-declaration" 2444 }, 2445 { 2446 "include": "#expression" 2447 } 2448 ] 2449 }, 2450 { 2451 "name": "meta.export.js", 2452 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))", 2453 "beginCaptures": { 2454 "1": { 2455 "name": "keyword.control.export.js" 2456 }, 2457 "2": { 2458 "name": "keyword.control.type.js" 2459 } 2460 }, 2461 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 2462 "patterns": [ 2463 { 2464 "include": "#import-export-declaration" 2465 } 2466 ] 2467 } 2468 ] 2469 }, 2470 "import-export-declaration": { 2471 "patterns": [ 2472 { 2473 "include": "#peacescript" 2474 }, 2475 { 2476 "include": "#comment" 2477 }, 2478 { 2479 "include": "#string" 2480 }, 2481 { 2482 "include": "#import-export-block" 2483 }, 2484 { 2485 "name": "keyword.control.from.js", 2486 "match": "\\bfrom\\b" 2487 }, 2488 { 2489 "include": "#import-export-assert-clause" 2490 }, 2491 { 2492 "include": "#import-export-clause" 2493 } 2494 ] 2495 }, 2496 "import-export-assert-clause": { 2497 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(with)|(assert))\\s*(\\{)", 2498 "beginCaptures": { 2499 "1": { 2500 "name": "keyword.control.with.js" 2501 }, 2502 "2": { 2503 "name": "keyword.control.assert.js" 2504 }, 2505 "3": { 2506 "name": "punctuation.definition.block.js" 2507 } 2508 }, 2509 "end": "\\}", 2510 "endCaptures": { 2511 "0": { 2512 "name": "punctuation.definition.block.js" 2513 } 2514 }, 2515 "patterns": [ 2516 { 2517 "include": "#peacescript" 2518 }, 2519 { 2520 "include": "#comment" 2521 }, 2522 { 2523 "include": "#string" 2524 }, 2525 { 2526 "name": "meta.object-literal.key.js", 2527 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)" 2528 }, 2529 { 2530 "name": "punctuation.separator.key-value.js", 2531 "match": ":" 2532 } 2533 ] 2534 }, 2535 "import-export-block": { 2536 "name": "meta.block.js", 2537 "begin": "\\{", 2538 "beginCaptures": { 2539 "0": { 2540 "name": "punctuation.definition.block.js" 2541 } 2542 }, 2543 "end": "\\}", 2544 "endCaptures": { 2545 "0": { 2546 "name": "punctuation.definition.block.js" 2547 } 2548 }, 2549 "patterns": [ 2550 { 2551 "include": "#import-export-clause" 2552 } 2553 ] 2554 }, 2555 "import-export-clause": { 2556 "patterns": [ 2557 { 2558 "include": "#peacescript" 2559 }, 2560 { 2561 "include": "#comment" 2562 }, 2563 { 2564 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))", 2565 "captures": { 2566 "1": { 2567 "name": "keyword.control.type.js" 2568 }, 2569 "2": { 2570 "name": "keyword.control.default.js" 2571 }, 2572 "3": { 2573 "name": "constant.language.import-export-all.js" 2574 }, 2575 "4": { 2576 "name": "variable.other.readwrite.js" 2577 }, 2578 "5": { 2579 "name": "keyword.control.as.js" 2580 }, 2581 "6": { 2582 "name": "keyword.control.default.js" 2583 }, 2584 "7": { 2585 "name": "variable.other.readwrite.alias.js" 2586 } 2587 } 2588 }, 2589 { 2590 "include": "#punctuation-comma" 2591 }, 2592 { 2593 "name": "constant.language.import-export-all.js", 2594 "match": "\\*" 2595 }, 2596 { 2597 "name": "keyword.control.default.js", 2598 "match": "\\b(default)\\b" 2599 }, 2600 { 2601 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)", 2602 "captures": { 2603 "1": { 2604 "name": "keyword.control.type.js" 2605 }, 2606 "2": { 2607 "name": "variable.other.readwrite.alias.js" 2608 } 2609 } 2610 } 2611 ] 2612 }, 2613 "switch-statement": { 2614 "name": "switch-statement.expr.js", 2615 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()", 2616 "end": "\\}", 2617 "endCaptures": { 2618 "0": { 2619 "name": "punctuation.definition.block.js" 2620 } 2621 }, 2622 "patterns": [ 2623 { 2624 "include": "#peacescript" 2625 }, 2626 { 2627 "include": "#comment" 2628 }, 2629 { 2630 "name": "switch-expression.expr.js", 2631 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()", 2632 "beginCaptures": { 2633 "1": { 2634 "name": "keyword.control.switch.js" 2635 }, 2636 "2": { 2637 "name": "meta.brace.round.js" 2638 } 2639 }, 2640 "end": "\\)", 2641 "endCaptures": { 2642 "0": { 2643 "name": "meta.brace.round.js" 2644 } 2645 }, 2646 "patterns": [ 2647 { 2648 "include": "#expression" 2649 } 2650 ] 2651 }, 2652 { 2653 "name": "switch-block.expr.js", 2654 "begin": "\\{", 2655 "beginCaptures": { 2656 "0": { 2657 "name": "punctuation.definition.block.js" 2658 } 2659 }, 2660 "end": "(?=\\})", 2661 "patterns": [ 2662 { 2663 "name": "case-clause.expr.js", 2664 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 2665 "beginCaptures": { 2666 "1": { 2667 "name": "keyword.control.switch.js" 2668 } 2669 }, 2670 "end": "(?=:)", 2671 "patterns": [ 2672 { 2673 "include": "#expression" 2674 } 2675 ] 2676 }, 2677 { 2678 "begin": "(:)\\s*(\\{)", 2679 "beginCaptures": { 2680 "1": { 2681 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js" 2682 }, 2683 "2": { 2684 "name": "meta.block.js punctuation.definition.block.js" 2685 } 2686 }, 2687 "end": "\\}", 2688 "endCaptures": { 2689 "0": { 2690 "name": "meta.block.js punctuation.definition.block.js" 2691 } 2692 }, 2693 "contentName": "meta.block.js", 2694 "patterns": [ 2695 { 2696 "include": "#statements" 2697 } 2698 ] 2699 }, 2700 { 2701 "match": "(:)", 2702 "captures": { 2703 "0": { 2704 "name": "case-clause.expr.js punctuation.definition.section.case-statement.js" 2705 } 2706 } 2707 }, 2708 { 2709 "include": "#statements" 2710 } 2711 ] 2712 } 2713 ] 2714 }, 2715 "for-loop": { 2716 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())", 2717 "beginCaptures": { 2718 "0": { 2719 "name": "keyword.control.loop.js" 2720 } 2721 }, 2722 "end": "(?<=\\))", 2723 "patterns": [ 2724 { 2725 "include": "#peacescript" 2726 }, 2727 { 2728 "include": "#comment" 2729 }, 2730 { 2731 "name": "keyword.control.loop.js", 2732 "match": "await" 2733 }, 2734 { 2735 "begin": "\\(", 2736 "beginCaptures": { 2737 "0": { 2738 "name": "meta.brace.round.js" 2739 } 2740 }, 2741 "end": "\\)", 2742 "endCaptures": { 2743 "0": { 2744 "name": "meta.brace.round.js" 2745 } 2746 }, 2747 "patterns": [ 2748 { 2749 "include": "#var-expr" 2750 }, 2751 { 2752 "include": "#expression" 2753 }, 2754 { 2755 "include": "#punctuation-semicolon" 2756 } 2757 ] 2758 } 2759 ] 2760 }, 2761 "if-statement": { 2762 "patterns": [ 2763 { 2764 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))", 2765 "end": "(?=;|$|\\})", 2766 "patterns": [ 2767 { 2768 "include": "#peacescript" 2769 }, 2770 { 2771 "include": "#comment" 2772 }, 2773 { 2774 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()", 2775 "beginCaptures": { 2776 "1": { 2777 "name": "keyword.control.conditional.js" 2778 }, 2779 "2": { 2780 "name": "meta.brace.round.js" 2781 } 2782 }, 2783 "end": "\\)", 2784 "endCaptures": { 2785 "0": { 2786 "name": "meta.brace.round.js" 2787 } 2788 }, 2789 "patterns": [ 2790 { 2791 "include": "#expression" 2792 } 2793 ] 2794 }, 2795 { 2796 "name": "string.regexp.js", 2797 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", 2798 "beginCaptures": { 2799 "0": { 2800 "name": "punctuation.definition.string.begin.js" 2801 } 2802 }, 2803 "end": "(/)([dgimsuy]*)", 2804 "endCaptures": { 2805 "1": { 2806 "name": "punctuation.definition.string.end.js" 2807 }, 2808 "2": { 2809 "name": "keyword.other.js" 2810 } 2811 }, 2812 "patterns": [ 2813 { 2814 "include": "#regexp" 2815 } 2816 ] 2817 }, 2818 { 2819 "include": "#statements" 2820 } 2821 ] 2822 } 2823 ] 2824 }, 2825 "decl-block": { 2826 "name": "meta.block.js", 2827 "begin": "\\{", 2828 "beginCaptures": { 2829 "0": { 2830 "name": "punctuation.definition.block.js" 2831 } 2832 }, 2833 "end": "\\}", 2834 "endCaptures": { 2835 "0": { 2836 "name": "punctuation.definition.block.js" 2837 } 2838 }, 2839 "patterns": [ 2840 { 2841 "include": "#statements" 2842 } 2843 ] 2844 }, 2845 "after-operator-block-as-object-literal": { 2846 "name": "meta.objectliteral.js", 2847 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)", 2848 "beginCaptures": { 2849 "1": { 2850 "name": "punctuation.definition.block.js" 2851 } 2852 }, 2853 "end": "\\}", 2854 "endCaptures": { 2855 "0": { 2856 "name": "punctuation.definition.block.js" 2857 } 2858 }, 2859 "patterns": [ 2860 { 2861 "include": "#object-member" 2862 } 2863 ] 2864 }, 2865 "object-literal": { 2866 "name": "meta.objectliteral.js", 2867 "begin": "\\{", 2868 "beginCaptures": { 2869 "0": { 2870 "name": "punctuation.definition.block.js" 2871 } 2872 }, 2873 "end": "\\}", 2874 "endCaptures": { 2875 "0": { 2876 "name": "punctuation.definition.block.js" 2877 } 2878 }, 2879 "patterns": [ 2880 { 2881 "include": "#object-member" 2882 } 2883 ] 2884 }, 2885 "object-member": { 2886 "patterns": [ 2887 { 2888 "include": "#peacescript" 2889 }, 2890 { 2891 "include": "#comment" 2892 }, 2893 { 2894 "include": "#object-literal-method-declaration" 2895 }, 2896 { 2897 "name": "meta.object.member.js meta.object-literal.key.js", 2898 "begin": "(?=\\[)", 2899 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))", 2900 "patterns": [ 2901 { 2902 "include": "#peacescript" 2903 }, 2904 { 2905 "include": "#comment" 2906 }, 2907 { 2908 "include": "#array-literal" 2909 } 2910 ] 2911 }, 2912 { 2913 "name": "meta.object.member.js meta.object-literal.key.js", 2914 "begin": "(?=[\\'\\\"\\`])", 2915 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))", 2916 "patterns": [ 2917 { 2918 "include": "#peacescript" 2919 }, 2920 { 2921 "include": "#comment" 2922 }, 2923 { 2924 "include": "#string" 2925 } 2926 ] 2927 }, 2928 { 2929 "name": "meta.object.member.js meta.object-literal.key.js", 2930 "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))", 2931 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))", 2932 "patterns": [ 2933 { 2934 "include": "#peacescript" 2935 }, 2936 { 2937 "include": "#comment" 2938 }, 2939 { 2940 "include": "#numeric-literal" 2941 } 2942 ] 2943 }, 2944 { 2945 "name": "meta.method.declaration.js", 2946 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])", 2947 "end": "(?=\\}|;|,)|(?<=\\})", 2948 "patterns": [ 2949 { 2950 "include": "#function-body" 2951 } 2952 ] 2953 }, 2954 { 2955 "name": "meta.object.member.js", 2956 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", 2957 "captures": { 2958 "0": { 2959 "name": "meta.object-literal.key.js" 2960 }, 2961 "1": { 2962 "name": "constant.numeric.decimal.js" 2963 } 2964 } 2965 }, 2966 { 2967 "name": "meta.object.member.js", 2968 "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 2969 "captures": { 2970 "0": { 2971 "name": "meta.object-literal.key.js" 2972 }, 2973 "1": { 2974 "name": "entity.name.function.js" 2975 } 2976 } 2977 }, 2978 { 2979 "name": "meta.object.member.js", 2980 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)", 2981 "captures": { 2982 "0": { 2983 "name": "meta.object-literal.key.js" 2984 } 2985 } 2986 }, 2987 { 2988 "name": "meta.object.member.js", 2989 "begin": "\\.\\.\\.", 2990 "beginCaptures": { 2991 "0": { 2992 "name": "keyword.operator.spread.js" 2993 } 2994 }, 2995 "end": "(?=,|\\})", 2996 "patterns": [ 2997 { 2998 "include": "#expression" 2999 } 3000 ] 3001 }, 3002 { 3003 "name": "meta.object.member.js", 3004 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)", 3005 "captures": { 3006 "1": { 3007 "name": "variable.other.readwrite.js" 3008 } 3009 } 3010 }, 3011 { 3012 "name": "meta.object.member.js", 3013 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))", 3014 "captures": { 3015 "1": { 3016 "name": "keyword.control.as.js" 3017 }, 3018 "2": { 3019 "name": "storage.modifier.js" 3020 } 3021 } 3022 }, 3023 { 3024 "name": "meta.object.member.js", 3025 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", 3026 "beginCaptures": { 3027 "1": { 3028 "name": "keyword.control.as.js" 3029 }, 3030 "2": { 3031 "name": "keyword.control.satisfies.js" 3032 } 3033 }, 3034 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))", 3035 "patterns": [ 3036 { 3037 "include": "#type" 3038 } 3039 ] 3040 }, 3041 { 3042 "name": "meta.object.member.js", 3043 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)", 3044 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)", 3045 "patterns": [ 3046 { 3047 "include": "#expression" 3048 } 3049 ] 3050 }, 3051 { 3052 "name": "meta.object.member.js", 3053 "begin": ":", 3054 "beginCaptures": { 3055 "0": { 3056 "name": "meta.object-literal.key.js punctuation.separator.key-value.js" 3057 } 3058 }, 3059 "end": "(?=,|\\})", 3060 "patterns": [ 3061 { 3062 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", 3063 "beginCaptures": { 3064 "1": { 3065 "name": "storage.modifier.async.js" 3066 } 3067 }, 3068 "end": "(?<=\\))", 3069 "patterns": [ 3070 { 3071 "include": "#type-parameters" 3072 }, 3073 { 3074 "begin": "\\(", 3075 "beginCaptures": { 3076 "0": { 3077 "name": "meta.brace.round.js" 3078 } 3079 }, 3080 "end": "\\)", 3081 "endCaptures": { 3082 "0": { 3083 "name": "meta.brace.round.js" 3084 } 3085 }, 3086 "patterns": [ 3087 { 3088 "include": "#expression-inside-possibly-arrow-parens" 3089 } 3090 ] 3091 } 3092 ] 3093 }, 3094 { 3095 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", 3096 "beginCaptures": { 3097 "1": { 3098 "name": "storage.modifier.async.js" 3099 }, 3100 "2": { 3101 "name": "meta.brace.round.js" 3102 } 3103 }, 3104 "end": "\\)", 3105 "endCaptures": { 3106 "0": { 3107 "name": "meta.brace.round.js" 3108 } 3109 }, 3110 "patterns": [ 3111 { 3112 "include": "#expression-inside-possibly-arrow-parens" 3113 } 3114 ] 3115 }, 3116 { 3117 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)", 3118 "beginCaptures": { 3119 "1": { 3120 "name": "storage.modifier.async.js" 3121 } 3122 }, 3123 "end": "(?<=\\>)", 3124 "patterns": [ 3125 { 3126 "include": "#type-parameters" 3127 } 3128 ] 3129 }, 3130 { 3131 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", 3132 "beginCaptures": { 3133 "1": { 3134 "name": "meta.brace.round.js" 3135 } 3136 }, 3137 "end": "\\)", 3138 "endCaptures": { 3139 "0": { 3140 "name": "meta.brace.round.js" 3141 } 3142 }, 3143 "patterns": [ 3144 { 3145 "include": "#expression-inside-possibly-arrow-parens" 3146 } 3147 ] 3148 }, 3149 { 3150 "include": "#possibly-arrow-return-type" 3151 }, 3152 { 3153 "include": "#expression" 3154 } 3155 ] 3156 }, 3157 { 3158 "include": "#punctuation-comma" 3159 }, 3160 { 3161 "include": "#decl-block" 3162 } 3163 ] 3164 }, 3165 "ternary-expression": { 3166 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)", 3167 "beginCaptures": { 3168 "1": { 3169 "name": "keyword.operator.ternary.js" 3170 } 3171 }, 3172 "end": "\\s*(:)", 3173 "endCaptures": { 3174 "1": { 3175 "name": "keyword.operator.ternary.js" 3176 } 3177 }, 3178 "patterns": [ 3179 { 3180 "include": "#expression" 3181 } 3182 ] 3183 }, 3184 "function-call": { 3185 "patterns": [ 3186 { 3187 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", 3188 "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", 3189 "patterns": [ 3190 { 3191 "include": "#peacescript" 3192 }, 3193 { 3194 "name": "meta.function-call.js", 3195 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", 3196 "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())", 3197 "patterns": [ 3198 { 3199 "include": "#function-call-target" 3200 } 3201 ] 3202 }, 3203 { 3204 "include": "#comment" 3205 }, 3206 { 3207 "include": "#function-call-optionals" 3208 }, 3209 { 3210 "include": "#type-arguments" 3211 }, 3212 { 3213 "include": "#paren-expression" 3214 } 3215 ] 3216 }, 3217 { 3218 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", 3219 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))", 3220 "patterns": [ 3221 { 3222 "include": "#peacescript" 3223 }, 3224 { 3225 "name": "meta.function-call.js", 3226 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))", 3227 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))", 3228 "patterns": [ 3229 { 3230 "include": "#function-call-target" 3231 } 3232 ] 3233 }, 3234 { 3235 "include": "#comment" 3236 }, 3237 { 3238 "include": "#function-call-optionals" 3239 }, 3240 { 3241 "include": "#type-arguments" 3242 } 3243 ] 3244 } 3245 ] 3246 }, 3247 "function-call-target": { 3248 "patterns": [ 3249 { 3250 "include": "#support-function-call-identifiers" 3251 }, 3252 { 3253 "name": "entity.name.function.js", 3254 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)" 3255 } 3256 ] 3257 }, 3258 "function-call-optionals": { 3259 "patterns": [ 3260 { 3261 "name": "meta.function-call.js punctuation.accessor.optional.js", 3262 "match": "\\?\\." 3263 }, 3264 { 3265 "name": "meta.function-call.js keyword.operator.definiteassignment.js", 3266 "match": "\\!" 3267 } 3268 ] 3269 }, 3270 "support-function-call-identifiers": { 3271 "patterns": [ 3272 { 3273 "include": "#literal" 3274 }, 3275 { 3276 "include": "#support-objects" 3277 }, 3278 { 3279 "include": "#object-identifiers" 3280 }, 3281 { 3282 "include": "#punctuation-accessor" 3283 }, 3284 { 3285 "name": "keyword.operator.expression.import.js", 3286 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))" 3287 } 3288 ] 3289 }, 3290 "new-expr": { 3291 "name": "new.expr.js", 3292 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 3293 "beginCaptures": { 3294 "1": { 3295 "name": "keyword.operator.new.js" 3296 } 3297 }, 3298 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", 3299 "patterns": [ 3300 { 3301 "include": "#expression" 3302 } 3303 ] 3304 }, 3305 "instanceof-expr": { 3306 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 3307 "beginCaptures": { 3308 "1": { 3309 "name": "keyword.operator.expression.instanceof.js" 3310 } 3311 }, 3312 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))", 3313 "patterns": [ 3314 { 3315 "include": "#type" 3316 } 3317 ] 3318 }, 3319 "paren-expression-possibly-arrow": { 3320 "patterns": [ 3321 { 3322 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))", 3323 "beginCaptures": { 3324 "1": { 3325 "name": "storage.modifier.async.js" 3326 } 3327 }, 3328 "end": "(?<=\\))", 3329 "patterns": [ 3330 { 3331 "include": "#paren-expression-possibly-arrow-with-typeparameters" 3332 } 3333 ] 3334 }, 3335 { 3336 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)", 3337 "beginCaptures": { 3338 "1": { 3339 "name": "storage.modifier.async.js" 3340 } 3341 }, 3342 "end": "(?<=\\))", 3343 "patterns": [ 3344 { 3345 "include": "#paren-expression-possibly-arrow-with-typeparameters" 3346 } 3347 ] 3348 }, 3349 { 3350 "include": "#possibly-arrow-return-type" 3351 } 3352 ] 3353 }, 3354 "paren-expression-possibly-arrow-with-typeparameters": { 3355 "patterns": [ 3356 { 3357 "include": "#type-parameters" 3358 }, 3359 { 3360 "begin": "\\(", 3361 "beginCaptures": { 3362 "0": { 3363 "name": "meta.brace.round.js" 3364 } 3365 }, 3366 "end": "\\)", 3367 "endCaptures": { 3368 "0": { 3369 "name": "meta.brace.round.js" 3370 } 3371 }, 3372 "patterns": [ 3373 { 3374 "include": "#expression-inside-possibly-arrow-parens" 3375 } 3376 ] 3377 } 3378 ] 3379 }, 3380 "expression-inside-possibly-arrow-parens": { 3381 "patterns": [ 3382 { 3383 "include": "#peacescript" 3384 }, 3385 { 3386 "include": "#expressionWithoutIdentifiers" 3387 }, 3388 { 3389 "include": "#comment" 3390 }, 3391 { 3392 "include": "#string" 3393 }, 3394 { 3395 "include": "#decorator" 3396 }, 3397 { 3398 "include": "#destructuring-parameter" 3399 }, 3400 { 3401 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)", 3402 "captures": { 3403 "1": { 3404 "name": "storage.modifier.js" 3405 } 3406 } 3407 }, 3408 { 3409 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", 3410 "captures": { 3411 "1": { 3412 "name": "storage.modifier.js" 3413 }, 3414 "2": { 3415 "name": "keyword.operator.rest.js" 3416 }, 3417 "3": { 3418 "name": "entity.name.function.js variable.language.this.js" 3419 }, 3420 "4": { 3421 "name": "entity.name.function.js" 3422 }, 3423 "5": { 3424 "name": "keyword.operator.optional.js" 3425 } 3426 } 3427 }, 3428 { 3429 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)", 3430 "captures": { 3431 "1": { 3432 "name": "storage.modifier.js" 3433 }, 3434 "2": { 3435 "name": "keyword.operator.rest.js" 3436 }, 3437 "3": { 3438 "name": "variable.parameter.js variable.language.this.js" 3439 }, 3440 "4": { 3441 "name": "variable.parameter.js" 3442 }, 3443 "5": { 3444 "name": "keyword.operator.optional.js" 3445 } 3446 } 3447 }, 3448 { 3449 "include": "#type-annotation" 3450 }, 3451 { 3452 "include": "#variable-initializer" 3453 }, 3454 { 3455 "name": "punctuation.separator.parameter.js", 3456 "match": "," 3457 }, 3458 { 3459 "include": "#identifiers" 3460 }, 3461 { 3462 "include": "#expressionPunctuations" 3463 } 3464 ] 3465 }, 3466 "paren-expression": { 3467 "begin": "\\(", 3468 "beginCaptures": { 3469 "0": { 3470 "name": "meta.brace.round.js" 3471 } 3472 }, 3473 "end": "\\)", 3474 "endCaptures": { 3475 "0": { 3476 "name": "meta.brace.round.js" 3477 } 3478 }, 3479 "patterns": [ 3480 { 3481 "include": "#expression" 3482 } 3483 ] 3484 }, 3485 "cast": { 3486 "patterns": [ 3487 { 3488 "include": "#jsx" 3489 } 3490 ] 3491 }, 3492 "expression-operators": { 3493 "patterns": [ 3494 { 3495 "name": "keyword.control.flow.js", 3496 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3497 }, 3498 { 3499 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)", 3500 "beginCaptures": { 3501 "1": { 3502 "name": "keyword.control.flow.js" 3503 } 3504 }, 3505 "end": "\\*", 3506 "endCaptures": { 3507 "0": { 3508 "name": "keyword.generator.asterisk.js" 3509 } 3510 }, 3511 "patterns": [ 3512 { 3513 "include": "#peacescript" 3514 }, 3515 { 3516 "include": "#comment" 3517 } 3518 ] 3519 }, 3520 { 3521 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?", 3522 "captures": { 3523 "1": { 3524 "name": "keyword.control.flow.js" 3525 }, 3526 "2": { 3527 "name": "keyword.generator.asterisk.js" 3528 } 3529 } 3530 }, 3531 { 3532 "name": "keyword.operator.expression.delete.js", 3533 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3534 }, 3535 { 3536 "name": "keyword.operator.expression.in.js", 3537 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" 3538 }, 3539 { 3540 "name": "keyword.operator.expression.of.js", 3541 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()" 3542 }, 3543 { 3544 "name": "keyword.operator.expression.instanceof.js", 3545 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3546 }, 3547 { 3548 "name": "keyword.operator.new.js", 3549 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3550 }, 3551 { 3552 "include": "#typeof-operator" 3553 }, 3554 { 3555 "name": "keyword.operator.expression.void.js", 3556 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3557 }, 3558 { 3559 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))", 3560 "captures": { 3561 "1": { 3562 "name": "keyword.control.as.js" 3563 }, 3564 "2": { 3565 "name": "storage.modifier.js" 3566 } 3567 } 3568 }, 3569 { 3570 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+", 3571 "beginCaptures": { 3572 "1": { 3573 "name": "keyword.control.as.js" 3574 }, 3575 "2": { 3576 "name": "keyword.control.satisfies.js" 3577 } 3578 }, 3579 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))", 3580 "patterns": [ 3581 { 3582 "include": "#type" 3583 } 3584 ] 3585 }, 3586 { 3587 "name": "keyword.operator.spread.js", 3588 "match": "\\.\\.\\." 3589 }, 3590 { 3591 "name": "keyword.operator.assignment.compound.js", 3592 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=" 3593 }, 3594 { 3595 "name": "keyword.operator.assignment.compound.bitwise.js", 3596 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|=" 3597 }, 3598 { 3599 "name": "keyword.operator.bitwise.shift.js", 3600 "match": "<<|>>>|>>" 3601 }, 3602 { 3603 "name": "keyword.operator.comparison.js", 3604 "match": "===|!==|==|!=" 3605 }, 3606 { 3607 "name": "keyword.operator.relational.js", 3608 "match": "<=|>=|<>|<|>" 3609 }, 3610 { 3611 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))", 3612 "captures": { 3613 "1": { 3614 "name": "keyword.operator.logical.js" 3615 }, 3616 "2": { 3617 "name": "keyword.operator.assignment.compound.js" 3618 }, 3619 "3": { 3620 "name": "keyword.operator.arithmetic.js" 3621 } 3622 } 3623 }, 3624 { 3625 "name": "keyword.operator.logical.js", 3626 "match": "\\!|&&|\\|\\||\\?\\?" 3627 }, 3628 { 3629 "name": "keyword.operator.bitwise.js", 3630 "match": "\\&|~|\\^|\\|" 3631 }, 3632 { 3633 "name": "keyword.operator.assignment.js", 3634 "match": "\\=" 3635 }, 3636 { 3637 "name": "keyword.operator.decrement.js", 3638 "match": "--" 3639 }, 3640 { 3641 "name": "keyword.operator.increment.js", 3642 "match": "\\+\\+" 3643 }, 3644 { 3645 "name": "keyword.operator.arithmetic.js", 3646 "match": "%|\\*|/|-|\\+" 3647 }, 3648 { 3649 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))", 3650 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))", 3651 "endCaptures": { 3652 "1": { 3653 "name": "keyword.operator.assignment.compound.js" 3654 }, 3655 "2": { 3656 "name": "keyword.operator.arithmetic.js" 3657 } 3658 }, 3659 "patterns": [ 3660 { 3661 "include": "#peacescript" 3662 }, 3663 { 3664 "include": "#comment" 3665 } 3666 ] 3667 }, 3668 { 3669 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))", 3670 "captures": { 3671 "1": { 3672 "name": "keyword.operator.assignment.compound.js" 3673 }, 3674 "2": { 3675 "name": "keyword.operator.arithmetic.js" 3676 } 3677 } 3678 } 3679 ] 3680 }, 3681 "typeof-operator": { 3682 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 3683 "beginCaptures": { 3684 "0": { 3685 "name": "keyword.operator.expression.typeof.js" 3686 } 3687 }, 3688 "end": "(?=[,);}\\]=>:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))", 3689 "patterns": [ 3690 { 3691 "include": "#type-arguments" 3692 }, 3693 { 3694 "include": "#expression" 3695 } 3696 ] 3697 }, 3698 "literal": { 3699 "patterns": [ 3700 { 3701 "include": "#numeric-literal" 3702 }, 3703 { 3704 "include": "#boolean-literal" 3705 }, 3706 { 3707 "include": "#null-literal" 3708 }, 3709 { 3710 "include": "#undefined-literal" 3711 }, 3712 { 3713 "include": "#numericConstant-literal" 3714 }, 3715 { 3716 "include": "#array-literal" 3717 }, 3718 { 3719 "include": "#this-literal" 3720 }, 3721 { 3722 "include": "#super-literal" 3723 } 3724 ] 3725 }, 3726 "array-literal": { 3727 "name": "meta.array.literal.js", 3728 "begin": "\\s*(\\[)", 3729 "beginCaptures": { 3730 "1": { 3731 "name": "meta.brace.square.js" 3732 } 3733 }, 3734 "end": "\\]", 3735 "endCaptures": { 3736 "0": { 3737 "name": "meta.brace.square.js" 3738 } 3739 }, 3740 "patterns": [ 3741 { 3742 "include": "#expression" 3743 }, 3744 { 3745 "include": "#punctuation-comma" 3746 } 3747 ] 3748 }, 3749 "numeric-literal": { 3750 "patterns": [ 3751 { 3752 "name": "constant.numeric.hex.js", 3753 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)", 3754 "captures": { 3755 "1": { 3756 "name": "storage.type.numeric.bigint.js" 3757 } 3758 } 3759 }, 3760 { 3761 "name": "constant.numeric.binary.js", 3762 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)", 3763 "captures": { 3764 "1": { 3765 "name": "storage.type.numeric.bigint.js" 3766 } 3767 } 3768 }, 3769 { 3770 "name": "constant.numeric.octal.js", 3771 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)", 3772 "captures": { 3773 "1": { 3774 "name": "storage.type.numeric.bigint.js" 3775 } 3776 } 3777 }, 3778 { 3779 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)", 3780 "captures": { 3781 "0": { 3782 "name": "constant.numeric.decimal.js" 3783 }, 3784 "1": { 3785 "name": "meta.delimiter.decimal.period.js" 3786 }, 3787 "2": { 3788 "name": "storage.type.numeric.bigint.js" 3789 }, 3790 "3": { 3791 "name": "meta.delimiter.decimal.period.js" 3792 }, 3793 "4": { 3794 "name": "storage.type.numeric.bigint.js" 3795 }, 3796 "5": { 3797 "name": "meta.delimiter.decimal.period.js" 3798 }, 3799 "6": { 3800 "name": "storage.type.numeric.bigint.js" 3801 }, 3802 "7": { 3803 "name": "storage.type.numeric.bigint.js" 3804 }, 3805 "8": { 3806 "name": "meta.delimiter.decimal.period.js" 3807 }, 3808 "9": { 3809 "name": "storage.type.numeric.bigint.js" 3810 }, 3811 "10": { 3812 "name": "meta.delimiter.decimal.period.js" 3813 }, 3814 "11": { 3815 "name": "storage.type.numeric.bigint.js" 3816 }, 3817 "12": { 3818 "name": "meta.delimiter.decimal.period.js" 3819 }, 3820 "13": { 3821 "name": "storage.type.numeric.bigint.js" 3822 }, 3823 "14": { 3824 "name": "storage.type.numeric.bigint.js" 3825 } 3826 } 3827 } 3828 ] 3829 }, 3830 "boolean-literal": { 3831 "patterns": [ 3832 { 3833 "name": "constant.language.boolean.true.js", 3834 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3835 }, 3836 { 3837 "name": "constant.language.boolean.false.js", 3838 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3839 } 3840 ] 3841 }, 3842 "null-literal": { 3843 "name": "constant.language.null.js", 3844 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3845 }, 3846 "this-literal": { 3847 "name": "variable.language.this.js", 3848 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)" 3849 }, 3850 "super-literal": { 3851 "name": "variable.language.super.js", 3852 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)" 3853 }, 3854 "undefined-literal": { 3855 "name": "constant.language.undefined.js", 3856 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3857 }, 3858 "numericConstant-literal": { 3859 "patterns": [ 3860 { 3861 "name": "constant.language.nan.js", 3862 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3863 }, 3864 { 3865 "name": "constant.language.infinity.js", 3866 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 3867 } 3868 ] 3869 }, 3870 "support-objects": { 3871 "patterns": [ 3872 { 3873 "name": "variable.language.arguments.js", 3874 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)" 3875 }, 3876 { 3877 "name": "support.class.promise.js", 3878 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)" 3879 }, 3880 { 3881 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)", 3882 "captures": { 3883 "1": { 3884 "name": "keyword.control.import.js" 3885 }, 3886 "2": { 3887 "name": "punctuation.accessor.js" 3888 }, 3889 "3": { 3890 "name": "punctuation.accessor.optional.js" 3891 }, 3892 "4": { 3893 "name": "support.variable.property.importmeta.js" 3894 } 3895 } 3896 }, 3897 { 3898 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)", 3899 "captures": { 3900 "1": { 3901 "name": "keyword.operator.new.js" 3902 }, 3903 "2": { 3904 "name": "punctuation.accessor.js" 3905 }, 3906 "3": { 3907 "name": "punctuation.accessor.optional.js" 3908 }, 3909 "4": { 3910 "name": "support.variable.property.target.js" 3911 } 3912 } 3913 }, 3914 { 3915 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))", 3916 "captures": { 3917 "1": { 3918 "name": "punctuation.accessor.js" 3919 }, 3920 "2": { 3921 "name": "punctuation.accessor.optional.js" 3922 }, 3923 "3": { 3924 "name": "support.variable.property.js" 3925 }, 3926 "4": { 3927 "name": "support.constant.js" 3928 } 3929 } 3930 }, 3931 { 3932 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)", 3933 "captures": { 3934 "1": { 3935 "name": "support.type.object.module.js" 3936 }, 3937 "2": { 3938 "name": "support.type.object.module.js" 3939 }, 3940 "3": { 3941 "name": "punctuation.accessor.js" 3942 }, 3943 "4": { 3944 "name": "punctuation.accessor.optional.js" 3945 }, 3946 "5": { 3947 "name": "support.type.object.module.js" 3948 } 3949 } 3950 } 3951 ] 3952 }, 3953 "identifiers": { 3954 "patterns": [ 3955 { 3956 "include": "#object-identifiers" 3957 }, 3958 { 3959 "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends\n) |\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))", 3960 "captures": { 3961 "1": { 3962 "name": "punctuation.accessor.js" 3963 }, 3964 "2": { 3965 "name": "punctuation.accessor.optional.js" 3966 }, 3967 "3": { 3968 "name": "entity.name.function.js" 3969 } 3970 } 3971 }, 3972 { 3973 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])", 3974 "captures": { 3975 "1": { 3976 "name": "punctuation.accessor.js" 3977 }, 3978 "2": { 3979 "name": "punctuation.accessor.optional.js" 3980 }, 3981 "3": { 3982 "name": "variable.other.constant.property.js" 3983 } 3984 } 3985 }, 3986 { 3987 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)", 3988 "captures": { 3989 "1": { 3990 "name": "punctuation.accessor.js" 3991 }, 3992 "2": { 3993 "name": "punctuation.accessor.optional.js" 3994 }, 3995 "3": { 3996 "name": "variable.other.property.js" 3997 } 3998 } 3999 }, 4000 { 4001 "name": "variable.other.constant.js", 4002 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])" 4003 }, 4004 { 4005 "name": "variable.other.readwrite.js", 4006 "match": "[_$[:alpha:]][_$[:alnum:]]*" 4007 } 4008 ] 4009 }, 4010 "object-identifiers": { 4011 "patterns": [ 4012 { 4013 "name": "support.class.js", 4014 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))" 4015 }, 4016 { 4017 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", 4018 "captures": { 4019 "1": { 4020 "name": "punctuation.accessor.js" 4021 }, 4022 "2": { 4023 "name": "punctuation.accessor.optional.js" 4024 }, 4025 "3": { 4026 "name": "variable.other.constant.object.property.js" 4027 }, 4028 "4": { 4029 "name": "variable.other.object.property.js" 4030 } 4031 } 4032 }, 4033 { 4034 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)", 4035 "captures": { 4036 "1": { 4037 "name": "variable.other.constant.object.js" 4038 }, 4039 "2": { 4040 "name": "variable.other.object.js" 4041 } 4042 } 4043 } 4044 ] 4045 }, 4046 "type-annotation": { 4047 "patterns": [ 4048 { 4049 "name": "meta.type.annotation.js", 4050 "begin": "(:)(?=\\s*\\S)", 4051 "beginCaptures": { 4052 "1": { 4053 "name": "keyword.operator.type.annotation.js" 4054 } 4055 }, 4056 "end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", 4057 "patterns": [ 4058 { 4059 "include": "#type" 4060 } 4061 ] 4062 }, 4063 { 4064 "name": "meta.type.annotation.js", 4065 "begin": "(:)", 4066 "beginCaptures": { 4067 "1": { 4068 "name": "keyword.operator.type.annotation.js" 4069 } 4070 }, 4071 "end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))", 4072 "patterns": [ 4073 { 4074 "include": "#type" 4075 } 4076 ] 4077 } 4078 ] 4079 }, 4080 "parameter-type-annotation": { 4081 "patterns": [ 4082 { 4083 "name": "meta.type.annotation.js", 4084 "begin": "(:)", 4085 "beginCaptures": { 4086 "1": { 4087 "name": "keyword.operator.type.annotation.js" 4088 } 4089 }, 4090 "end": "(?=[,)])|(?==[^>])", 4091 "patterns": [ 4092 { 4093 "include": "#type" 4094 } 4095 ] 4096 } 4097 ] 4098 }, 4099 "return-type": { 4100 "patterns": [ 4101 { 4102 "name": "meta.return.type.js", 4103 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)", 4104 "beginCaptures": { 4105 "1": { 4106 "name": "keyword.operator.type.annotation.js" 4107 } 4108 }, 4109 "end": "(?<![:|&])(?=$|^|[{};,]|//)", 4110 "patterns": [ 4111 { 4112 "include": "#return-type-core" 4113 } 4114 ] 4115 }, 4116 { 4117 "name": "meta.return.type.js", 4118 "begin": "(?<=\\))\\s*(:)", 4119 "beginCaptures": { 4120 "1": { 4121 "name": "keyword.operator.type.annotation.js" 4122 } 4123 }, 4124 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", 4125 "patterns": [ 4126 { 4127 "include": "#return-type-core" 4128 } 4129 ] 4130 } 4131 ] 4132 }, 4133 "return-type-core": { 4134 "patterns": [ 4135 { 4136 "include": "#peacescript" 4137 }, 4138 { 4139 "include": "#comment" 4140 }, 4141 { 4142 "begin": "(?<=[:|&])(?=\\s*\\{)", 4143 "end": "(?<=\\})", 4144 "patterns": [ 4145 { 4146 "include": "#type-object" 4147 } 4148 ] 4149 }, 4150 { 4151 "include": "#type-predicate-operator" 4152 }, 4153 { 4154 "include": "#type" 4155 } 4156 ] 4157 }, 4158 "arrow-return-type": { 4159 "name": "meta.return.type.arrow.js", 4160 "begin": "(?<=\\))\\s*(:)", 4161 "beginCaptures": { 4162 "1": { 4163 "name": "keyword.operator.type.annotation.js" 4164 } 4165 }, 4166 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", 4167 "patterns": [ 4168 { 4169 "include": "#arrow-return-type-body" 4170 } 4171 ] 4172 }, 4173 "possibly-arrow-return-type": { 4174 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)", 4175 "beginCaptures": { 4176 "1": { 4177 "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js" 4178 } 4179 }, 4180 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))", 4181 "contentName": "meta.arrow.js meta.return.type.arrow.js", 4182 "patterns": [ 4183 { 4184 "include": "#arrow-return-type-body" 4185 } 4186 ] 4187 }, 4188 "arrow-return-type-body": { 4189 "patterns": [ 4190 { 4191 "begin": "(?<=[:])(?=\\s*\\{)", 4192 "end": "(?<=\\})", 4193 "patterns": [ 4194 { 4195 "include": "#type-object" 4196 } 4197 ] 4198 }, 4199 { 4200 "include": "#type-predicate-operator" 4201 }, 4202 { 4203 "include": "#type" 4204 } 4205 ] 4206 }, 4207 "type-parameters": { 4208 "name": "meta.type.parameters.js", 4209 "begin": "(<)", 4210 "beginCaptures": { 4211 "1": { 4212 "name": "punctuation.definition.typeparameters.begin.js" 4213 } 4214 }, 4215 "end": "(>)", 4216 "endCaptures": { 4217 "1": { 4218 "name": "punctuation.definition.typeparameters.end.js" 4219 } 4220 }, 4221 "patterns": [ 4222 { 4223 "include": "#peacescript" 4224 }, 4225 { 4226 "include": "#comment" 4227 }, 4228 { 4229 "name": "storage.modifier.js", 4230 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4231 }, 4232 { 4233 "include": "#type" 4234 }, 4235 { 4236 "include": "#punctuation-comma" 4237 }, 4238 { 4239 "name": "keyword.operator.assignment.js", 4240 "match": "(=)(?!>)" 4241 } 4242 ] 4243 }, 4244 "type-arguments": { 4245 "name": "meta.type.parameters.js", 4246 "begin": "\\<", 4247 "beginCaptures": { 4248 "0": { 4249 "name": "punctuation.definition.typeparameters.begin.js" 4250 } 4251 }, 4252 "end": "\\>", 4253 "endCaptures": { 4254 "0": { 4255 "name": "punctuation.definition.typeparameters.end.js" 4256 } 4257 }, 4258 "patterns": [ 4259 { 4260 "include": "#type-arguments-body" 4261 } 4262 ] 4263 }, 4264 "type-arguments-body": { 4265 "patterns": [ 4266 { 4267 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 4268 "captures": { 4269 "0": { 4270 "name": "keyword.operator.type.js" 4271 } 4272 } 4273 }, 4274 { 4275 "include": "#type" 4276 }, 4277 { 4278 "include": "#punctuation-comma" 4279 } 4280 ] 4281 }, 4282 "type": { 4283 "patterns": [ 4284 { 4285 "include": "#peacescript" 4286 }, 4287 { 4288 "include": "#comment" 4289 }, 4290 { 4291 "include": "#type-string" 4292 }, 4293 { 4294 "include": "#numeric-literal" 4295 }, 4296 { 4297 "include": "#type-primitive" 4298 }, 4299 { 4300 "include": "#type-builtin-literals" 4301 }, 4302 { 4303 "include": "#type-parameters" 4304 }, 4305 { 4306 "include": "#type-tuple" 4307 }, 4308 { 4309 "include": "#type-object" 4310 }, 4311 { 4312 "include": "#type-operators" 4313 }, 4314 { 4315 "include": "#type-conditional" 4316 }, 4317 { 4318 "include": "#type-fn-type-parameters" 4319 }, 4320 { 4321 "include": "#type-paren-or-function-parameters" 4322 }, 4323 { 4324 "include": "#type-function-return-type" 4325 }, 4326 { 4327 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*", 4328 "captures": { 4329 "1": { 4330 "name": "storage.modifier.js" 4331 } 4332 } 4333 }, 4334 { 4335 "include": "#type-name" 4336 } 4337 ] 4338 }, 4339 "type-primitive": { 4340 "name": "support.type.primitive.js", 4341 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4342 }, 4343 "type-builtin-literals": { 4344 "name": "support.type.builtin.js", 4345 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4346 }, 4347 "type-tuple": { 4348 "name": "meta.type.tuple.js", 4349 "begin": "\\[", 4350 "beginCaptures": { 4351 "0": { 4352 "name": "meta.brace.square.js" 4353 } 4354 }, 4355 "end": "\\]", 4356 "endCaptures": { 4357 "0": { 4358 "name": "meta.brace.square.js" 4359 } 4360 }, 4361 "patterns": [ 4362 { 4363 "name": "keyword.operator.rest.js", 4364 "match": "\\.\\.\\." 4365 }, 4366 { 4367 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)", 4368 "captures": { 4369 "1": { 4370 "name": "entity.name.label.js" 4371 }, 4372 "2": { 4373 "name": "keyword.operator.optional.js" 4374 }, 4375 "3": { 4376 "name": "punctuation.separator.label.js" 4377 } 4378 } 4379 }, 4380 { 4381 "include": "#type" 4382 }, 4383 { 4384 "include": "#punctuation-comma" 4385 } 4386 ] 4387 }, 4388 "type-object": { 4389 "name": "meta.object.type.js", 4390 "begin": "\\{", 4391 "beginCaptures": { 4392 "0": { 4393 "name": "punctuation.definition.block.js" 4394 } 4395 }, 4396 "end": "\\}", 4397 "endCaptures": { 4398 "0": { 4399 "name": "punctuation.definition.block.js" 4400 } 4401 }, 4402 "patterns": [ 4403 { 4404 "include": "#peacescript" 4405 }, 4406 { 4407 "include": "#comment" 4408 }, 4409 { 4410 "include": "#method-declaration" 4411 }, 4412 { 4413 "include": "#indexer-declaration" 4414 }, 4415 { 4416 "include": "#indexer-mapped-type-declaration" 4417 }, 4418 { 4419 "include": "#field-declaration" 4420 }, 4421 { 4422 "include": "#type-annotation" 4423 }, 4424 { 4425 "begin": "\\.\\.\\.", 4426 "beginCaptures": { 4427 "0": { 4428 "name": "keyword.operator.spread.js" 4429 } 4430 }, 4431 "end": "(?=\\}|;|,|$)|(?<=\\})", 4432 "patterns": [ 4433 { 4434 "include": "#type" 4435 } 4436 ] 4437 }, 4438 { 4439 "include": "#punctuation-comma" 4440 }, 4441 { 4442 "include": "#punctuation-semicolon" 4443 }, 4444 { 4445 "include": "#type" 4446 } 4447 ] 4448 }, 4449 "type-conditional": { 4450 "patterns": [ 4451 { 4452 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+", 4453 "beginCaptures": { 4454 "1": { 4455 "name": "storage.modifier.js" 4456 } 4457 }, 4458 "end": "(?<=:)", 4459 "patterns": [ 4460 { 4461 "begin": "\\?", 4462 "beginCaptures": { 4463 "0": { 4464 "name": "keyword.operator.ternary.js" 4465 } 4466 }, 4467 "end": ":", 4468 "endCaptures": { 4469 "0": { 4470 "name": "keyword.operator.ternary.js" 4471 } 4472 }, 4473 "patterns": [ 4474 { 4475 "include": "#type" 4476 } 4477 ] 4478 }, 4479 { 4480 "include": "#type" 4481 } 4482 ] 4483 } 4484 ] 4485 }, 4486 "type-paren-or-function-parameters": { 4487 "name": "meta.type.paren.cover.js", 4488 "begin": "\\(", 4489 "beginCaptures": { 4490 "0": { 4491 "name": "meta.brace.round.js" 4492 } 4493 }, 4494 "end": "\\)", 4495 "endCaptures": { 4496 "0": { 4497 "name": "meta.brace.round.js" 4498 } 4499 }, 4500 "patterns": [ 4501 { 4502 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|([\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))", 4503 "captures": { 4504 "1": { 4505 "name": "storage.modifier.js" 4506 }, 4507 "2": { 4508 "name": "keyword.operator.rest.js" 4509 }, 4510 "3": { 4511 "name": "entity.name.function.js variable.language.this.js" 4512 }, 4513 "4": { 4514 "name": "entity.name.function.js" 4515 }, 4516 "5": { 4517 "name": "keyword.operator.optional.js" 4518 } 4519 } 4520 }, 4521 { 4522 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)", 4523 "captures": { 4524 "1": { 4525 "name": "storage.modifier.js" 4526 }, 4527 "2": { 4528 "name": "keyword.operator.rest.js" 4529 }, 4530 "3": { 4531 "name": "variable.parameter.js variable.language.this.js" 4532 }, 4533 "4": { 4534 "name": "variable.parameter.js" 4535 }, 4536 "5": { 4537 "name": "keyword.operator.optional.js" 4538 } 4539 } 4540 }, 4541 { 4542 "include": "#type-annotation" 4543 }, 4544 { 4545 "name": "punctuation.separator.parameter.js", 4546 "match": "," 4547 }, 4548 { 4549 "include": "#type" 4550 } 4551 ] 4552 }, 4553 "type-fn-type-parameters": { 4554 "patterns": [ 4555 { 4556 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)", 4557 "beginCaptures": { 4558 "1": { 4559 "name": "meta.type.constructor.js storage.modifier.js" 4560 }, 4561 "2": { 4562 "name": "meta.type.constructor.js keyword.control.new.js" 4563 } 4564 }, 4565 "end": "(?<=>)", 4566 "patterns": [ 4567 { 4568 "include": "#peacescript" 4569 }, 4570 { 4571 "include": "#comment" 4572 }, 4573 { 4574 "include": "#type-parameters" 4575 } 4576 ] 4577 }, 4578 { 4579 "name": "meta.type.constructor.js", 4580 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()", 4581 "beginCaptures": { 4582 "1": { 4583 "name": "storage.modifier.js" 4584 }, 4585 "2": { 4586 "name": "keyword.control.new.js" 4587 } 4588 }, 4589 "end": "(?<=\\))", 4590 "patterns": [ 4591 { 4592 "include": "#function-parameters" 4593 } 4594 ] 4595 }, 4596 { 4597 "name": "meta.type.function.js", 4598 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)", 4599 "end": "(?<=\\))", 4600 "patterns": [ 4601 { 4602 "include": "#function-parameters" 4603 } 4604 ] 4605 } 4606 ] 4607 }, 4608 "type-function-return-type": { 4609 "patterns": [ 4610 { 4611 "name": "meta.type.function.return.js", 4612 "begin": "(=>)(?=\\s*\\S)", 4613 "beginCaptures": { 4614 "1": { 4615 "name": "storage.type.function.arrow.js" 4616 } 4617 }, 4618 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)", 4619 "patterns": [ 4620 { 4621 "include": "#type-function-return-type-core" 4622 } 4623 ] 4624 }, 4625 { 4626 "name": "meta.type.function.return.js", 4627 "begin": "=>", 4628 "beginCaptures": { 4629 "0": { 4630 "name": "storage.type.function.arrow.js" 4631 } 4632 }, 4633 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))", 4634 "patterns": [ 4635 { 4636 "include": "#type-function-return-type-core" 4637 } 4638 ] 4639 } 4640 ] 4641 }, 4642 "type-function-return-type-core": { 4643 "patterns": [ 4644 { 4645 "include": "#peacescript" 4646 }, 4647 { 4648 "include": "#comment" 4649 }, 4650 { 4651 "begin": "(?<==>)(?=\\s*\\{)", 4652 "end": "(?<=\\})", 4653 "patterns": [ 4654 { 4655 "include": "#type-object" 4656 } 4657 ] 4658 }, 4659 { 4660 "include": "#type-predicate-operator" 4661 }, 4662 { 4663 "include": "#type" 4664 } 4665 ] 4666 }, 4667 "type-operators": { 4668 "patterns": [ 4669 { 4670 "include": "#typeof-operator" 4671 }, 4672 { 4673 "include": "#type-infer" 4674 }, 4675 { 4676 "begin": "([&|])(?=\\s*\\{)", 4677 "beginCaptures": { 4678 "0": { 4679 "name": "keyword.operator.type.js" 4680 } 4681 }, 4682 "end": "(?<=\\})", 4683 "patterns": [ 4684 { 4685 "include": "#type-object" 4686 } 4687 ] 4688 }, 4689 { 4690 "begin": "[&|]", 4691 "beginCaptures": { 4692 "0": { 4693 "name": "keyword.operator.type.js" 4694 } 4695 }, 4696 "end": "(?=\\S)" 4697 }, 4698 { 4699 "name": "keyword.operator.expression.keyof.js", 4700 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4701 }, 4702 { 4703 "name": "keyword.operator.ternary.js", 4704 "match": "(\\?|\\:)" 4705 }, 4706 { 4707 "name": "keyword.operator.expression.import.js", 4708 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()" 4709 } 4710 ] 4711 }, 4712 "type-infer": { 4713 "patterns": [ 4714 { 4715 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?", 4716 "name": "meta.type.infer.js", 4717 "captures": { 4718 "1": { 4719 "name": "keyword.operator.expression.infer.js" 4720 }, 4721 "2": { 4722 "name": "entity.name.type.js" 4723 }, 4724 "3": { 4725 "name": "keyword.operator.expression.extends.js" 4726 } 4727 } 4728 } 4729 ] 4730 }, 4731 "type-predicate-operator": { 4732 "patterns": [ 4733 { 4734 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 4735 "captures": { 4736 "1": { 4737 "name": "keyword.operator.type.asserts.js" 4738 }, 4739 "2": { 4740 "name": "variable.parameter.js variable.language.this.js" 4741 }, 4742 "3": { 4743 "name": "variable.parameter.js" 4744 }, 4745 "4": { 4746 "name": "keyword.operator.expression.is.js" 4747 } 4748 } 4749 }, 4750 { 4751 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", 4752 "captures": { 4753 "1": { 4754 "name": "keyword.operator.type.asserts.js" 4755 }, 4756 "2": { 4757 "name": "variable.parameter.js variable.language.this.js" 4758 }, 4759 "3": { 4760 "name": "variable.parameter.js" 4761 } 4762 } 4763 }, 4764 { 4765 "name": "keyword.operator.type.asserts.js", 4766 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4767 }, 4768 { 4769 "name": "keyword.operator.expression.is.js", 4770 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))" 4771 } 4772 ] 4773 }, 4774 "type-name": { 4775 "patterns": [ 4776 { 4777 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)", 4778 "captures": { 4779 "1": { 4780 "name": "entity.name.type.module.js" 4781 }, 4782 "2": { 4783 "name": "punctuation.accessor.js" 4784 }, 4785 "3": { 4786 "name": "punctuation.accessor.optional.js" 4787 }, 4788 "4": { 4789 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js" 4790 } 4791 }, 4792 "end": "(>)", 4793 "endCaptures": { 4794 "1": { 4795 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js" 4796 } 4797 }, 4798 "contentName": "meta.type.parameters.js", 4799 "patterns": [ 4800 { 4801 "include": "#type-arguments-body" 4802 } 4803 ] 4804 }, 4805 { 4806 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)", 4807 "beginCaptures": { 4808 "1": { 4809 "name": "entity.name.type.js" 4810 }, 4811 "2": { 4812 "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js" 4813 } 4814 }, 4815 "end": "(>)", 4816 "endCaptures": { 4817 "1": { 4818 "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js" 4819 } 4820 }, 4821 "contentName": "meta.type.parameters.js", 4822 "patterns": [ 4823 { 4824 "include": "#type-arguments-body" 4825 } 4826 ] 4827 }, 4828 { 4829 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", 4830 "captures": { 4831 "1": { 4832 "name": "entity.name.type.module.js" 4833 }, 4834 "2": { 4835 "name": "punctuation.accessor.js" 4836 }, 4837 "3": { 4838 "name": "punctuation.accessor.optional.js" 4839 } 4840 } 4841 }, 4842 { 4843 "name": "entity.name.type.js", 4844 "match": "[_$[:alpha:]][_$[:alnum:]]*" 4845 } 4846 ] 4847 }, 4848 "punctuation-comma": { 4849 "name": "punctuation.separator.comma.js", 4850 "match": "," 4851 }, 4852 "punctuation-semicolon": { 4853 "name": "punctuation.terminator.statement.js", 4854 "match": ";" 4855 }, 4856 "punctuation-accessor": { 4857 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))", 4858 "captures": { 4859 "1": { 4860 "name": "punctuation.accessor.js" 4861 }, 4862 "2": { 4863 "name": "punctuation.accessor.optional.js" 4864 } 4865 } 4866 }, 4867 "string": { 4868 "patterns": [ 4869 { 4870 "include": "#qstring-single" 4871 }, 4872 { 4873 "include": "#qstring-double" 4874 }, 4875 { 4876 "include": "#template" 4877 } 4878 ] 4879 }, 4880 "qstring-double": { 4881 "name": "string.quoted.double.js", 4882 "begin": "\"", 4883 "beginCaptures": { 4884 "0": { 4885 "name": "punctuation.definition.string.begin.js" 4886 } 4887 }, 4888 "end": "(\")|((?:[^\\\\\\n])$)", 4889 "endCaptures": { 4890 "1": { 4891 "name": "punctuation.definition.string.end.js" 4892 }, 4893 "2": { 4894 "name": "invalid.illegal.newline.js" 4895 } 4896 }, 4897 "patterns": [ 4898 { 4899 "include": "#string-character-escape" 4900 } 4901 ] 4902 }, 4903 "qstring-single": { 4904 "name": "string.quoted.single.js", 4905 "begin": "'", 4906 "beginCaptures": { 4907 "0": { 4908 "name": "punctuation.definition.string.begin.js" 4909 } 4910 }, 4911 "end": "(\\')|((?:[^\\\\\\n])$)", 4912 "endCaptures": { 4913 "1": { 4914 "name": "punctuation.definition.string.end.js" 4915 }, 4916 "2": { 4917 "name": "invalid.illegal.newline.js" 4918 } 4919 }, 4920 "patterns": [ 4921 { 4922 "include": "#string-character-escape" 4923 } 4924 ] 4925 }, 4926 "string-character-escape": { 4927 "name": "constant.character.escape.js", 4928 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" 4929 }, 4930 "template": { 4931 "patterns": [ 4932 { 4933 "include": "#template-call" 4934 }, 4935 { 4936 "contentName": "string.template.js", 4937 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", 4938 "beginCaptures": { 4939 "1": { 4940 "name": "entity.name.function.tagged-template.js" 4941 }, 4942 "2": { 4943 "name": "string.template.js punctuation.definition.string.template.begin.js" 4944 } 4945 }, 4946 "end": "`", 4947 "endCaptures": { 4948 "0": { 4949 "name": "string.template.js punctuation.definition.string.template.end.js" 4950 } 4951 }, 4952 "patterns": [ 4953 { 4954 "include": "#template-substitution-element" 4955 }, 4956 { 4957 "include": "#string-character-escape" 4958 } 4959 ] 4960 } 4961 ] 4962 }, 4963 "template-call": { 4964 "patterns": [ 4965 { 4966 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", 4967 "end": "(?=`)", 4968 "patterns": [ 4969 { 4970 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))", 4971 "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)", 4972 "patterns": [ 4973 { 4974 "include": "#support-function-call-identifiers" 4975 }, 4976 { 4977 "name": "entity.name.function.tagged-template.js", 4978 "match": "([_$[:alpha:]][_$[:alnum:]]*)" 4979 } 4980 ] 4981 }, 4982 { 4983 "include": "#type-arguments" 4984 } 4985 ] 4986 }, 4987 { 4988 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)", 4989 "beginCaptures": { 4990 "1": { 4991 "name": "entity.name.function.tagged-template.js" 4992 } 4993 }, 4994 "end": "(?=`)", 4995 "patterns": [ 4996 { 4997 "include": "#type-arguments" 4998 } 4999 ] 5000 } 5001 ] 5002 }, 5003 "template-substitution-element": { 5004 "name": "meta.template.expression.js", 5005 "begin": "\\$\\{", 5006 "beginCaptures": { 5007 "0": { 5008 "name": "punctuation.definition.template-expression.begin.js" 5009 } 5010 }, 5011 "end": "\\}", 5012 "endCaptures": { 5013 "0": { 5014 "name": "punctuation.definition.template-expression.end.js" 5015 } 5016 }, 5017 "patterns": [ 5018 { 5019 "include": "#expression" 5020 } 5021 ], 5022 "contentName": "meta.embedded.line.js" 5023 }, 5024 "type-string": { 5025 "patterns": [ 5026 { 5027 "include": "#qstring-single" 5028 }, 5029 { 5030 "include": "#qstring-double" 5031 }, 5032 { 5033 "include": "#template-type" 5034 } 5035 ] 5036 }, 5037 "template-type": { 5038 "patterns": [ 5039 { 5040 "include": "#template-call" 5041 }, 5042 { 5043 "contentName": "string.template.js", 5044 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)", 5045 "beginCaptures": { 5046 "1": { 5047 "name": "entity.name.function.tagged-template.js" 5048 }, 5049 "2": { 5050 "name": "string.template.js punctuation.definition.string.template.begin.js" 5051 } 5052 }, 5053 "end": "`", 5054 "endCaptures": { 5055 "0": { 5056 "name": "string.template.js punctuation.definition.string.template.end.js" 5057 } 5058 }, 5059 "patterns": [ 5060 { 5061 "include": "#template-type-substitution-element" 5062 }, 5063 { 5064 "include": "#string-character-escape" 5065 } 5066 ] 5067 } 5068 ] 5069 }, 5070 "template-type-substitution-element": { 5071 "name": "meta.template.expression.js", 5072 "begin": "\\$\\{", 5073 "beginCaptures": { 5074 "0": { 5075 "name": "punctuation.definition.template-expression.begin.js" 5076 } 5077 }, 5078 "end": "\\}", 5079 "endCaptures": { 5080 "0": { 5081 "name": "punctuation.definition.template-expression.end.js" 5082 } 5083 }, 5084 "patterns": [ 5085 { 5086 "include": "#type" 5087 } 5088 ], 5089 "contentName": "meta.embedded.line.js" 5090 }, 5091 "regex": { 5092 "patterns": [ 5093 { 5094 "name": "string.regexp.js", 5095 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", 5096 "beginCaptures": { 5097 "1": { 5098 "name": "punctuation.definition.string.begin.js" 5099 } 5100 }, 5101 "end": "(/)([dgimsuy]*)", 5102 "endCaptures": { 5103 "1": { 5104 "name": "punctuation.definition.string.end.js" 5105 }, 5106 "2": { 5107 "name": "keyword.other.js" 5108 } 5109 }, 5110 "patterns": [ 5111 { 5112 "include": "#regexp" 5113 } 5114 ] 5115 }, 5116 { 5117 "name": "string.regexp.js", 5118 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))", 5119 "beginCaptures": { 5120 "0": { 5121 "name": "punctuation.definition.string.begin.js" 5122 } 5123 }, 5124 "end": "(/)([dgimsuy]*)", 5125 "endCaptures": { 5126 "1": { 5127 "name": "punctuation.definition.string.end.js" 5128 }, 5129 "2": { 5130 "name": "keyword.other.js" 5131 } 5132 }, 5133 "patterns": [ 5134 { 5135 "include": "#regexp" 5136 } 5137 ] 5138 } 5139 ] 5140 }, 5141 "regexp": { 5142 "patterns": [ 5143 { 5144 "name": "keyword.control.anchor.regexp", 5145 "match": "\\\\[bB]|\\^|\\$" 5146 }, 5147 { 5148 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>", 5149 "captures": { 5150 "0": { 5151 "name": "keyword.other.back-reference.regexp" 5152 }, 5153 "1": { 5154 "name": "variable.other.regexp" 5155 } 5156 } 5157 }, 5158 { 5159 "name": "keyword.operator.quantifier.regexp", 5160 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" 5161 }, 5162 { 5163 "name": "keyword.operator.or.regexp", 5164 "match": "\\|" 5165 }, 5166 { 5167 "name": "meta.group.assertion.regexp", 5168 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))", 5169 "beginCaptures": { 5170 "1": { 5171 "name": "punctuation.definition.group.regexp" 5172 }, 5173 "2": { 5174 "name": "punctuation.definition.group.assertion.regexp" 5175 }, 5176 "3": { 5177 "name": "meta.assertion.look-ahead.regexp" 5178 }, 5179 "4": { 5180 "name": "meta.assertion.negative-look-ahead.regexp" 5181 }, 5182 "5": { 5183 "name": "meta.assertion.look-behind.regexp" 5184 }, 5185 "6": { 5186 "name": "meta.assertion.negative-look-behind.regexp" 5187 } 5188 }, 5189 "end": "(\\))", 5190 "endCaptures": { 5191 "1": { 5192 "name": "punctuation.definition.group.regexp" 5193 } 5194 }, 5195 "patterns": [ 5196 { 5197 "include": "#regexp" 5198 } 5199 ] 5200 }, 5201 { 5202 "name": "meta.group.regexp", 5203 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?", 5204 "beginCaptures": { 5205 "0": { 5206 "name": "punctuation.definition.group.regexp" 5207 }, 5208 "1": { 5209 "name": "punctuation.definition.group.no-capture.regexp" 5210 }, 5211 "2": { 5212 "name": "variable.other.regexp" 5213 } 5214 }, 5215 "end": "\\)", 5216 "endCaptures": { 5217 "0": { 5218 "name": "punctuation.definition.group.regexp" 5219 } 5220 }, 5221 "patterns": [ 5222 { 5223 "include": "#regexp" 5224 } 5225 ] 5226 }, 5227 { 5228 "name": "constant.other.character-class.set.regexp", 5229 "begin": "(\\[)(\\^)?", 5230 "beginCaptures": { 5231 "1": { 5232 "name": "punctuation.definition.character-class.regexp" 5233 }, 5234 "2": { 5235 "name": "keyword.operator.negation.regexp" 5236 } 5237 }, 5238 "end": "(\\])", 5239 "endCaptures": { 5240 "1": { 5241 "name": "punctuation.definition.character-class.regexp" 5242 } 5243 }, 5244 "patterns": [ 5245 { 5246 "name": "constant.other.character-class.range.regexp", 5247 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", 5248 "captures": { 5249 "1": { 5250 "name": "constant.character.numeric.regexp" 5251 }, 5252 "2": { 5253 "name": "constant.character.control.regexp" 5254 }, 5255 "3": { 5256 "name": "constant.character.escape.backslash.regexp" 5257 }, 5258 "4": { 5259 "name": "constant.character.numeric.regexp" 5260 }, 5261 "5": { 5262 "name": "constant.character.control.regexp" 5263 }, 5264 "6": { 5265 "name": "constant.character.escape.backslash.regexp" 5266 } 5267 } 5268 }, 5269 { 5270 "include": "#regex-character-class" 5271 } 5272 ] 5273 }, 5274 { 5275 "include": "#regex-character-class" 5276 } 5277 ] 5278 }, 5279 "regex-character-class": { 5280 "patterns": [ 5281 { 5282 "name": "constant.other.character-class.regexp", 5283 "match": "\\\\[wWsSdDtrnvf]|\\." 5284 }, 5285 { 5286 "name": "constant.character.numeric.regexp", 5287 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" 5288 }, 5289 { 5290 "name": "constant.character.control.regexp", 5291 "match": "\\\\c[A-Z]" 5292 }, 5293 { 5294 "name": "constant.character.escape.backslash.regexp", 5295 "match": "\\\\." 5296 } 5297 ] 5298 }, 5299 "comment": { 5300 "patterns": [ 5301 { 5302 "name": "comment.block.documentation.js", 5303 "begin": "/\\*\\*(?!/)", 5304 "beginCaptures": { 5305 "0": { 5306 "name": "punctuation.definition.comment.js" 5307 } 5308 }, 5309 "end": "\\*/", 5310 "endCaptures": { 5311 "0": { 5312 "name": "punctuation.definition.comment.js" 5313 } 5314 }, 5315 "patterns": [ 5316 { 5317 "include": "#docblock" 5318 } 5319 ] 5320 }, 5321 { 5322 "name": "comment.block.js", 5323 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", 5324 "beginCaptures": { 5325 "1": { 5326 "name": "punctuation.definition.comment.js" 5327 }, 5328 "2": { 5329 "name": "storage.type.internaldeclaration.js" 5330 }, 5331 "3": { 5332 "name": "punctuation.decorator.internaldeclaration.js" 5333 } 5334 }, 5335 "end": "\\*/", 5336 "endCaptures": { 5337 "0": { 5338 "name": "punctuation.definition.comment.js" 5339 } 5340 } 5341 }, 5342 { 5343 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", 5344 "beginCaptures": { 5345 "1": { 5346 "name": "punctuation.whitespace.comment.leading.js" 5347 }, 5348 "2": { 5349 "name": "comment.line.double-slash.js" 5350 }, 5351 "3": { 5352 "name": "punctuation.definition.comment.js" 5353 }, 5354 "4": { 5355 "name": "storage.type.internaldeclaration.js" 5356 }, 5357 "5": { 5358 "name": "punctuation.decorator.internaldeclaration.js" 5359 } 5360 }, 5361 "end": "(?=$)", 5362 "contentName": "comment.line.double-slash.js" 5363 } 5364 ] 5365 }, 5366 "single-line-comment-consuming-line-ending": { 5367 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)", 5368 "beginCaptures": { 5369 "1": { 5370 "name": "punctuation.whitespace.comment.leading.js" 5371 }, 5372 "2": { 5373 "name": "comment.line.double-slash.js" 5374 }, 5375 "3": { 5376 "name": "punctuation.definition.comment.js" 5377 }, 5378 "4": { 5379 "name": "storage.type.internaldeclaration.js" 5380 }, 5381 "5": { 5382 "name": "punctuation.decorator.internaldeclaration.js" 5383 } 5384 }, 5385 "end": "(?=^)", 5386 "contentName": "comment.line.double-slash.js" 5387 }, 5388 "directives": { 5389 "name": "comment.line.triple-slash.directive.js", 5390 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)", 5391 "beginCaptures": { 5392 "1": { 5393 "name": "punctuation.definition.comment.js" 5394 } 5395 }, 5396 "end": "(?=$)", 5397 "patterns": [ 5398 { 5399 "include": "#peacescript" 5400 }, 5401 { 5402 "name": "meta.tag.js", 5403 "begin": "(<)(reference|amd-dependency|amd-module)", 5404 "beginCaptures": { 5405 "1": { 5406 "name": "punctuation.definition.tag.directive.js" 5407 }, 5408 "2": { 5409 "name": "entity.name.tag.directive.js" 5410 } 5411 }, 5412 "end": "/>", 5413 "endCaptures": { 5414 "0": { 5415 "name": "punctuation.definition.tag.directive.js" 5416 } 5417 }, 5418 "patterns": [ 5419 { 5420 "name": "entity.other.attribute-name.directive.js", 5421 "match": "path|types|no-default-lib|lib|name|resolution-mode" 5422 }, 5423 { 5424 "name": "keyword.operator.assignment.js", 5425 "match": "=" 5426 }, 5427 { 5428 "include": "#string" 5429 } 5430 ] 5431 } 5432 ] 5433 }, 5434 "docblock": { 5435 "patterns": [ 5436 { 5437 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b", 5438 "captures": { 5439 "1": { 5440 "name": "storage.type.class.jsdoc" 5441 }, 5442 "2": { 5443 "name": "punctuation.definition.block.tag.jsdoc" 5444 }, 5445 "3": { 5446 "name": "constant.language.access-type.jsdoc" 5447 } 5448 } 5449 }, 5450 { 5451 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?", 5452 "captures": { 5453 "1": { 5454 "name": "storage.type.class.jsdoc" 5455 }, 5456 "2": { 5457 "name": "punctuation.definition.block.tag.jsdoc" 5458 }, 5459 "3": { 5460 "name": "entity.name.type.instance.jsdoc" 5461 }, 5462 "4": { 5463 "name": "punctuation.definition.bracket.angle.begin.jsdoc" 5464 }, 5465 "5": { 5466 "name": "constant.other.email.link.underline.jsdoc" 5467 }, 5468 "6": { 5469 "name": "punctuation.definition.bracket.angle.end.jsdoc" 5470 } 5471 } 5472 }, 5473 { 5474 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>", 5475 "captures": { 5476 "1": { 5477 "name": "storage.type.class.jsdoc" 5478 }, 5479 "2": { 5480 "name": "punctuation.definition.block.tag.jsdoc" 5481 }, 5482 "3": { 5483 "name": "entity.name.type.instance.jsdoc" 5484 }, 5485 "4": { 5486 "name": "keyword.operator.control.jsdoc" 5487 }, 5488 "5": { 5489 "name": "entity.name.type.instance.jsdoc" 5490 } 5491 } 5492 }, 5493 { 5494 "name": "meta.example.jsdoc", 5495 "begin": "((@)example)\\s+", 5496 "end": "(?=@|\\*/)", 5497 "beginCaptures": { 5498 "1": { 5499 "name": "storage.type.class.jsdoc" 5500 }, 5501 "2": { 5502 "name": "punctuation.definition.block.tag.jsdoc" 5503 } 5504 }, 5505 "patterns": [ 5506 { 5507 "match": "^\\s\\*\\s+" 5508 }, 5509 { 5510 "contentName": "constant.other.description.jsdoc", 5511 "begin": "\\G(<)caption(>)", 5512 "beginCaptures": { 5513 "0": { 5514 "name": "entity.name.tag.inline.jsdoc" 5515 }, 5516 "1": { 5517 "name": "punctuation.definition.bracket.angle.begin.jsdoc" 5518 }, 5519 "2": { 5520 "name": "punctuation.definition.bracket.angle.end.jsdoc" 5521 } 5522 }, 5523 "end": "(</)caption(>)|(?=\\*/)", 5524 "endCaptures": { 5525 "0": { 5526 "name": "entity.name.tag.inline.jsdoc" 5527 }, 5528 "1": { 5529 "name": "punctuation.definition.bracket.angle.begin.jsdoc" 5530 }, 5531 "2": { 5532 "name": "punctuation.definition.bracket.angle.end.jsdoc" 5533 } 5534 } 5535 }, 5536 { 5537 "match": "[^\\s@*](?:[^*]|\\*[^/])*", 5538 "captures": { 5539 "0": { 5540 "name": "source.embedded.js" 5541 } 5542 } 5543 } 5544 ] 5545 }, 5546 { 5547 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b", 5548 "captures": { 5549 "1": { 5550 "name": "storage.type.class.jsdoc" 5551 }, 5552 "2": { 5553 "name": "punctuation.definition.block.tag.jsdoc" 5554 }, 5555 "3": { 5556 "name": "constant.language.symbol-type.jsdoc" 5557 } 5558 } 5559 }, 5560 { 5561 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)", 5562 "captures": { 5563 "1": { 5564 "name": "storage.type.class.jsdoc" 5565 }, 5566 "2": { 5567 "name": "punctuation.definition.block.tag.jsdoc" 5568 }, 5569 "3": { 5570 "name": "variable.other.link.underline.jsdoc" 5571 }, 5572 "4": { 5573 "name": "entity.name.type.instance.jsdoc" 5574 } 5575 } 5576 }, 5577 { 5578 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)", 5579 "captures": { 5580 "1": { 5581 "name": "storage.type.class.jsdoc" 5582 }, 5583 "2": { 5584 "name": "punctuation.definition.block.tag.jsdoc" 5585 }, 5586 "3": { 5587 "name": "variable.other.jsdoc" 5588 } 5589 } 5590 }, 5591 { 5592 "begin": "(?x)((@)template)\\s+(?={)", 5593 "beginCaptures": { 5594 "1": { 5595 "name": "storage.type.class.jsdoc" 5596 }, 5597 "2": { 5598 "name": "punctuation.definition.block.tag.jsdoc" 5599 } 5600 }, 5601 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", 5602 "patterns": [ 5603 { 5604 "include": "#jsdoctype" 5605 }, 5606 { 5607 "name": "variable.other.jsdoc", 5608 "match": "([A-Za-z_$][\\w$.\\[\\]]*)" 5609 } 5610 ] 5611 }, 5612 { 5613 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)", 5614 "captures": { 5615 "1": { 5616 "name": "storage.type.class.jsdoc" 5617 }, 5618 "2": { 5619 "name": "punctuation.definition.block.tag.jsdoc" 5620 }, 5621 "3": { 5622 "name": "variable.other.jsdoc" 5623 } 5624 } 5625 }, 5626 { 5627 "begin": "((@)typedef)\\s+(?={)", 5628 "beginCaptures": { 5629 "1": { 5630 "name": "storage.type.class.jsdoc" 5631 }, 5632 "2": { 5633 "name": "punctuation.definition.block.tag.jsdoc" 5634 } 5635 }, 5636 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", 5637 "patterns": [ 5638 { 5639 "include": "#jsdoctype" 5640 }, 5641 { 5642 "name": "entity.name.type.instance.jsdoc", 5643 "match": "(?:[^@\\s*/]|\\*[^/])+" 5644 } 5645 ] 5646 }, 5647 { 5648 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)", 5649 "beginCaptures": { 5650 "1": { 5651 "name": "storage.type.class.jsdoc" 5652 }, 5653 "2": { 5654 "name": "punctuation.definition.block.tag.jsdoc" 5655 } 5656 }, 5657 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", 5658 "patterns": [ 5659 { 5660 "include": "#jsdoctype" 5661 }, 5662 { 5663 "name": "variable.other.jsdoc", 5664 "match": "([A-Za-z_$][\\w$.\\[\\]]*)" 5665 }, 5666 { 5667 "name": "variable.other.jsdoc", 5668 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))", 5669 "captures": { 5670 "1": { 5671 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc" 5672 }, 5673 "2": { 5674 "name": "keyword.operator.assignment.jsdoc" 5675 }, 5676 "3": { 5677 "name": "source.embedded.js" 5678 }, 5679 "4": { 5680 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc" 5681 }, 5682 "5": { 5683 "name": "invalid.illegal.syntax.jsdoc" 5684 } 5685 } 5686 } 5687 ] 5688 }, 5689 { 5690 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)", 5691 "beginCaptures": { 5692 "1": { 5693 "name": "storage.type.class.jsdoc" 5694 }, 5695 "2": { 5696 "name": "punctuation.definition.block.tag.jsdoc" 5697 } 5698 }, 5699 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", 5700 "patterns": [ 5701 { 5702 "include": "#jsdoctype" 5703 } 5704 ] 5705 }, 5706 { 5707 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)", 5708 "captures": { 5709 "1": { 5710 "name": "storage.type.class.jsdoc" 5711 }, 5712 "2": { 5713 "name": "punctuation.definition.block.tag.jsdoc" 5714 }, 5715 "3": { 5716 "name": "entity.name.type.instance.jsdoc" 5717 } 5718 } 5719 }, 5720 { 5721 "contentName": "variable.other.jsdoc", 5722 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))", 5723 "beginCaptures": { 5724 "1": { 5725 "name": "storage.type.class.jsdoc" 5726 }, 5727 "2": { 5728 "name": "punctuation.definition.block.tag.jsdoc" 5729 }, 5730 "3": { 5731 "name": "variable.other.jsdoc" 5732 }, 5733 "4": { 5734 "name": "punctuation.definition.string.begin.jsdoc" 5735 } 5736 }, 5737 "end": "(\\3)|(?=$|\\*/)", 5738 "endCaptures": { 5739 "0": { 5740 "name": "variable.other.jsdoc" 5741 }, 5742 "1": { 5743 "name": "punctuation.definition.string.end.jsdoc" 5744 } 5745 } 5746 }, 5747 { 5748 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)", 5749 "captures": { 5750 "1": { 5751 "name": "storage.type.class.jsdoc" 5752 }, 5753 "2": { 5754 "name": "punctuation.definition.block.tag.jsdoc" 5755 }, 5756 "3": { 5757 "name": "variable.other.jsdoc" 5758 } 5759 } 5760 }, 5761 { 5762 "name": "storage.type.class.jsdoc", 5763 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", 5764 "captures": { 5765 "1": { 5766 "name": "punctuation.definition.block.tag.jsdoc" 5767 } 5768 } 5769 }, 5770 { 5771 "include": "#inline-tags" 5772 }, 5773 { 5774 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)", 5775 "captures": { 5776 "1": { 5777 "name": "storage.type.class.jsdoc" 5778 }, 5779 "2": { 5780 "name": "punctuation.definition.block.tag.jsdoc" 5781 } 5782 } 5783 } 5784 ] 5785 }, 5786 "brackets": { 5787 "patterns": [ 5788 { 5789 "begin": "{", 5790 "end": "}|(?=\\*/)", 5791 "patterns": [ 5792 { 5793 "include": "#brackets" 5794 } 5795 ] 5796 }, 5797 { 5798 "begin": "\\[", 5799 "end": "\\]|(?=\\*/)", 5800 "patterns": [ 5801 { 5802 "include": "#brackets" 5803 } 5804 ] 5805 } 5806 ] 5807 }, 5808 "inline-tags": { 5809 "patterns": [ 5810 { 5811 "name": "constant.other.description.jsdoc", 5812 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))", 5813 "captures": { 5814 "1": { 5815 "name": "punctuation.definition.bracket.square.begin.jsdoc" 5816 }, 5817 "2": { 5818 "name": "punctuation.definition.bracket.square.end.jsdoc" 5819 } 5820 } 5821 }, 5822 { 5823 "name": "entity.name.type.instance.jsdoc", 5824 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*", 5825 "beginCaptures": { 5826 "1": { 5827 "name": "punctuation.definition.bracket.curly.begin.jsdoc" 5828 }, 5829 "2": { 5830 "name": "storage.type.class.jsdoc" 5831 }, 5832 "3": { 5833 "name": "punctuation.definition.inline.tag.jsdoc" 5834 } 5835 }, 5836 "end": "}|(?=\\*/)", 5837 "endCaptures": { 5838 "0": { 5839 "name": "punctuation.definition.bracket.curly.end.jsdoc" 5840 } 5841 }, 5842 "patterns": [ 5843 { 5844 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?", 5845 "captures": { 5846 "1": { 5847 "name": "variable.other.link.underline.jsdoc" 5848 }, 5849 "2": { 5850 "name": "punctuation.separator.pipe.jsdoc" 5851 } 5852 } 5853 }, 5854 { 5855 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?", 5856 "captures": { 5857 "1": { 5858 "name": "variable.other.description.jsdoc" 5859 }, 5860 "2": { 5861 "name": "punctuation.separator.pipe.jsdoc" 5862 } 5863 } 5864 } 5865 ] 5866 } 5867 ] 5868 }, 5869 "jsdoctype": { 5870 "patterns": [ 5871 { 5872 "contentName": "entity.name.type.instance.jsdoc", 5873 "begin": "\\G({)", 5874 "beginCaptures": { 5875 "0": { 5876 "name": "entity.name.type.instance.jsdoc" 5877 }, 5878 "1": { 5879 "name": "punctuation.definition.bracket.curly.begin.jsdoc" 5880 } 5881 }, 5882 "end": "((}))\\s*|(?=\\*/)", 5883 "endCaptures": { 5884 "1": { 5885 "name": "entity.name.type.instance.jsdoc" 5886 }, 5887 "2": { 5888 "name": "punctuation.definition.bracket.curly.end.jsdoc" 5889 } 5890 }, 5891 "patterns": [ 5892 { 5893 "include": "#brackets" 5894 } 5895 ] 5896 } 5897 ] 5898 }, 5899 "jsx": { 5900 "patterns": [ 5901 { 5902 "include": "#jsx-tag-without-attributes-in-expression" 5903 }, 5904 { 5905 "include": "#jsx-tag-in-expression" 5906 } 5907 ] 5908 }, 5909 "jsx-tag-without-attributes-in-expression": { 5910 "begin": "(?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", 5911 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", 5912 "patterns": [ 5913 { 5914 "include": "#jsx-tag-without-attributes" 5915 } 5916 ] 5917 }, 5918 "jsx-tag-without-attributes": { 5919 "name": "meta.tag.without-attributes.js", 5920 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", 5921 "end": "(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>)", 5922 "beginCaptures": { 5923 "1": { 5924 "name": "punctuation.definition.tag.begin.js" 5925 }, 5926 "2": { 5927 "name": "entity.name.tag.namespace.js" 5928 }, 5929 "3": { 5930 "name": "punctuation.separator.namespace.js" 5931 }, 5932 "4": { 5933 "name": "entity.name.tag.js" 5934 }, 5935 "5": { 5936 "name": "support.class.component.js" 5937 }, 5938 "6": { 5939 "name": "punctuation.definition.tag.end.js" 5940 } 5941 }, 5942 "endCaptures": { 5943 "1": { 5944 "name": "punctuation.definition.tag.begin.js" 5945 }, 5946 "2": { 5947 "name": "entity.name.tag.namespace.js" 5948 }, 5949 "3": { 5950 "name": "punctuation.separator.namespace.js" 5951 }, 5952 "4": { 5953 "name": "entity.name.tag.js" 5954 }, 5955 "5": { 5956 "name": "support.class.component.js" 5957 }, 5958 "6": { 5959 "name": "punctuation.definition.tag.end.js" 5960 } 5961 }, 5962 "contentName": "meta.jsx.children.js", 5963 "patterns": [ 5964 { 5965 "include": "#jsx-children" 5966 } 5967 ] 5968 }, 5969 "jsx-tag-in-expression": { 5970 "begin": "(?x)\n (?<!\\+\\+|--)(?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\*\\/|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^yield|[^\\._$[:alnum:]]yield|^)\\s*\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", 5971 "end": "(?!(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", 5972 "patterns": [ 5973 { 5974 "include": "#jsx-tag" 5975 } 5976 ] 5977 }, 5978 "jsx-tag": { 5979 "name": "meta.tag.js", 5980 "begin": "(?=(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>))", 5981 "end": "(/>)|(?:(</)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))?\\s*(>))", 5982 "endCaptures": { 5983 "1": { 5984 "name": "punctuation.definition.tag.end.js" 5985 }, 5986 "2": { 5987 "name": "punctuation.definition.tag.begin.js" 5988 }, 5989 "3": { 5990 "name": "entity.name.tag.namespace.js" 5991 }, 5992 "4": { 5993 "name": "punctuation.separator.namespace.js" 5994 }, 5995 "5": { 5996 "name": "entity.name.tag.js" 5997 }, 5998 "6": { 5999 "name": "support.class.component.js" 6000 }, 6001 "7": { 6002 "name": "punctuation.definition.tag.end.js" 6003 } 6004 }, 6005 "patterns": [ 6006 { 6007 "begin": "(<)\\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\\.|-))(?=((<\\s*)|(\\s+))(?!\\?)|\\/?>)", 6008 "beginCaptures": { 6009 "1": { 6010 "name": "punctuation.definition.tag.begin.js" 6011 }, 6012 "2": { 6013 "name": "entity.name.tag.namespace.js" 6014 }, 6015 "3": { 6016 "name": "punctuation.separator.namespace.js" 6017 }, 6018 "4": { 6019 "name": "entity.name.tag.js" 6020 }, 6021 "5": { 6022 "name": "support.class.component.js" 6023 } 6024 }, 6025 "end": "(?=[/]?>)", 6026 "patterns": [ 6027 { 6028 "include": "#peacescript" 6029 }, 6030 { 6031 "include": "#comment" 6032 }, 6033 { 6034 "include": "#type-arguments" 6035 }, 6036 { 6037 "include": "#jsx-tag-attributes" 6038 } 6039 ] 6040 }, 6041 { 6042 "begin": "(>)", 6043 "beginCaptures": { 6044 "1": { 6045 "name": "punctuation.definition.tag.end.js" 6046 } 6047 }, 6048 "end": "(?=</)", 6049 "contentName": "meta.jsx.children.js", 6050 "patterns": [ 6051 { 6052 "include": "#jsx-children" 6053 } 6054 ] 6055 } 6056 ] 6057 }, 6058 "jsx-children": { 6059 "patterns": [ 6060 { 6061 "include": "#jsx-tag-without-attributes" 6062 }, 6063 { 6064 "include": "#jsx-tag" 6065 }, 6066 { 6067 "include": "#jsx-evaluated-code" 6068 }, 6069 { 6070 "include": "#jsx-entities" 6071 } 6072 ] 6073 }, 6074 "jsx-evaluated-code": { 6075 "contentName": "meta.embedded.expression.js", 6076 "begin": "\\{", 6077 "end": "\\}", 6078 "beginCaptures": { 6079 "0": { 6080 "name": "punctuation.section.embedded.begin.js" 6081 } 6082 }, 6083 "endCaptures": { 6084 "0": { 6085 "name": "punctuation.section.embedded.end.js" 6086 } 6087 }, 6088 "patterns": [ 6089 { 6090 "include": "#expression" 6091 } 6092 ] 6093 }, 6094 "jsx-entities": { 6095 "patterns": [ 6096 { 6097 "name": "constant.character.entity.js", 6098 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", 6099 "captures": { 6100 "1": { 6101 "name": "punctuation.definition.entity.js" 6102 }, 6103 "3": { 6104 "name": "punctuation.definition.entity.js" 6105 } 6106 } 6107 } 6108 ] 6109 }, 6110 "jsx-tag-attributes": { 6111 "name": "meta.tag.attributes.js", 6112 "begin": "\\s+", 6113 "end": "(?=[/]?>)", 6114 "patterns": [ 6115 { 6116 "include": "#peacescript" 6117 }, 6118 { 6119 "include": "#comment" 6120 }, 6121 { 6122 "include": "#jsx-tag-attribute-name" 6123 }, 6124 { 6125 "include": "#jsx-tag-attribute-assignment" 6126 }, 6127 { 6128 "include": "#jsx-string-double-quoted" 6129 }, 6130 { 6131 "include": "#jsx-string-single-quoted" 6132 }, 6133 { 6134 "include": "#jsx-evaluated-code" 6135 }, 6136 { 6137 "include": "#jsx-tag-attributes-illegal" 6138 } 6139 ] 6140 }, 6141 "jsx-tag-attribute-name": { 6142 "match": "(?x)\n \\s*\n (?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?\n ([_$[:alpha:]][-_$[:alnum:]]*)\n (?=\\s|=|/?>|/\\*|//)", 6143 "captures": { 6144 "1": { 6145 "name": "entity.other.attribute-name.namespace.js" 6146 }, 6147 "2": { 6148 "name": "punctuation.separator.namespace.js" 6149 }, 6150 "3": { 6151 "name": "entity.other.attribute-name.js" 6152 } 6153 } 6154 }, 6155 "jsx-tag-attribute-assignment": { 6156 "name": "keyword.operator.assignment.js", 6157 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))" 6158 }, 6159 "jsx-string-double-quoted": { 6160 "name": "string.quoted.double.js", 6161 "begin": "\"", 6162 "end": "\"", 6163 "beginCaptures": { 6164 "0": { 6165 "name": "punctuation.definition.string.begin.js" 6166 } 6167 }, 6168 "endCaptures": { 6169 "0": { 6170 "name": "punctuation.definition.string.end.js" 6171 } 6172 }, 6173 "patterns": [ 6174 { 6175 "include": "#jsx-entities" 6176 } 6177 ] 6178 }, 6179 "jsx-string-single-quoted": { 6180 "name": "string.quoted.single.js", 6181 "begin": "'", 6182 "end": "'", 6183 "beginCaptures": { 6184 "0": { 6185 "name": "punctuation.definition.string.begin.js" 6186 } 6187 }, 6188 "endCaptures": { 6189 "0": { 6190 "name": "punctuation.definition.string.end.js" 6191 } 6192 }, 6193 "patterns": [ 6194 { 6195 "include": "#jsx-entities" 6196 } 6197 ] 6198 }, 6199 "jsx-tag-attributes-illegal": { 6200 "name": "invalid.illegal.attribute.js", 6201 "match": "\\S+" 6202 } 6203 } 6204}