You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
399 lines
15 KiB
JSON
399 lines
15 KiB
JSON
3 years ago
|
{
|
||
|
"aliases": [
|
||
|
"js",
|
||
|
"jsx",
|
||
|
"mjs",
|
||
|
"cjs"
|
||
|
],
|
||
|
"keywords": {
|
||
|
"keyword": "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",
|
||
|
"literal": "true false null undefined NaN Infinity",
|
||
|
"built_in": "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"
|
||
|
},
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "meta",
|
||
|
"relevance": 10,
|
||
|
"begin": "^\\s*['\"]use (strict|asm)['\"]"
|
||
|
},
|
||
|
{
|
||
|
"className": "meta",
|
||
|
"begin": "^#!",
|
||
|
"end": "$"
|
||
|
},
|
||
|
{
|
||
|
"className": "string",
|
||
|
"begin": "'",
|
||
|
"end": "'",
|
||
|
"illegal": "\\n",
|
||
|
"contains": [
|
||
|
{
|
||
|
"begin": "\\\\[\\s\\S]",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"className": "string",
|
||
|
"begin": "\"",
|
||
|
"end": "\"",
|
||
|
"illegal": "\\n",
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"begin": "html`",
|
||
|
"end": "",
|
||
|
"starts": {
|
||
|
"end": "`",
|
||
|
"returnEnd": false,
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"className": "subst",
|
||
|
"begin": "\\$\\{",
|
||
|
"end": "\\}",
|
||
|
"keywords": {
|
||
|
"$ref": "#keywords"
|
||
|
},
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.3"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4"
|
||
|
},
|
||
|
{
|
||
|
"begin": "css`",
|
||
|
"end": "",
|
||
|
"starts": {
|
||
|
"end": "`",
|
||
|
"returnEnd": false,
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1"
|
||
|
}
|
||
|
],
|
||
|
"subLanguage": "css"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"className": "string",
|
||
|
"begin": "`",
|
||
|
"end": "`",
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"className": "number",
|
||
|
"variants": [
|
||
|
{
|
||
|
"begin": "\\b(0[bB][01]+)n?"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\b(0[oO][0-7]+)n?"
|
||
|
},
|
||
|
{
|
||
|
"begin": "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)n?"
|
||
|
}
|
||
|
],
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "regexp",
|
||
|
"begin": "\\\/",
|
||
|
"end": "\\\/[gimuy]*",
|
||
|
"illegal": "\\n",
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\[",
|
||
|
"end": "\\]",
|
||
|
"relevance": 0,
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2.contains.0"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"subLanguage": "xml"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.3"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.4"
|
||
|
},
|
||
|
{
|
||
|
"className": "comment",
|
||
|
"begin": "\/\/",
|
||
|
"end": "$",
|
||
|
"contains": [
|
||
|
{
|
||
|
"begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
|
||
|
},
|
||
|
{
|
||
|
"className": "doctag",
|
||
|
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"className": "comment",
|
||
|
"begin": "\/\\*\\*",
|
||
|
"end": "\\*\/",
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "doctag",
|
||
|
"begin": "@[A-Za-z]+",
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "type",
|
||
|
"begin": "\\{",
|
||
|
"end": "\\}",
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "variable",
|
||
|
"begin": "[A-Za-z$_][0-9A-Za-z$_]*(?=\\s*(-)|$)",
|
||
|
"endsParent": true,
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"begin": "(?=[^\\n])\\s",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.7.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"className": "doctag",
|
||
|
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
],
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "comment",
|
||
|
"begin": "\/\\*",
|
||
|
"end": "\\*\/",
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.7.contains.0"
|
||
|
},
|
||
|
{
|
||
|
"className": "doctag",
|
||
|
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.5"
|
||
|
},
|
||
|
{
|
||
|
"begin": "[{,\\n]\\s*",
|
||
|
"relevance": 0,
|
||
|
"contains": [
|
||
|
{
|
||
|
"begin": "[A-Za-z$_][0-9A-Za-z$_]*\\s*:",
|
||
|
"returnBegin": true,
|
||
|
"relevance": 0,
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "attr",
|
||
|
"begin": "[A-Za-z$_][0-9A-Za-z$_]*",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"begin": "(!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|\/=|\/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~|\\b(case|return|throw)\\b)\\s*",
|
||
|
"keywords": "return throw case",
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.7"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.9"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.6"
|
||
|
},
|
||
|
{
|
||
|
"className": "function",
|
||
|
"begin": "(\\(.*?\\)|[A-Za-z$_][0-9A-Za-z$_]*)\\s*=>",
|
||
|
"returnBegin": true,
|
||
|
"end": "\\s*=>",
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "params",
|
||
|
"variants": [
|
||
|
{
|
||
|
"begin": "[A-Za-z$_][0-9A-Za-z$_]*"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\(\\s*\\)"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\(",
|
||
|
"end": "\\)",
|
||
|
"excludeBegin": true,
|
||
|
"excludeEnd": true,
|
||
|
"keywords": {
|
||
|
"$ref": "#keywords"
|
||
|
},
|
||
|
"contains": [
|
||
|
{
|
||
|
"$ref": "#contains.2"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.3"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.3"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.4"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.5"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.4.starts.contains.1.contains.6"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.9"
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#contains.7"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"className": "",
|
||
|
"begin": "\\s",
|
||
|
"end": "\\s*",
|
||
|
"skip": true
|
||
|
},
|
||
|
{
|
||
|
"variants": [
|
||
|
{
|
||
|
"begin": "<>",
|
||
|
"end": "<\/>"
|
||
|
},
|
||
|
{
|
||
|
"begin": "<[A-Za-z0-9\\\\._:-]+",
|
||
|
"end": "\\\/[A-Za-z0-9\\\\._:-]+>|\\\/>"
|
||
|
}
|
||
|
],
|
||
|
"subLanguage": "xml",
|
||
|
"contains": [
|
||
|
{
|
||
|
"begin": "<[A-Za-z0-9\\\\._:-]+",
|
||
|
"end": "\\\/[A-Za-z0-9\\\\._:-]+>|\\\/>",
|
||
|
"skip": true,
|
||
|
"contains": [
|
||
|
"self"
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "function",
|
||
|
"beginKeywords": "function",
|
||
|
"end": "\\{",
|
||
|
"excludeEnd": true,
|
||
|
"contains": [
|
||
|
{
|
||
|
"className": "title",
|
||
|
"begin": "[A-Za-z$_][0-9A-Za-z$_]*",
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "params",
|
||
|
"begin": "\\(",
|
||
|
"end": "\\)",
|
||
|
"excludeBegin": true,
|
||
|
"excludeEnd": true,
|
||
|
"contains": {
|
||
|
"$ref": "#contains.12.contains.3.contains.0.variants.2.contains"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"illegal": "\\[|%"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\$[(.]"
|
||
|
},
|
||
|
{
|
||
|
"begin": "\\.\\s*[a-zA-Z_]\\w*",
|
||
|
"relevance": 0
|
||
|
},
|
||
|
{
|
||
|
"className": "class",
|
||
|
"beginKeywords": "class",
|
||
|
"end": "[{;=]",
|
||
|
"excludeEnd": true,
|
||
|
"illegal": "[:\"\\[\\]]",
|
||
|
"contains": [
|
||
|
{
|
||
|
"beginKeywords": "extends"
|
||
|
},
|
||
|
{
|
||
|
"className": "title",
|
||
|
"begin": "[a-zA-Z_]\\w*",
|
||
|
"relevance": 0
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"beginKeywords": "constructor get set",
|
||
|
"end": "\\{",
|
||
|
"excludeEnd": true
|
||
|
}
|
||
|
],
|
||
|
"illegal": "#(?!!)"
|
||
|
}
|