|
4 | 4 | "If you want to provide a fix or improvement, please create a pull request against the original repository.", |
5 | 5 | "Once accepted there, we are happy to receive an update request." |
6 | 6 | ], |
7 | | - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/32208c2b11569d08a925f56fd69d28b18a5cc308", |
| 7 | + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/858d33f03943e4ec040e81cbabbc3f7892157c18", |
8 | 8 | "name": "JavaScript (with React support)", |
9 | 9 | "scopeName": "source.js", |
10 | 10 | "patterns": [ |
|
285 | 285 | ] |
286 | 286 | }, |
287 | 287 | "var-expr": { |
288 | | - "name": "meta.var.expr.js", |
289 | | - "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", |
290 | | - "beginCaptures": { |
291 | | - "1": { |
292 | | - "name": "keyword.control.export.js" |
293 | | - }, |
294 | | - "2": { |
295 | | - "name": "storage.type.js" |
296 | | - } |
297 | | - }, |
298 | | - "end": "((?=;|}|(\\s+(of|in)\\s+)|^\\s*$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)|((?<=\\S)(?<!^const|[^\\._$[:alnum:]]const|^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", |
299 | 288 | "patterns": [ |
300 | 289 | { |
301 | | - "include": "#destructuring-variable" |
302 | | - }, |
303 | | - { |
304 | | - "include": "#var-single-variable" |
305 | | - }, |
306 | | - { |
307 | | - "include": "#variable-initializer" |
308 | | - }, |
309 | | - { |
310 | | - "include": "#comment" |
311 | | - }, |
312 | | - { |
313 | | - "begin": "(,)\\s*(?!\\S)", |
| 290 | + "name": "meta.var.expr.js", |
| 291 | + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", |
314 | 292 | "beginCaptures": { |
315 | 293 | "1": { |
316 | | - "name": "punctuation.separator.comma.js" |
| 294 | + "name": "keyword.control.export.js" |
| 295 | + }, |
| 296 | + "2": { |
| 297 | + "name": "storage.type.js" |
317 | 298 | } |
318 | 299 | }, |
319 | | - "end": "(?<!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", |
| 300 | + "end": "((?=;|}|(\\s+(of|in)\\s+)|^\\s*$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)|((?<=\\S)(?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))", |
320 | 301 | "patterns": [ |
321 | | - { |
322 | | - "include": "#comment" |
323 | | - }, |
324 | 302 | { |
325 | 303 | "include": "#destructuring-variable" |
326 | 304 | }, |
327 | 305 | { |
328 | 306 | "include": "#var-single-variable" |
329 | 307 | }, |
| 308 | + { |
| 309 | + "include": "#variable-initializer" |
| 310 | + }, |
| 311 | + { |
| 312 | + "include": "#comment" |
| 313 | + }, |
| 314 | + { |
| 315 | + "begin": "(,)\\s*(?!\\S)", |
| 316 | + "beginCaptures": { |
| 317 | + "1": { |
| 318 | + "name": "punctuation.separator.comma.js" |
| 319 | + } |
| 320 | + }, |
| 321 | + "end": "(?<!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", |
| 322 | + "patterns": [ |
| 323 | + { |
| 324 | + "include": "#comment" |
| 325 | + }, |
| 326 | + { |
| 327 | + "include": "#destructuring-variable" |
| 328 | + }, |
| 329 | + { |
| 330 | + "include": "#var-single-variable" |
| 331 | + }, |
| 332 | + { |
| 333 | + "include": "#punctuation-comma" |
| 334 | + } |
| 335 | + ] |
| 336 | + }, |
330 | 337 | { |
331 | 338 | "include": "#punctuation-comma" |
332 | 339 | } |
333 | 340 | ] |
334 | 341 | }, |
335 | 342 | { |
336 | | - "include": "#punctuation-comma" |
| 343 | + "name": "meta.var.expr.js", |
| 344 | + "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", |
| 345 | + "beginCaptures": { |
| 346 | + "1": { |
| 347 | + "name": "keyword.control.export.js" |
| 348 | + }, |
| 349 | + "2": { |
| 350 | + "name": "storage.type.js" |
| 351 | + } |
| 352 | + }, |
| 353 | + "end": "((?=;|}|(\\s+(of|in)\\s+)|^\\s*$|;|^\\s*abstract\\b|^\\s*async\\b|^\\s*class\\b|^\\s*const\\b|^\\s*declare\\b|^\\s*enum\\b|^\\s*export\\b|^\\s*function\\b|^\\s*import\\b|^\\s*interface\\b|^\\s*let\\b|^\\s*module\\b|^\\s*namespace\\b|^\\s*return\\b|^\\s*type\\b|^\\s*var\\b)|((?<=\\S)(?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))", |
| 354 | + "patterns": [ |
| 355 | + { |
| 356 | + "include": "#destructuring-const" |
| 357 | + }, |
| 358 | + { |
| 359 | + "include": "#var-single-const" |
| 360 | + }, |
| 361 | + { |
| 362 | + "include": "#variable-initializer" |
| 363 | + }, |
| 364 | + { |
| 365 | + "include": "#comment" |
| 366 | + }, |
| 367 | + { |
| 368 | + "begin": "(,)\\s*(?!\\S)", |
| 369 | + "beginCaptures": { |
| 370 | + "1": { |
| 371 | + "name": "punctuation.separator.comma.js" |
| 372 | + } |
| 373 | + }, |
| 374 | + "end": "(?<!,)(((?==|;|}|(\\s+(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))", |
| 375 | + "patterns": [ |
| 376 | + { |
| 377 | + "include": "#comment" |
| 378 | + }, |
| 379 | + { |
| 380 | + "include": "#destructuring-const" |
| 381 | + }, |
| 382 | + { |
| 383 | + "include": "#var-single-const" |
| 384 | + }, |
| 385 | + { |
| 386 | + "include": "#punctuation-comma" |
| 387 | + } |
| 388 | + ] |
| 389 | + }, |
| 390 | + { |
| 391 | + "include": "#punctuation-comma" |
| 392 | + } |
| 393 | + ] |
337 | 394 | } |
338 | 395 | ] |
339 | 396 | }, |
|
386 | 443 | } |
387 | 444 | ] |
388 | 445 | }, |
| 446 | + "var-single-const": { |
| 447 | + "patterns": [ |
| 448 | + { |
| 449 | + "name": "meta.var-single-variable.expr.js", |
| 450 | + "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*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\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*((<\\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*)?$)) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)?\n [(]\\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*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=<>]|=[^<])*\\>)*>\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)]|\\<[^<>]+\\>|\\([^\\(\\)]+\\))+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))", |
| 451 | + "beginCaptures": { |
| 452 | + "1": { |
| 453 | + "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js" |
| 454 | + } |
| 455 | + }, |
| 456 | + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", |
| 457 | + "patterns": [ |
| 458 | + { |
| 459 | + "include": "#var-single-variable-type-annotation" |
| 460 | + } |
| 461 | + ] |
| 462 | + }, |
| 463 | + { |
| 464 | + "name": "meta.var-single-variable.expr.js", |
| 465 | + "begin": "([_$[:alpha:]][_$[:alnum:]]*)", |
| 466 | + "beginCaptures": { |
| 467 | + "1": { |
| 468 | + "name": "meta.definition.variable.js variable.other.constant.js" |
| 469 | + } |
| 470 | + }, |
| 471 | + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", |
| 472 | + "patterns": [ |
| 473 | + { |
| 474 | + "include": "#var-single-variable-type-annotation" |
| 475 | + } |
| 476 | + ] |
| 477 | + } |
| 478 | + ] |
| 479 | + }, |
389 | 480 | "var-single-variable-type-annotation": { |
390 | 481 | "patterns": [ |
391 | 482 | { |
|
435 | 526 | } |
436 | 527 | ] |
437 | 528 | }, |
| 529 | + "destructuring-const": { |
| 530 | + "patterns": [ |
| 531 | + { |
| 532 | + "name": "meta.object-binding-pattern-variable.js", |
| 533 | + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)", |
| 534 | + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", |
| 535 | + "patterns": [ |
| 536 | + { |
| 537 | + "include": "#object-binding-pattern-const" |
| 538 | + }, |
| 539 | + { |
| 540 | + "include": "#type-annotation" |
| 541 | + }, |
| 542 | + { |
| 543 | + "include": "#comment" |
| 544 | + } |
| 545 | + ] |
| 546 | + }, |
| 547 | + { |
| 548 | + "name": "meta.array-binding-pattern-variable.js", |
| 549 | + "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)", |
| 550 | + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", |
| 551 | + "patterns": [ |
| 552 | + { |
| 553 | + "include": "#array-binding-pattern-const" |
| 554 | + }, |
| 555 | + { |
| 556 | + "include": "#type-annotation" |
| 557 | + }, |
| 558 | + { |
| 559 | + "include": "#comment" |
| 560 | + } |
| 561 | + ] |
| 562 | + } |
| 563 | + ] |
| 564 | + }, |
438 | 565 | "object-binding-element": { |
439 | 566 | "patterns": [ |
440 | 567 | { |
|
466 | 593 | } |
467 | 594 | ] |
468 | 595 | }, |
| 596 | + "object-binding-element-const": { |
| 597 | + "patterns": [ |
| 598 | + { |
| 599 | + "include": "#comment" |
| 600 | + }, |
| 601 | + { |
| 602 | + "begin": "(?x)(?=((\\b(?<!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?<!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?<!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", |
| 603 | + "end": "(?=,|\\})", |
| 604 | + "patterns": [ |
| 605 | + { |
| 606 | + "include": "#object-binding-element-propertyName" |
| 607 | + }, |
| 608 | + { |
| 609 | + "include": "#binding-element-const" |
| 610 | + } |
| 611 | + ] |
| 612 | + }, |
| 613 | + { |
| 614 | + "include": "#object-binding-pattern-const" |
| 615 | + }, |
| 616 | + { |
| 617 | + "include": "#destructuring-variable-rest-const" |
| 618 | + }, |
| 619 | + { |
| 620 | + "include": "#variable-initializer" |
| 621 | + }, |
| 622 | + { |
| 623 | + "include": "#punctuation-comma" |
| 624 | + } |
| 625 | + ] |
| 626 | + }, |
469 | 627 | "object-binding-element-propertyName": { |
470 | 628 | "begin": "(?x)(?=((\\b(?<!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?<!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?<!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*\\b)| # .1\n (?:\\b[0-9][0-9_]*\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))", |
471 | 629 | "end": "(:)", |
|
512 | 670 | } |
513 | 671 | ] |
514 | 672 | }, |
| 673 | + "binding-element-const": { |
| 674 | + "patterns": [ |
| 675 | + { |
| 676 | + "include": "#comment" |
| 677 | + }, |
| 678 | + { |
| 679 | + "include": "#string" |
| 680 | + }, |
| 681 | + { |
| 682 | + "include": "#object-binding-pattern-const" |
| 683 | + }, |
| 684 | + { |
| 685 | + "include": "#array-binding-pattern-const" |
| 686 | + }, |
| 687 | + { |
| 688 | + "include": "#destructuring-variable-rest-const" |
| 689 | + }, |
| 690 | + { |
| 691 | + "include": "#variable-initializer" |
| 692 | + } |
| 693 | + ] |
| 694 | + }, |
515 | 695 | "destructuring-variable-rest": { |
516 | 696 | "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", |
517 | 697 | "captures": { |
|
523 | 703 | } |
524 | 704 | } |
525 | 705 | }, |
| 706 | + "destructuring-variable-rest-const": { |
| 707 | + "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)", |
| 708 | + "captures": { |
| 709 | + "1": { |
| 710 | + "name": "keyword.operator.rest.js" |
| 711 | + }, |
| 712 | + "2": { |
| 713 | + "name": "meta.definition.variable.js variable.other.constant.js" |
| 714 | + } |
| 715 | + } |
| 716 | + }, |
526 | 717 | "object-binding-pattern": { |
527 | 718 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", |
528 | 719 | "beginCaptures": { |
|
545 | 736 | } |
546 | 737 | ] |
547 | 738 | }, |
| 739 | + "object-binding-pattern-const": { |
| 740 | + "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)", |
| 741 | + "beginCaptures": { |
| 742 | + "1": { |
| 743 | + "name": "keyword.operator.rest.js" |
| 744 | + }, |
| 745 | + "2": { |
| 746 | + "name": "punctuation.definition.binding-pattern.object.js" |
| 747 | + } |
| 748 | + }, |
| 749 | + "end": "\\}", |
| 750 | + "endCaptures": { |
| 751 | + "0": { |
| 752 | + "name": "punctuation.definition.binding-pattern.object.js" |
| 753 | + } |
| 754 | + }, |
| 755 | + "patterns": [ |
| 756 | + { |
| 757 | + "include": "#object-binding-element-const" |
| 758 | + } |
| 759 | + ] |
| 760 | + }, |
548 | 761 | "array-binding-pattern": { |
549 | 762 | "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", |
550 | 763 | "beginCaptures": { |
|
570 | 783 | } |
571 | 784 | ] |
572 | 785 | }, |
| 786 | + "array-binding-pattern-const": { |
| 787 | + "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)", |
| 788 | + "beginCaptures": { |
| 789 | + "1": { |
| 790 | + "name": "keyword.operator.rest.js" |
| 791 | + }, |
| 792 | + "2": { |
| 793 | + "name": "punctuation.definition.binding-pattern.array.js" |
| 794 | + } |
| 795 | + }, |
| 796 | + "end": "\\]", |
| 797 | + "endCaptures": { |
| 798 | + "0": { |
| 799 | + "name": "punctuation.definition.binding-pattern.array.js" |
| 800 | + } |
| 801 | + }, |
| 802 | + "patterns": [ |
| 803 | + { |
| 804 | + "include": "#binding-element-const" |
| 805 | + }, |
| 806 | + { |
| 807 | + "include": "#punctuation-comma" |
| 808 | + } |
| 809 | + ] |
| 810 | + }, |
573 | 811 | "parameter-name": { |
574 | 812 | "patterns": [ |
575 | 813 | { |
|
0 commit comments