github-linguist 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +14 -14
  3. data/grammars/hint.haskell.json +14 -14
  4. data/grammars/hint.message.haskell.json +14 -14
  5. data/grammars/hint.type.haskell.json +14 -14
  6. data/grammars/markdown.haxe.codeblock.json +26 -0
  7. data/grammars/markdown.hxml.codeblock.json +26 -0
  8. data/grammars/source.angelscript.json +1 -1
  9. data/grammars/source.ballerina.json +973 -61
  10. data/grammars/source.csound.json +1 -1
  11. data/grammars/source.emacs.lisp.json +35 -0
  12. data/grammars/source.firestore.json +289 -0
  13. data/grammars/source.gfm.json +7 -7
  14. data/grammars/source.haskell.json +14 -14
  15. data/grammars/source.hql.json +492 -0
  16. data/grammars/source.hsig.json +14 -14
  17. data/grammars/source.hx.json +14 -6
  18. data/grammars/source.hx.type.json +8 -0
  19. data/grammars/source.jison.json +1 -1
  20. data/grammars/source.js.json +1 -1
  21. data/grammars/source.powershell.json +384 -141
  22. data/grammars/source.q.json +120 -0
  23. data/grammars/source.q_output.json +348 -0
  24. data/grammars/source.rascal.json +0 -1
  25. data/grammars/source.sas.json +3 -3
  26. data/grammars/source.solidity.json +84 -13
  27. data/grammars/source.ts.json +226 -85
  28. data/grammars/source.tsx.json +230 -89
  29. data/grammars/source.viml.json +73 -18
  30. data/grammars/text.hamlc.json +1 -1
  31. data/grammars/text.html.markdown.source.gfm.apib.json +11 -2
  32. data/grammars/text.html.mediawiki.json +6 -6
  33. data/grammars/text.html.php.blade.json +3 -3
  34. data/grammars/text.tex.latex.haskell.json +14 -14
  35. data/lib/linguist/generated.rb +27 -1
  36. data/lib/linguist/heuristics.rb +8 -0
  37. data/lib/linguist/language.rb +12 -15
  38. data/lib/linguist/languages.json +1 -1
  39. data/lib/linguist/languages.yml +55 -10
  40. data/lib/linguist/samples.json +1623 -158
  41. data/lib/linguist/strategy/modeline.rb +11 -11
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +9 -3
  44. data/grammars/source.j.json +0 -46
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "after-operator-block-as-object-literal": {
27
27
  "name": "meta.objectliteral.tsx",
28
- "begin": "(?\u003c!\\+\\+|--)(?\u003c=[:=(,\\[?+!]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|\u0026\u0026|\\|\\||\\*)\\s*(\\{)",
28
+ "begin": "(?\u003c!\\+\\+|--)(?\u003c=[:=(,\\[?+!\u003e]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|\u0026\u0026|\\|\\||\\*)\\s*(\\{)",
29
29
  "end": "\\}",
30
30
  "patterns": [
31
31
  {
@@ -192,6 +192,9 @@
192
192
  {
193
193
  "include": "#comment"
194
194
  },
195
+ {
196
+ "include": "#string"
197
+ },
195
198
  {
196
199
  "include": "#object-binding-pattern"
197
200
  },
@@ -294,7 +297,7 @@
294
297
  },
295
298
  "class-expression": {
296
299
  "name": "meta.class.tsx",
297
- "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(class)\\b(?=\\s+|[\u003c{]|/[/*])",
300
+ "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(class)\\b(?=\\s+|[\u003c{]|\\/[\\/*])",
298
301
  "end": "(?\u003c=\\})",
299
302
  "patterns": [
300
303
  {
@@ -311,9 +314,6 @@
311
314
  "begin": "\\{",
312
315
  "end": "\\}",
313
316
  "patterns": [
314
- {
315
- "include": "#string"
316
- },
317
317
  {
318
318
  "include": "#comment"
319
319
  },
@@ -329,6 +329,9 @@
329
329
  {
330
330
  "include": "#field-declaration"
331
331
  },
332
+ {
333
+ "include": "#string"
334
+ },
332
335
  {
333
336
  "include": "#type-annotation"
334
337
  },
@@ -1443,15 +1446,15 @@
1443
1446
  },
1444
1447
  "field-declaration": {
1445
1448
  "name": "meta.field.declaration.tsx",
1446
- "begin": "(?\u003c!\\()(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1447
- "end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?\u003c=\\})",
1449
+ "begin": "(?x)(?\u003c!\\()(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(readonly)\\s+)?(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\?\\s*)?(=|:))",
1450
+ "end": "(?x)(?=\\}|;|,|$|(^(?!((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\?\\s*)?(=|:))))|(?\u003c=\\})",
1448
1451
  "patterns": [
1449
1452
  {
1450
1453
  "include": "#variable-initializer"
1451
1454
  },
1452
1455
  {
1453
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1454
- "end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?\u003c=\\})",
1456
+ "begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\?\\s*)?(=|:))",
1457
+ "end": "(?x)(?=[};,=]|$|(^(?!((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\?\\s*)?(=|:))))|(?\u003c=\\})",
1455
1458
  "patterns": [
1456
1459
  {
1457
1460
  "include": "#type-annotation"
@@ -1462,11 +1465,14 @@
1462
1465
  {
1463
1466
  "include": "#array-literal"
1464
1467
  },
1468
+ {
1469
+ "include": "#numeric-literal"
1470
+ },
1465
1471
  {
1466
1472
  "include": "#comment"
1467
1473
  },
1468
1474
  {
1469
- "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\?)?(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
1475
+ "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\?)?(?=(\\?\\s*)?\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
1470
1476
  "captures": {
1471
1477
  "1": {
1472
1478
  "name": "meta.definition.property.tsx entity.name.function.tsx"
@@ -1560,13 +1566,13 @@
1560
1566
  ]
1561
1567
  },
1562
1568
  "function-call": {
1563
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1564
- "end": "(?\u003c=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1569
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1570
+ "end": "(?\u003c=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1565
1571
  "patterns": [
1566
1572
  {
1567
1573
  "name": "meta.function-call.tsx",
1568
1574
  "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
1569
- "end": "(?=\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1575
+ "end": "(?=\\s*(\\?\\.\\s*)?(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)?\\()",
1570
1576
  "patterns": [
1571
1577
  {
1572
1578
  "include": "#literal"
@@ -1718,7 +1724,7 @@
1718
1724
  "include": "#object-identifiers"
1719
1725
  },
1720
1726
  {
1721
- "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
1727
+ "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n))",
1722
1728
  "captures": {
1723
1729
  "1": {
1724
1730
  "name": "punctuation.accessor.tsx"
@@ -1772,7 +1778,7 @@
1772
1778
  "import-declaration": {
1773
1779
  "name": "meta.import.tsx",
1774
1780
  "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(\\bexport)\\s+)?\\b(import)(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1775
- "end": "(?=;|$|^)",
1781
+ "end": "(?\u003c!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
1776
1782
  "patterns": [
1777
1783
  {
1778
1784
  "include": "#comment"
@@ -2298,11 +2304,11 @@
2298
2304
  },
2299
2305
  "jsx-tag": {
2300
2306
  "name": "meta.tag.tsx",
2301
- "begin": "(?=(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e)?\\s+(?!\\?)|\\/?\u003e))",
2307
+ "begin": "(?=(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=((\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
2302
2308
  "end": "(/\u003e)|(?:(\u003c/)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))?\\s*(\u003e))",
2303
2309
  "patterns": [
2304
2310
  {
2305
- "begin": "(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e)?\\s+(?!\\?)|\\/?\u003e)",
2311
+ "begin": "(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=((\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)|(\\s+))(?!\\?)|\\/?\u003e)",
2306
2312
  "end": "(?=[/]?\u003e)",
2307
2313
  "patterns": [
2308
2314
  {
@@ -2424,8 +2430,8 @@
2424
2430
  "match": "\\S+"
2425
2431
  },
2426
2432
  "jsx-tag-in-expression": {
2427
- "begin": "(?x)\n (?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?!\u003c\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=\u003e])|,)) # look ahead is not type parameter of arrow\n (?=(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e)?\\s+(?!\\?)|\\/?\u003e))",
2428
- "end": "(?!(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e)?\\s+(?!\\?)|\\/?\u003e))",
2433
+ "begin": "(?x)\n (?\u003c!\\+\\+|--)(?\u003c=[({\\[,?=\u003e:*]|\u0026\u0026|\\|\\||\\?|^return|[^\\._$[:alnum:]]return|^default|[^\\._$[:alnum:]]default|^)\\s*\n (?!\u003c\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=\u003e])|,)) # look ahead is not type parameter of arrow\n (?=(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=((\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
2434
+ "end": "(?!(\u003c)\\s*(?:([_$a-zA-Z][-$\\w.]*)(?\u003c!\\.|-)(:))?((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?\u003c!\\.|-))(?=((\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)|(\\s+))(?!\\?)|\\/?\u003e))",
2429
2435
  "patterns": [
2430
2436
  {
2431
2437
  "include": "#jsx-tag"
@@ -2492,6 +2498,38 @@
2492
2498
  }
2493
2499
  ]
2494
2500
  },
2501
+ "label": {
2502
+ "patterns": [
2503
+ {
2504
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
2505
+ "end": "(?\u003c=\\{)",
2506
+ "patterns": [
2507
+ {
2508
+ "include": "#decl-block"
2509
+ }
2510
+ ],
2511
+ "beginCaptures": {
2512
+ "1": {
2513
+ "name": "entity.name.label.tsx"
2514
+ },
2515
+ "2": {
2516
+ "name": "punctuation.separator.label.tsx"
2517
+ }
2518
+ }
2519
+ },
2520
+ {
2521
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
2522
+ "captures": {
2523
+ "1": {
2524
+ "name": "entity.name.label.tsx"
2525
+ },
2526
+ "2": {
2527
+ "name": "punctuation.separator.label.tsx"
2528
+ }
2529
+ }
2530
+ }
2531
+ ]
2532
+ },
2495
2533
  "literal": {
2496
2534
  "patterns": [
2497
2535
  {
@@ -2524,7 +2562,7 @@
2524
2562
  "patterns": [
2525
2563
  {
2526
2564
  "name": "meta.method.declaration.tsx",
2527
- "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\\u003c])",
2565
+ "begin": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2528
2566
  "end": "(?=\\}|;|,|$)|(?\u003c=\\})",
2529
2567
  "patterns": [
2530
2568
  {
@@ -2545,7 +2583,34 @@
2545
2583
  "name": "storage.modifier.async.tsx"
2546
2584
  },
2547
2585
  "4": {
2548
- "name": "storage.type.property.tsx"
2586
+ "name": "storage.type.tsx"
2587
+ }
2588
+ }
2589
+ },
2590
+ {
2591
+ "name": "meta.method.declaration.tsx",
2592
+ "begin": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*[\\(\\\u003c])",
2593
+ "end": "(?=\\}|;|,|$)|(?\u003c=\\})",
2594
+ "patterns": [
2595
+ {
2596
+ "include": "#method-declaration-name"
2597
+ },
2598
+ {
2599
+ "include": "#function-body"
2600
+ }
2601
+ ],
2602
+ "beginCaptures": {
2603
+ "1": {
2604
+ "name": "storage.modifier.tsx"
2605
+ },
2606
+ "2": {
2607
+ "name": "storage.modifier.tsx"
2608
+ },
2609
+ "3": {
2610
+ "name": "storage.modifier.async.tsx"
2611
+ },
2612
+ "4": {
2613
+ "name": "keyword.operator.new.tsx"
2549
2614
  },
2550
2615
  "5": {
2551
2616
  "name": "keyword.generator.asterisk.tsx"
@@ -2554,7 +2619,7 @@
2554
2619
  },
2555
2620
  {
2556
2621
  "name": "meta.method.declaration.tsx",
2557
- "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\\u003c]))",
2622
+ "begin": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=(((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\??))\\s*[\\(\\\u003c])",
2558
2623
  "end": "(?=\\}|;|,|$)|(?\u003c=\\})",
2559
2624
  "patterns": [
2560
2625
  {
@@ -2575,12 +2640,9 @@
2575
2640
  "name": "storage.modifier.async.tsx"
2576
2641
  },
2577
2642
  "4": {
2578
- "name": "keyword.operator.new.tsx"
2643
+ "name": "storage.type.property.tsx"
2579
2644
  },
2580
2645
  "5": {
2581
- "name": "storage.type.tsx"
2582
- },
2583
- "6": {
2584
2646
  "name": "keyword.generator.asterisk.tsx"
2585
2647
  }
2586
2648
  }
@@ -2588,7 +2650,7 @@
2588
2650
  ]
2589
2651
  },
2590
2652
  "method-declaration-name": {
2591
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\\u003c])",
2653
+ "begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\??)\\s*[\\(\\\u003c])",
2592
2654
  "end": "(?=\\(|\\\u003c)",
2593
2655
  "patterns": [
2594
2656
  {
@@ -2597,6 +2659,9 @@
2597
2659
  {
2598
2660
  "include": "#array-literal"
2599
2661
  },
2662
+ {
2663
+ "include": "#numeric-literal"
2664
+ },
2600
2665
  {
2601
2666
  "name": "meta.definition.method.tsx entity.name.function.tsx",
2602
2667
  "match": "[_$[:alpha:]][_$[:alnum:]]*"
@@ -2723,7 +2788,7 @@
2723
2788
  "include": "#comment"
2724
2789
  },
2725
2790
  {
2726
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
2791
+ "begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(:))",
2727
2792
  "end": "(?=,|\\})",
2728
2793
  "patterns": [
2729
2794
  {
@@ -2749,7 +2814,7 @@
2749
2814
  ]
2750
2815
  },
2751
2816
  "object-binding-element-propertyName": {
2752
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
2817
+ "begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(:))",
2753
2818
  "end": "(:)",
2754
2819
  "patterns": [
2755
2820
  {
@@ -2758,6 +2823,9 @@
2758
2823
  {
2759
2824
  "include": "#array-literal"
2760
2825
  },
2826
+ {
2827
+ "include": "#numeric-literal"
2828
+ },
2761
2829
  {
2762
2830
  "name": "variable.object.property.tsx",
2763
2831
  "match": "([_$[:alpha:]][_$[:alnum:]]*)"
@@ -2849,7 +2917,7 @@
2849
2917
  },
2850
2918
  "object-literal-method-declaration": {
2851
2919
  "name": "meta.method.declaration.tsx",
2852
- "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\\u003c])",
2920
+ "begin": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=(((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\??))\\s*[\\(\\\u003c])",
2853
2921
  "end": "(?=\\}|;|,)|(?\u003c=\\})",
2854
2922
  "patterns": [
2855
2923
  {
@@ -2859,7 +2927,7 @@
2859
2927
  "include": "#function-body"
2860
2928
  },
2861
2929
  {
2862
- "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\\u003c])",
2930
+ "begin": "(?x)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=(((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(\\??))\\s*[\\(\\\u003c])",
2863
2931
  "end": "(?=\\(|\\\u003c)",
2864
2932
  "patterns": [
2865
2933
  {
@@ -2943,7 +3011,7 @@
2943
3011
  },
2944
3012
  {
2945
3013
  "name": "meta.object.member.tsx",
2946
- "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
3014
+ "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
2947
3015
  "captures": {
2948
3016
  "0": {
2949
3017
  "name": "meta.object-literal.key.tsx"
@@ -3002,7 +3070,7 @@
3002
3070
  "end": "(?=,|\\})",
3003
3071
  "patterns": [
3004
3072
  {
3005
- "begin": "(?\u003c=:)\\s*(async)?(?=\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)\\(\\s*$)",
3073
+ "begin": "(?\u003c=:)\\s*(async)?(?=\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)\\(\\s*([\\{\\[]\\s*)?$)",
3006
3074
  "end": "(?\u003c=\\))",
3007
3075
  "patterns": [
3008
3076
  {
@@ -3035,7 +3103,7 @@
3035
3103
  }
3036
3104
  },
3037
3105
  {
3038
- "begin": "(?\u003c=:)\\s*(async)?\\s*(\\()(?=\\s*$)",
3106
+ "begin": "(?\u003c=:)\\s*(async)?\\s*(\\()(?=\\s*([\\{\\[]\\s*)?$)",
3039
3107
  "end": "\\)",
3040
3108
  "patterns": [
3041
3109
  {
@@ -3101,6 +3169,9 @@
3101
3169
  {
3102
3170
  "include": "#comment"
3103
3171
  },
3172
+ {
3173
+ "include": "#string"
3174
+ },
3104
3175
  {
3105
3176
  "include": "#parameter-object-binding-pattern"
3106
3177
  },
@@ -3118,7 +3189,7 @@
3118
3189
  "parameter-name": {
3119
3190
  "patterns": [
3120
3191
  {
3121
- "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
3192
+ "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|protected|private|readonly)\\s+(?=(public|protected|private|readonly)\\s+)",
3122
3193
  "captures": {
3123
3194
  "1": {
3124
3195
  "name": "storage.modifier.tsx"
@@ -3126,7 +3197,7 @@
3126
3197
  }
3127
3198
  },
3128
3199
  {
3129
- "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
3200
+ "match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
3130
3201
  "captures": {
3131
3202
  "1": {
3132
3203
  "name": "storage.modifier.tsx"
@@ -3146,7 +3217,7 @@
3146
3217
  }
3147
3218
  },
3148
3219
  {
3149
- "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
3220
+ "match": "(?x)(?:(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?\u003c!=|:)(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
3150
3221
  "captures": {
3151
3222
  "1": {
3152
3223
  "name": "storage.modifier.tsx"
@@ -3173,7 +3244,7 @@
3173
3244
  "include": "#comment"
3174
3245
  },
3175
3246
  {
3176
- "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\\\'|\\\\)*\\')|(\\\"([^\\\"\\\\]|\\\\\\\"|\\\\)*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
3247
+ "begin": "(?x)(?=((\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(b|B)[01][01_]*\\b(?!\\$))|(\\b(?\u003c!\\$)0(o|O)?[0-7][0-7_]*\\b(?!\\$))|((?\u003c!\\$)(?:\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*(:))",
3177
3248
  "end": "(?=,|\\})",
3178
3249
  "patterns": [
3179
3250
  {
@@ -3242,30 +3313,25 @@
3242
3313
  "paren-expression-possibly-arrow": {
3243
3314
  "patterns": [
3244
3315
  {
3245
- "begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?(?=\\s*(\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)\\(\\s*$)",
3316
+ "begin": "(?\u003c=[(=,])\\s*(async)?(?=\\s*((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*))?\\(\\s*[\\{\\[]\\s*$)",
3246
3317
  "end": "(?\u003c=\\))",
3247
3318
  "patterns": [
3248
3319
  {
3249
- "include": "#type-parameters"
3250
- },
3320
+ "include": "#paren-expression-possibly-arrow-with-typeparameters"
3321
+ }
3322
+ ],
3323
+ "beginCaptures": {
3324
+ "1": {
3325
+ "name": "storage.modifier.async.tsx"
3326
+ }
3327
+ }
3328
+ },
3329
+ {
3330
+ "begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?(?=\\s*((\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*))?\\(\\s*$)",
3331
+ "end": "(?\u003c=\\))",
3332
+ "patterns": [
3251
3333
  {
3252
- "begin": "\\(",
3253
- "end": "\\)",
3254
- "patterns": [
3255
- {
3256
- "include": "#expression-inside-possibly-arrow-parens"
3257
- }
3258
- ],
3259
- "beginCaptures": {
3260
- "0": {
3261
- "name": "meta.brace.round.tsx"
3262
- }
3263
- },
3264
- "endCaptures": {
3265
- "0": {
3266
- "name": "meta.brace.round.tsx"
3267
- }
3268
- }
3334
+ "include": "#paren-expression-possibly-arrow-with-typeparameters"
3269
3335
  }
3270
3336
  ],
3271
3337
  "beginCaptures": {
@@ -3275,7 +3341,17 @@
3275
3341
  }
3276
3342
  },
3277
3343
  {
3278
- "begin": "(?\u003c=[(=,]|=\u003e)\\s*(async)?\\s*(\\()(?=\\s*$)",
3344
+ "include": "#possibly-arrow-return-type"
3345
+ }
3346
+ ]
3347
+ },
3348
+ "paren-expression-possibly-arrow-with-typeparameters": {
3349
+ "patterns": [
3350
+ {
3351
+ "include": "#type-parameters"
3352
+ },
3353
+ {
3354
+ "begin": "\\(",
3279
3355
  "end": "\\)",
3280
3356
  "patterns": [
3281
3357
  {
@@ -3283,10 +3359,7 @@
3283
3359
  }
3284
3360
  ],
3285
3361
  "beginCaptures": {
3286
- "1": {
3287
- "name": "storage.modifier.async.tsx"
3288
- },
3289
- "2": {
3362
+ "0": {
3290
3363
  "name": "meta.brace.round.tsx"
3291
3364
  }
3292
3365
  },
@@ -3295,9 +3368,6 @@
3295
3368
  "name": "meta.brace.round.tsx"
3296
3369
  }
3297
3370
  }
3298
- },
3299
- {
3300
- "include": "#possibly-arrow-return-type"
3301
3371
  }
3302
3372
  ]
3303
3373
  },
@@ -3672,6 +3742,9 @@
3672
3742
  {
3673
3743
  "include": "#decl-block"
3674
3744
  },
3745
+ {
3746
+ "include": "#label"
3747
+ },
3675
3748
  {
3676
3749
  "include": "#expression"
3677
3750
  },
@@ -3774,6 +3847,40 @@
3774
3847
  }
3775
3848
  }
3776
3849
  },
3850
+ {
3851
+ "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3852
+ "captures": {
3853
+ "1": {
3854
+ "name": "keyword.control.import.tsx"
3855
+ },
3856
+ "2": {
3857
+ "name": "punctuation.accessor.tsx"
3858
+ },
3859
+ "3": {
3860
+ "name": "punctuation.accessor.optional.tsx"
3861
+ },
3862
+ "4": {
3863
+ "name": "support.variable.property.importmeta.tsx"
3864
+ }
3865
+ }
3866
+ },
3867
+ {
3868
+ "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3869
+ "captures": {
3870
+ "1": {
3871
+ "name": "keyword.operator.new.tsx"
3872
+ },
3873
+ "2": {
3874
+ "name": "punctuation.accessor.tsx"
3875
+ },
3876
+ "3": {
3877
+ "name": "punctuation.accessor.optional.tsx"
3878
+ },
3879
+ "4": {
3880
+ "name": "support.variable.property.target.tsx"
3881
+ }
3882
+ }
3883
+ },
3777
3884
  {
3778
3885
  "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (constructor|length|prototype|__proto__)\n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
3779
3886
  "captures": {
@@ -3992,11 +4099,11 @@
3992
4099
  "patterns": [
3993
4100
  {
3994
4101
  "name": "string.template.tsx",
3995
- "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[]|=\u003e|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)`)",
4102
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e|\\\u003c\\s*(((keyof|infer)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\])|(\\'[^\\']*\\')|(\\\"[^\\\"]*\\\")|(\\`[^\\`]*\\`))(?=\\s*([\\\u003c\\\u003e\\,\\.\\[=]|\u0026(?!\u0026)|\\|(?!\\|)))))([^\u003c\u003e\\(]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(?\u003c==)\\\u003e)*(?!=)\\\u003e)*(?!=)\u003e\\s*)`)",
3996
4103
  "end": "(?=`)",
3997
4104
  "patterns": [
3998
4105
  {
3999
- "include": "#type-parameters"
4106
+ "include": "#type-arguments"
4000
4107
  }
4001
4108
  ],
4002
4109
  "beginCaptures": {
@@ -4135,11 +4242,14 @@
4135
4242
  "include": "#type-parameters"
4136
4243
  },
4137
4244
  {
4138
- "include": "#type"
4139
- },
4140
- {
4141
- "match": "(=)\\s*",
4142
- "captures": {
4245
+ "begin": "(=)\\s*",
4246
+ "end": "(?=\\}|;|\\babstract\\b|\\basync\\b|\\bclass\\b|\\bconst\\b|\\bdeclare\\b|\\benum\\b|\\bexport\\b|\\bfunction\\b|\\bimport\\b|\\binterface\\b|\\blet\\b|\\bmodule\\b|\\bnamespace\\b|\\breturn\\b|\\btype\\b|\\bvar\\b)",
4247
+ "patterns": [
4248
+ {
4249
+ "include": "#type"
4250
+ }
4251
+ ],
4252
+ "beginCaptures": {
4143
4253
  "1": {
4144
4254
  "name": "keyword.operator.assignment.tsx"
4145
4255
  }
@@ -4220,12 +4330,41 @@
4220
4330
  "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4221
4331
  },
4222
4332
  "type-conditional": {
4223
- "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(extends)\\s+",
4224
- "captures": {
4225
- "1": {
4226
- "name": "storage.modifier.tsx"
4333
+ "patterns": [
4334
+ {
4335
+ "begin": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(extends)\\s+",
4336
+ "end": "(?\u003c=:)",
4337
+ "patterns": [
4338
+ {
4339
+ "begin": "\\?",
4340
+ "end": ":",
4341
+ "patterns": [
4342
+ {
4343
+ "include": "#type"
4344
+ }
4345
+ ],
4346
+ "beginCaptures": {
4347
+ "0": {
4348
+ "name": "keyword.operator.ternary.tsx"
4349
+ }
4350
+ },
4351
+ "endCaptures": {
4352
+ "0": {
4353
+ "name": "keyword.operator.ternary.tsx"
4354
+ }
4355
+ }
4356
+ },
4357
+ {
4358
+ "include": "#type"
4359
+ }
4360
+ ],
4361
+ "beginCaptures": {
4362
+ "1": {
4363
+ "name": "storage.modifier.tsx"
4364
+ }
4365
+ }
4227
4366
  }
4228
- }
4367
+ ]
4229
4368
  },
4230
4369
  "type-fn-type-parameters": {
4231
4370
  "patterns": [
@@ -4270,7 +4409,7 @@
4270
4409
  {
4271
4410
  "name": "meta.type.function.return.tsx",
4272
4411
  "begin": "(=\u003e)(?=\\s*\\S)",
4273
- "end": "(?\u003c!=\u003e)(?\u003c![|\u0026])(?=[,\\]\\)\\{\\}=;\u003e]|//|$)",
4412
+ "end": "(?\u003c!=\u003e)(?\u003c![|\u0026])(?=[,\\]\\)\\{\\}=;\u003e:\\?]|//|$)",
4274
4413
  "patterns": [
4275
4414
  {
4276
4415
  "include": "#type-function-return-type-core"
@@ -4285,7 +4424,7 @@
4285
4424
  {
4286
4425
  "name": "meta.type.function.return.tsx",
4287
4426
  "begin": "=\u003e",
4288
- "end": "(?\u003c!=\u003e)(?\u003c![|\u0026])((?=[,\\]\\)\\{\\}=;\u003e]|//|^\\s*$)|((?\u003c=\\S)(?=\\s*$)))",
4427
+ "end": "(?\u003c!=\u003e)(?\u003c![|\u0026])((?=[,\\]\\)\\{\\}=;:\\?\u003e]|//|^\\s*$)|((?\u003c=\\S)(?=\\s*$)))",
4289
4428
  "patterns": [
4290
4429
  {
4291
4430
  "include": "#type-function-return-type-core"
@@ -4407,7 +4546,7 @@
4407
4546
  "include": "#typeof-operator"
4408
4547
  },
4409
4548
  {
4410
- "begin": "([\u0026|])(?=\\s*\\{)",
4549
+ "begin": "(?:([\u0026|])|(=(?!\u003e)))(?=\\s*\\{)",
4411
4550
  "end": "(?\u003c=\\})",
4412
4551
  "patterns": [
4413
4552
  {
@@ -4415,17 +4554,23 @@
4415
4554
  }
4416
4555
  ],
4417
4556
  "beginCaptures": {
4418
- "0": {
4557
+ "1": {
4419
4558
  "name": "keyword.operator.type.tsx"
4559
+ },
4560
+ "2": {
4561
+ "name": "keyword.operator.assignment.tsx"
4420
4562
  }
4421
4563
  }
4422
4564
  },
4423
4565
  {
4424
- "begin": "[\u0026|]",
4566
+ "begin": "([\u0026|])|(=(?!\u003e))",
4425
4567
  "end": "(?=\\S)",
4426
4568
  "beginCaptures": {
4427
- "0": {
4569
+ "1": {
4428
4570
  "name": "keyword.operator.type.tsx"
4571
+ },
4572
+ "2": {
4573
+ "name": "keyword.operator.assignment.tsx"
4429
4574
  }
4430
4575
  }
4431
4576
  },
@@ -4459,10 +4604,6 @@
4459
4604
  "name": "storage.modifier.tsx",
4460
4605
  "match": "(?\u003c![_$[:alnum:]])(?:(?\u003c=\\.\\.\\.)|(?\u003c!\\.))(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4461
4606
  },
4462
- {
4463
- "name": "keyword.operator.assignment.tsx",
4464
- "match": "\\=(?!\u003e)"
4465
- },
4466
4607
  {
4467
4608
  "include": "#type"
4468
4609
  },
@@ -4600,7 +4741,7 @@
4600
4741
  "patterns": [
4601
4742
  {
4602
4743
  "name": "meta.var-single-variable.expr.tsx",
4603
- "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
4744
+ "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: \u003c | () | (... | (param: | (param, | (param? | (param= | (param) =\u003e\n(:\\s*(\n (\u003c) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=\u003e)\n ))\n ))\n)) |\n(:\\s*(=\u003e|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\u003c[^\u003c\u003e]*\u003e)|[^\u003c\u003e(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(\u003c*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=\u003e)\n )) |\n ((async\\s*)?(\n ([\\(]\\s*([\\{\\[]\\s*)?$) |\n # sure shot arrow functions even if =\u003e is on new line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)?\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n(\n [\u003c]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=\u003e] # \u003c typeparam extends\n) |\n# arrow function possible to detect only with =\u003e on same line\n(\n (\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c]|\\\u003c\\s*([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\))|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^=\u003c\u003e]|=[^\u003c])*\\\u003e)*\u003e\\s*)? # typeparameters\n \\(\\s*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{[^\\{\\}]*\\}))*\\})|(\\[([^\\[\\]]|(\\[[^\\[\\]]*\\]))*\\]))([^()]|(\\(([^\\(\\)]|(\\([^\\(\\)]*\\)))*\\)))*)?\\) # parameters\n (\\s*:\\s*([^\u003c\u003e\\(\\)]|\\\u003c[^\u003c\u003e]+\\\u003e|\\([^\\(\\)]+\\))+)? # return type\n \\s*=\u003e # arrow operator\n)\n ))\n)))",
4604
4745
  "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
4605
4746
  "patterns": [
4606
4747
  {