ant-monaco
Version:
Ant monaco with vscode-textmate. This module can only run under node runtime
2,202 lines • 111 kB
JSON
{
"name": "JavaScript (with React support)",
"scopeName": "source.js",
"fileTypes": [
".js",
".jsx"
],
"uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
"patterns": [
{
"include": "#directives"
},
{
"include": "#statements"
},
{
"name": "comment.line.shebang.ts",
"match": "\\A(#!).*(?=$)",
"captures": {
"1": {
"name": "punctuation.definition.comment.ts"
}
}
}
],
"repository": {
"statements": {
"patterns": [
{
"include": "#string"
},
{
"include": "#template"
},
{
"include": "#comment"
},
{
"include": "#declaration"
},
{
"include": "#switch-statement"
},
{
"include": "#for-loop"
},
{
"include": "#after-operator-block"
},
{
"include": "#decl-block"
},
{
"include": "#control-statement"
},
{
"include": "#expression"
},
{
"include": "#punctuation-semicolon"
}
]
},
"var-expr": {
"name": "meta.var.expr.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.type.js"
}
},
"end": "(?=$|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#destructuring-variable"
},
{
"include": "#var-single-variable"
},
{
"include": "#variable-initializer"
},
{
"include": "#comment"
},
{
"include": "#punctuation-comma"
}
]
},
"var-single-variable": {
"patterns": [
{
"name": "meta.var-single-variable.expr.js",
"begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
"beginCaptures": {
"1": {
"name": "meta.definition.variable.js entity.name.function.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
}
]
},
{
"name": "meta.var-single-variable.expr.js",
"begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
"beginCaptures": {
"1": {
"name": "meta.definition.variable.js variable.other.constant.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
}
]
},
{
"name": "meta.var-single-variable.expr.js",
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"1": {
"name": "meta.definition.variable.js variable.other.readwrite.js"
}
},
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#var-single-variable-type-annotation"
}
]
}
]
},
"var-single-variable-type-annotation": {
"patterns": [
{
"include": "#type-annotation"
},
{
"include": "#string"
},
{
"include": "#comment"
}
]
},
"destructuring-variable": {
"patterns": [
{
"name": "meta.object-binding-pattern-variable.js",
"begin": "(?<!=|:|of|in)\\s*(?=\\{)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#object-binding-pattern"
},
{
"include": "#type-annotation"
},
{
"include": "#comment"
}
]
},
{
"name": "meta.array-binding-pattern-variable.js",
"begin": "(?<!=|:|of|in)\\s*(?=\\[)",
"end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
"patterns": [
{
"include": "#array-binding-pattern"
},
{
"include": "#type-annotation"
},
{
"include": "#comment"
}
]
}
]
},
"object-binding-element": {
"patterns": [
{
"include": "#comment"
},
{
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
"end": "(?=,|\\})",
"patterns": [
{
"include": "#object-binding-element-propertyName"
},
{
"include": "#binding-element"
}
]
},
{
"include": "#object-binding-pattern"
},
{
"include": "#destructuring-variable-rest"
},
{
"include": "#variable-initializer"
},
{
"include": "#punctuation-comma"
}
]
},
"object-binding-element-propertyName": {
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
"end": "(:)",
"endCaptures": {
"0": {
"name": "punctuation.destructuring.js"
}
},
"patterns": [
{
"include": "#string"
},
{
"include": "#array-literal"
},
{
"name": "variable.object.property.js",
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
"binding-element": {
"patterns": [
{
"include": "#comment"
},
{
"include": "#object-binding-pattern"
},
{
"include": "#array-binding-pattern"
},
{
"include": "#destructuring-variable-rest"
},
{
"include": "#variable-initializer"
}
]
},
"destructuring-variable-rest": {
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "meta.definition.variable.js variable.other.readwrite.js"
}
}
},
"object-binding-pattern": {
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"patterns": [
{
"include": "#object-binding-element"
}
]
},
"array-binding-pattern": {
"begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
"beginCaptures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"patterns": [
{
"include": "#binding-element"
},
{
"include": "#punctuation-comma"
}
]
},
"ternary-expression": {
"begin": "(\\?)",
"beginCaptures": {
"0": {
"name": "keyword.operator.ternary.js"
}
},
"end": "(:)",
"endCaptures": {
"0": {
"name": "keyword.operator.ternary.js"
}
},
"patterns": [
{
"include": "#expression"
}
]
},
"expression": {
"patterns": [
{
"include": "#jsx"
},
{
"include": "#string"
},
{
"include": "#regex"
},
{
"include": "#template"
},
{
"include": "#comment"
},
{
"include": "#function-expression"
},
{
"include": "#class-or-interface-declaration"
},
{
"include": "#arrow-function"
},
{
"include": "#cast"
},
{
"include": "#ternary-expression"
},
{
"include": "#new-expr"
},
{
"include": "#object-literal"
},
{
"include": "#expression-operators"
},
{
"include": "#function-call"
},
{
"include": "#literal"
},
{
"include": "#support-objects"
},
{
"include": "#identifiers"
},
{
"include": "#paren-expression"
},
{
"include": "#punctuation-comma"
},
{
"include": "#punctuation-accessor"
}
]
},
"control-statement": {
"patterns": [
{
"name": "keyword.control.trycatch.js",
"match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
},
{
"name": "keyword.control.loop.js",
"match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
},
{
"name": "keyword.control.flow.js",
"match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
},
{
"name": "keyword.control.switch.js",
"match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
},
{
"name": "keyword.control.conditional.js",
"match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
},
{
"name": "keyword.control.with.js",
"match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
},
{
"name": "keyword.other.debugger.js",
"match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
},
{
"name": "storage.modifier.js",
"match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
}
]
},
"declaration": {
"patterns": [
{
"include": "#decorator"
},
{
"include": "#var-expr"
},
{
"include": "#function-declaration"
},
{
"include": "#class-or-interface-declaration"
},
{
"include": "#type-declaration"
},
{
"include": "#enum-declaration"
},
{
"include": "#namespace-declaration"
},
{
"include": "#import-equals-declaration"
},
{
"include": "#import-declaration"
},
{
"include": "#export-declaration"
}
]
},
"decorator": {
"name": "meta.decorator.js",
"begin": "(?<!\\.|\\$)\\@",
"beginCaptures": {
"0": {
"name": "punctuation.decorator.js"
}
},
"end": "(?=\\s)",
"patterns": [
{
"include": "#expression"
}
]
},
"type-declaration": {
"name": "meta.type.declaration.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.type.type.js"
},
"3": {
"name": "entity.name.type.js"
}
},
"end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#type"
},
{
"match": "(=)\\s*",
"captures": {
"1": {
"name": "keyword.operator.assignment.js"
}
}
}
]
},
"enum-declaration": {
"name": "meta.enum.declaration.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.type.enum.js"
},
"4": {
"name": "entity.name.type.enum.js"
}
},
"end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"begin": "([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"0": {
"name": "variable.other.enummember.js"
}
},
"end": "(?=,|\\}|$)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#variable-initializer"
}
]
},
{
"begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
"end": "(?=,|\\}|$)",
"patterns": [
{
"include": "#string"
},
{
"include": "#array-literal"
},
{
"include": "#comment"
},
{
"include": "#variable-initializer"
}
]
},
{
"include": "#punctuation-comma"
}
]
}
]
},
"namespace-declaration": {
"name": "meta.namespace.declaration.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.type.namespace.js"
}
},
"end": "(?=$|\\{)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"name": "entity.name.type.module.js",
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
},
{
"include": "#punctuation-accessor"
}
]
},
"import-equals-declaration": {
"patterns": [
{
"name": "meta.import-equals.external.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "keyword.control.import.js"
},
"3": {
"name": "variable.other.readwrite.alias.js"
},
"4": {
"name": "keyword.operator.assignment.js"
},
"5": {
"name": "keyword.control.require.js"
},
"6": {
"name": "meta.brace.round.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
}
]
},
{
"name": "meta.import-equals.internal.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "keyword.control.import.js"
},
"3": {
"name": "variable.other.readwrite.alias.js"
},
"4": {
"name": "keyword.operator.assignment.js"
}
},
"end": "(?=;|$)",
"patterns": [
{
"include": "#comment"
},
{
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
"captures": {
"1": {
"name": "entity.name.type.module.js"
},
"2": {
"name": "punctuation.accessor.js"
}
}
},
{
"name": "variable.other.readwrite.js",
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
}
]
},
"import-declaration": {
"name": "meta.import.js",
"begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "keyword.control.import.js"
}
},
"end": "(?=;|$)",
"patterns": [
{
"include": "#import-export-declaration"
}
]
},
"export-declaration": {
"patterns": [
{
"match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "keyword.control.as.js"
},
"3": {
"name": "storage.type.namespace.js"
},
"4": {
"name": "entity.name.type.module.js"
}
}
},
{
"name": "meta.export.default.js",
"begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "keyword.operator.assignment.js"
},
"3": {
"name": "keyword.control.default.js"
}
},
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
"patterns": [
{
"include": "#expression"
}
]
},
{
"name": "meta.export.js",
"begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
"beginCaptures": {
"0": {
"name": "keyword.control.export.js"
}
},
"end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
"patterns": [
{
"include": "#import-export-declaration"
}
]
}
]
},
"import-export-declaration": {
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"include": "#import-export-block"
},
{
"name": "keyword.control.from.js",
"match": "\\bfrom\\b"
},
{
"include": "#import-export-clause"
}
]
},
"import-export-block": {
"name": "meta.block.js",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#import-export-clause"
}
]
},
"import-export-clause": {
"patterns": [
{
"include": "#comment"
},
{
"comment": "(default|*|name) as alias",
"match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
"captures": {
"1": {
"name": "keyword.control.default.js"
},
"2": {
"name": "constant.language.import-export-all.js"
},
"3": {
"name": "variable.other.readwrite.js"
},
"4": {
"name": "keyword.control.as.js"
},
"5": {
"name": "invalid.illegal.js"
},
"6": {
"name": "variable.other.readwrite.alias.js"
}
}
},
{
"include": "#punctuation-comma"
},
{
"name": "constant.language.import-export-all.js",
"match": "\\*"
},
{
"name": "keyword.control.default.js",
"match": "\\b(default)\\b"
},
{
"name": "variable.other.readwrite.alias.js",
"match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
"class-or-interface-declaration": {
"name": "meta.class.js",
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b(?=\\s+|/[/*])",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.type.class.js"
},
"4": {
"name": "storage.type.interface.js"
}
},
"end": "(?<=\\})",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#class-or-interface-heritage"
},
{
"match": "[_$[:alpha:]][_$[:alnum:]]*",
"captures": {
"0": {
"name": "entity.name.type.class.js"
}
}
},
{
"include": "#type-parameters"
},
{
"include": "#class-or-interface-body"
}
]
},
"class-or-interface-heritage": {
"begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
}
},
"end": "(?=\\{)",
"endCaptures": {
"1": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#class-or-interface-heritage"
},
{
"include": "#type-parameters"
},
{
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
"captures": {
"1": {
"name": "entity.name.type.module.js"
},
"2": {
"name": "punctuation.accessor.js"
}
}
},
{
"match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
"captures": {
"1": {
"name": "entity.other.inherited-class.js"
}
}
},
{
"include": "#expression"
}
]
},
"class-or-interface-body": {
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#string"
},
{
"include": "#comment"
},
{
"include": "#decorator"
},
{
"include": "#method-declaration"
},
{
"include": "#indexer-declaration"
},
{
"include": "#field-declaration"
},
{
"include": "#type-annotation"
},
{
"include": "#variable-initializer"
},
{
"include": "#access-modifier"
},
{
"include": "#property-accessor"
},
{
"include": "#after-operator-block"
},
{
"include": "#decl-block"
},
{
"include": "#expression"
},
{
"include": "#punctuation-comma"
},
{
"include": "#punctuation-semicolon"
}
]
},
"type-object": {
"name": "meta.object.type.js",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#type-object-members"
}
]
},
"type-object-members": {
"patterns": [
{
"include": "#comment"
},
{
"include": "#method-declaration"
},
{
"include": "#indexer-declaration"
},
{
"include": "#indexer-mapped-type-declaration"
},
{
"include": "#field-declaration"
},
{
"include": "#type-annotation"
},
{
"begin": "\\.\\.\\.",
"beginCaptures": {
"0": {
"name": "keyword.operator.spread.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#type"
}
]
},
{
"include": "#punctuation-comma"
},
{
"include": "#punctuation-semicolon"
},
{
"include": "#type"
}
]
},
"field-declaration": {
"name": "meta.field.declaration.js",
"begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#variable-initializer"
},
{
"begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"end": "(?=[};,=]|$)|(?<=\\})",
"patterns": [
{
"include": "#type-annotation"
},
{
"include": "#string"
},
{
"include": "#array-literal"
},
{
"include": "#comment"
},
{
"name": "meta.definition.property.js entity.name.function.js",
"match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)"
},
{
"name": "meta.definition.property.js variable.object.property.js",
"match": "[_$[:alpha:]][_$[:alnum:]]*"
},
{
"name": "keyword.operator.optional.js",
"match": "\\?"
}
]
}
]
},
"method-declaration": {
"name": "meta.method.declaration.js",
"begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
"name": "storage.modifier.async.js"
},
"4": {
"name": "storage.type.property.js"
},
"5": {
"name": "keyword.operator.new.js"
},
"6": {
"name": "storage.type.js"
},
"7": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\}|;|,|$)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
"method-declaration-name": {
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
"end": "(?=\\(|\\<)",
"patterns": [
{
"include": "#string"
},
{
"include": "#array-literal"
},
{
"name": "meta.definition.method.js entity.name.function.js",
"match": "[_$[:alpha:]][_$[:alnum:]]*"
},
{
"name": "keyword.operator.optional.js",
"match": "\\?"
}
]
},
"object-literal-method-declaration": {
"name": "meta.method.declaration.js",
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
"beginCaptures": {
"1": {
"name": "storage.modifier.async.js"
},
"2": {
"name": "storage.type.property.js"
},
"3": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\}|;|,)|(?<=\\})",
"patterns": [
{
"include": "#method-declaration-name"
},
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#object-literal-method-overload-declaration"
},
{
"include": "#decl-block"
}
]
},
"object-literal-method-overload-declaration": {
"begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<])",
"beginCaptures": {
"1": {
"name": "storage.modifier.async.js"
},
"2": {
"name": "storage.type.property.js"
},
"3": {
"name": "keyword.generator.asterisk.js"
}
},
"end": "(?=\\(|\\<)",
"patterns": [
{
"include": "#method-declaration-name"
}
]
},
"indexer-declaration": {
"name": "meta.indexer.declaration.js",
"begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "meta.brace.square.js"
},
"3": {
"name": "variable.parameter.js"
}
},
"end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
"name": "meta.brace.square.js"
},
"2": {
"name": "keyword.operator.optional.js"
}
},
"patterns": [
{
"include": "#type-annotation"
}
]
},
"indexer-mapped-type-declaration": {
"name": "meta.indexer.mappedtype.declaration.js",
"begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
"beginCaptures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "meta.brace.square.js"
},
"3": {
"name": "entity.name.type.js"
},
"4": {
"name": "keyword.operator.expression.in.js"
}
},
"end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
"name": "meta.brace.square.js"
},
"2": {
"name": "keyword.operator.optional.js"
}
},
"patterns": [
{
"include": "#type"
}
]
},
"function-declaration": {
"name": "meta.function.js",
"begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
"beginCaptures": {
"1": {
"name": "keyword.control.export.js"
},
"2": {
"name": "storage.modifier.async.js"
},
"3": {
"name": "storage.type.function.js"
},
"4": {
"name": "keyword.generator.asterisk.js"
},
"5": {
"name": "meta.definition.function.js entity.name.function.js"
}
},
"end": "(?=$|;)|(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
"function-expression": {
"name": "meta.function.expression.js",
"begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
"beginCaptures": {
"1": {
"name": "storage.modifier.async.js"
},
"2": {
"name": "storage.type.function.js"
},
"3": {
"name": "keyword.generator.asterisk.js"
},
"4": {
"name": "meta.definition.function.js entity.name.function.js"
}
},
"end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
"include": "#function-parameters"
},
{
"include": "#return-type"
},
{
"include": "#decl-block"
}
]
},
"object-literal": {
"name": "meta.objectliteral.js",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#object-member"
}
]
},
"decl-block": {
"name": "meta.block.js",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#statements"
}
]
},
"after-operator-block": {
"name": "meta.objectliteral.js",
"begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#object-member"
}
]
},
"parameter-name": {
"patterns": [
{
"match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
"captures": {
"1": {
"name": "storage.modifier.js"
}
}
},
{
"match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s*\n (=\\s*(\n (async\\s+) |\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) |\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))\n ) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )))\n )\n)",
"captures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "keyword.operator.rest.js"
},
"3": {
"name": "entity.name.function.js"
},
"4": {
"name": "keyword.operator.optional.js"
}
}
},
{
"match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
"captures": {
"1": {
"name": "storage.modifier.js"
},
"2": {
"name": "keyword.operator.rest.js"
},
"3": {
"name": "variable.parameter.js"
},
"4": {
"name": "keyword.operator.optional.js"
}
}
}
]
},
"destructuring-parameter": {
"patterns": [
{
"name": "meta.parameter.object-binding-pattern.js",
"begin": "(?<!=|:)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"patterns": [
{
"include": "#parameter-object-binding-element"
}
]
},
{
"name": "meta.paramter.array-binding-pattern.js",
"begin": "(?<!=|:)\\s*(\\[)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"patterns": [
{
"include": "#parameter-binding-element"
},
{
"include": "#punctuation-comma"
}
]
}
]
},
"parameter-object-binding-element": {
"patterns": [
{
"include": "#comment"
},
{
"begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
"end": "(?=,|\\})",
"patterns": [
{
"include": "#object-binding-element-propertyName"
},
{
"include": "#parameter-binding-element"
}
]
},
{
"include": "#parameter-object-binding-pattern"
},
{
"include": "#destructuring-parameter-rest"
},
{
"include": "#variable-initializer"
},
{
"include": "#punctuation-comma"
}
]
},
"parameter-binding-element": {
"patterns": [
{
"include": "#comment"
},
{
"include": "#parameter-object-binding-pattern"
},
{
"include": "#parameter-array-binding-pattern"
},
{
"include": "#destructuring-parameter-rest"
},
{
"include": "#variable-initializer"
}
]
},
"destructuring-parameter-rest": {
"match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "variable.parameter.js"
}
}
},
"parameter-object-binding-pattern": {
"begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.object.js"
}
},
"patterns": [
{
"include": "#parameter-object-binding-element"
}
]
},
"parameter-array-binding-pattern": {
"begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
"beginCaptures": {
"1": {
"name": "keyword.operator.rest.js"
},
"2": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.binding-pattern.array.js"
}
},
"patterns": [
{
"include": "#parameter-binding-element"
},
{
"include": "#punctuation-comma"
}
]
},
"return-type": {
"name": "meta.return.type.js",
"begin": "(?<=\\))\\s*(:)",
"beginCaptures": {
"1": {
"name": "keyword.operator.type.annotation.js"
}
},
"end": "(?<!:)((?=$)|(?=[{};,]|//))",
"patterns": [
{
"include": "#comment"
},
{
"name": "meta.object.type.js",
"begin": "(?<=:)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#type-object-members"
}
]
},
{
"include": "#type-predicate-operator"
},
{
"include": "#type"
}
]
},
"type-predicate-operator": {
"name": "keyword.operator.expression.is.js",
"match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
},
"type-annotation": {
"name": "meta.type.annotation.js",
"begin": ":",
"beginCaptures": {
"0": {
"name": "keyword.operator.type.annotation.js"
}
},
"end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#type"
}
]
},
"type": {
"patterns": [
{
"include": "#comment"
},
{
"include": "#string"
},
{
"include": "#numeric-literal"
},
{
"include": "#type-primitive"
},
{
"include": "#type-builtin-literals"
},
{
"include": "#type-parameters"
},
{
"include": "#type-tuple"
},
{
"include": "#type-object"
},
{
"include": "#type-operators"
},
{
"include": "#type-fn-type-parameters"
},
{
"include": "#type-paren-or-function-parameters"
},
{
"include": "#type-function-return-type"
},
{
"include": "#type-name"
}
]
},
"function-parameters": {
"name": "meta.parameters.js",
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "punctuation.definition.parameters.begin.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#decorator"
},
{
"include": "#destructuring-parameter"
},
{
"include": "#parameter-name"
},
{
"include": "#type-annotation"
},
{
"include": "#variable-initializer"
},
{
"name": "punctuation.separator.parameter.js",
"match": ","
}
]
},
"type-primitive": {
"name": "support.type.primitive.js",
"match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
},
"type-builtin-literals": {
"name": "support.type.builtin.js",
"match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$)"
},
"type-paren-or-function-parameters": {
"name": "meta.type.paren.cover.js",
"begin": "\\(",
"beginCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"patterns": [
{
"include": "#type"
},
{
"include": "#function-parameters"
}
]
},
"type-fn-type-parameters": {
"patterns": [
{
"name": "meta.type.constructor.js",
"match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
"captures": {
"1": {
"name": "keyword.control.new.js"
}
}
},
{
"name": "meta.type.constructor.js",
"begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
"beginCaptures": {
"1": {
"name": "keyword.control.new.js"
}
},
"end": "(?<=\\))",
"patterns": [
{
"include": "#function-parameters"
}
]
},
{
"name": "meta.type.function.js",
"begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
"end": "(?<=\\))",
"patterns": [
{
"include": "#function-parameters"
}
]
}
]
},
"type-operators": {
"patterns": [
{
"include": "#typeof-operator"
},
{
"name": "keyword.operator.type.js",
"match": "[&|]"
},
{
"name": "keyword.operator.expression.keyof.js",
"match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
}
]
},
"type-function-return-type": {
"name": "meta.type.function.return.js",
"begin": "=>",
"beginCaptures": {
"0": {
"name": "storage.type.function.arrow.js"
}
},
"end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
"patterns": [
{
"include": "#comment"
},
{
"name": "meta.object.type.js",
"begin": "(?<==>)\\s*(\\{)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.block.js"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#type-object-members"
}
]
},
{
"include": "#type-predicate-operator"
},
{
"include": "#type"
}
]
},
"type-tuple": {
"name": "meta.type.tuple.js",
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "meta.brace.square.js"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "meta.brace.square.js"
}
},
"patterns": [
{
"include": "#type"
},
{
"include": "#punctuation-comma"
}
]
},
"type-name": {
"patterns": [
{
"match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
"captures": {
"1": {
"name": "entity.name.type.module.js"
},
"2": {
"name": "punctuation.accessor.js"
}
}
},
{
"name": "entity.name.type.js",
"match": "[_$[:alpha:]][_$[:alnum:]]*"
}
]
},
"type-parameters": {
"name": "meta.type.parameters.js",
"begin": "(<)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.typeparameters.begin.js"
}
},
"end": "(?=$)|(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.typeparameters.end.js"
}
},
"patterns": [
{
"include": "#comment"
},
{
"name": "storage.modifier.js",
"match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
},
{
"name": "keyword.operator.assignment.js",
"match": "\\=(?!>)"
},
{
"include": "#type"
},
{
"include": "#punctuation-comma"
}
]
},
"variable-initializer": {
"patterns": [
{
"begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)",
"beginCaptures": {
"1": {
"name": "keyword.operator.assignment.js"
}
},
"end": "(?=$|[,);}\\]])",
"patterns": [
{
"include": "#expression"
}
]
},
{
"begin": "(?<!=|!)(=)(?!=)",
"beginCaptures": {
"1": {
"name": "keyword.operator.assignment.js"
}
},
"end": "(?=[,);}\\]])|(?=^\\s*$)",
"patterns": [
{
"include": "#expression"
}
]
}
]
},
"for-loop": {
"begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
"beginCaptures": {
"1": {
"name": "keyword.control.loop.js"
},
"2": {
"name": "keyword.control.loop.js"
},
"3": {
"name": "meta.brace.round.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"patterns": [
{
"include": "#var-expr"
},
{
"include": "#expression"
},
{
"include": "#punctuation-semicolon"
}
]
},
"switch-expression": {
"name": "switch-expression.expr.js",
"begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "keyword.control.switch.js"
},
"2": {
"name": "meta.brace.round.js"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "meta.brace.round.js"
}
},
"patterns": [
{
"include": "#expression"
}
]
},
"switch-block": {
"name": "switch-block.expr.js",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"end": "(?=\\})",
"patterns": [
{
"include": "#case-clause"
},
{
"include": "#statements"
}
]
},
"case-clause": {
"name": "case-clause.expr.js",
"begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
"beginCaptures": {
"1": {
"name": "keyword.control.switch.js"
}
},
"end": ":",
"endCaptures": {
"0": {
"name": "punctuation.definition.section.case-statement.js"
}
},
"patterns": [
{
"include": "#expression"
}
]
},
"switch-statement": {
"name": "switch-statement.expr.js",
"begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.definition.block.js"
}
},
"patterns": [
{
"include": "#switch-expression"
},
{
"include": "#switch-block"
}
]
},
"support-objects": {
"patterns": [
{
"name": "variable.language.arguments.js",
"match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
},
{
"name": "support.class.builtin.js",
"match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
},
{
"name": "support.class.error.js",
"match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
},
{
"name": "support.function.js",
"match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\() "
},
{
"match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
"captures": {
"1": {
"name": "support.constant.math.js"
},
"2": {
"name": "punctuation.accessor.js"
},
"3": {
"name": "support.function.math.js"
},
"4": {
"name": "support.constant.property.math.js"
}
}
},
{
"match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
"captures": {
"1": {
"name": "support.class.console.js"
},
"2": {
"name": "punctuation.accessor.js"
},
"3": {
"name": "support.function.console.js"
}
}
},
{
"match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
"captures