更换版本

This commit is contained in:
2024-01-22 18:48:00 +08:00
parent 9f65ea8fd9
commit 00e6dcaec0
1158 changed files with 70609 additions and 51780 deletions

View File

@@ -0,0 +1,46 @@
module.exports = function (e) {
var t = {
className: "variable",
variants: [{ begin: /\$[\w\d#@][\w\d_]*/ }, { begin: /\$\{(.*?)}/ }],
},
s = {
className: "string",
begin: /"/,
end: /"/,
contains: [
e.BACKSLASH_ESCAPE,
t,
{
className: "variable",
begin: /\$\(/,
end: /\)/,
contains: [e.BACKSLASH_ESCAPE],
},
],
};
return {
aliases: ["sh", "zsh"],
lexemes: /\b-?[a-z\._]+\b/,
keywords: {
keyword: "if then else elif fi for while in do done case esac function",
literal: "true false",
built_in:
"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",
_: "-ne -eq -lt -gt -f -d -e -s -l -a",
},
contains: [
{ className: "meta", begin: /^#![^\n]+sh\s*$/, relevance: 10 },
{
className: "function",
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
returnBegin: !0,
contains: [e.inherit(e.TITLE_MODE, { begin: /\w[\w\d_]*/ })],
relevance: 0,
},
e.HASH_COMMENT_MODE,
s,
{ className: "string", begin: /'/, end: /'/ },
t,
],
};
};

View File

@@ -0,0 +1,103 @@
module.exports = function (e) {
var n = {
keyword:
"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",
literal: "true false null undefined yes no on off",
built_in: "npm require console print module global window document",
},
i = "[A-Za-z$_][0-9A-Za-z$_]*",
s = { className: "subst", begin: /#\{/, end: /}/, keywords: n },
a = [
e.BINARY_NUMBER_MODE,
e.inherit(e.C_NUMBER_MODE, { starts: { end: "(\\s*/)?", relevance: 0 } }),
{
className: "string",
variants: [
{ begin: /'''/, end: /'''/, contains: [e.BACKSLASH_ESCAPE] },
{ begin: /'/, end: /'/, contains: [e.BACKSLASH_ESCAPE] },
{ begin: /"""/, end: /"""/, contains: [e.BACKSLASH_ESCAPE, s] },
{ begin: /"/, end: /"/, contains: [e.BACKSLASH_ESCAPE, s] },
],
},
{
className: "regexp",
variants: [
{ begin: "///", end: "///", contains: [s, e.HASH_COMMENT_MODE] },
{ begin: "//[gim]*", relevance: 0 },
{ begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/ },
],
},
{ begin: "@" + i },
{
subLanguage: "javascript",
excludeBegin: !0,
excludeEnd: !0,
variants: [
{ begin: "```", end: "```" },
{ begin: "`", end: "`" },
],
},
];
s.contains = a;
var t = e.inherit(e.TITLE_MODE, { begin: i }),
r = "(\\(.*\\))?\\s*\\B[-=]>",
o = {
className: "params",
begin: "\\([^\\(]",
returnBegin: !0,
contains: [
{ begin: /\(/, end: /\)/, keywords: n, contains: ["self"].concat(a) },
],
};
return {
aliases: ["coffee", "cson", "iced"],
keywords: n,
illegal: /\/\*/,
contains: a.concat([
e.COMMENT("###", "###"),
e.HASH_COMMENT_MODE,
{
className: "function",
begin: "^\\s*" + i + "\\s*=\\s*" + r,
end: "[-=]>",
returnBegin: !0,
contains: [t, o],
},
{
begin: /[:\(,=]\s*/,
relevance: 0,
contains: [
{
className: "function",
begin: r,
end: "[-=]>",
returnBegin: !0,
contains: [o],
},
],
},
{
className: "class",
beginKeywords: "class",
end: "$",
illegal: /[:="\[\]]/,
contains: [
{
beginKeywords: "extends",
endsWithParent: !0,
illegal: /[:="\[\]]/,
contains: [t],
},
t,
],
},
{
begin: i + ":",
end: ":",
returnBegin: !0,
returnEnd: !0,
relevance: 0,
},
]),
};
};

View File

@@ -0,0 +1,86 @@
module.exports = function (e) {
var n = {
begin: /[A-Z\_\.\-]+\s*:/,
returnBegin: !0,
end: ";",
endsWithParent: !0,
contains: [
{
className: "attribute",
begin: /\S/,
end: ":",
excludeEnd: !0,
starts: {
endsWithParent: !0,
excludeEnd: !0,
contains: [
{
begin: /[\w-]+\(/,
returnBegin: !0,
contains: [
{ className: "built_in", begin: /[\w-]+/ },
{
begin: /\(/,
end: /\)/,
contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE],
},
],
},
e.CSS_NUMBER_MODE,
e.QUOTE_STRING_MODE,
e.APOS_STRING_MODE,
e.C_BLOCK_COMMENT_MODE,
{ className: "number", begin: "#[0-9A-Fa-f]+" },
{ className: "meta", begin: "!important" },
],
},
},
],
};
return {
case_insensitive: !0,
illegal: /[=\/|'\$]/,
contains: [
e.C_BLOCK_COMMENT_MODE,
{ className: "selector-id", begin: /#[A-Za-z0-9_-]+/ },
{ className: "selector-class", begin: /\.[A-Za-z0-9_-]+/ },
{ className: "selector-attr", begin: /\[/, end: /\]/, illegal: "$" },
{ className: "selector-pseudo", begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/ },
{
begin: "@(font-face|page)",
lexemes: "[a-z-]+",
keywords: "font-face page",
},
{
begin: "@",
end: "[{;]",
illegal: /:/,
contains: [
{ className: "keyword", begin: /\w+/ },
{
begin: /\s/,
endsWithParent: !0,
excludeEnd: !0,
relevance: 0,
contains: [
e.APOS_STRING_MODE,
e.QUOTE_STRING_MODE,
e.CSS_NUMBER_MODE,
],
},
],
},
{
className: "selector-tag",
begin: "[a-zA-Z-][a-zA-Z0-9_-]*",
relevance: 0,
},
{
begin: "{",
end: "}",
illegal: /\S/,
contains: [e.C_BLOCK_COMMENT_MODE, n],
},
],
};
};

View File

@@ -0,0 +1,24 @@
module.exports = function (d) {
return {
aliases: ["bind", "zone"],
keywords: {
keyword:
"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT",
},
contains: [
d.COMMENT(";", "$", { relevance: 0 }),
{ className: "meta", begin: /^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/ },
{
className: "number",
begin:
"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b",
},
{
className: "number",
begin:
"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b",
},
d.inherit(d.NUMBER_MODE, { begin: /\b\d+[dhwm]?/ }),
],
};
};

View File

@@ -0,0 +1,30 @@
module.exports = function (e) {
var r = e.COMMENT(/^\s*@?rem\b/, /$/, { relevance: 10 });
return {
aliases: ["bat", "cmd"],
case_insensitive: !0,
illegal: /\/\*/,
keywords: {
keyword:
"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",
built_in:
"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del",
},
contains: [
{ className: "variable", begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/ },
{
className: "function",
begin: "^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",
end: "goto:eof",
contains: [
e.inherit(e.TITLE_MODE, {
begin: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*",
}),
r,
],
},
{ className: "number", begin: "\\b\\d+", relevance: 0 },
r,
],
};
};

View File

@@ -0,0 +1,96 @@
module.exports = function (e) {
var n = "[a-z'][a-zA-Z0-9_']*",
i = "(" + n + ":" + n + "|" + n + ")",
r = {
keyword:
"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",
literal: "false true",
},
a = e.COMMENT("%", "$"),
c = {
className: "number",
begin: "\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",
relevance: 0,
},
s = { begin: "fun\\s+" + n + "/\\d+" },
d = {
begin: i + "\\(",
end: "\\)",
returnBegin: !0,
relevance: 0,
contains: [
{ begin: i, relevance: 0 },
{
begin: "\\(",
end: "\\)",
endsWithParent: !0,
returnEnd: !0,
relevance: 0,
},
],
},
o = { begin: "{", end: "}", relevance: 0 },
t = { begin: "\\b_([A-Z][A-Za-z0-9_]*)?", relevance: 0 },
l = { begin: "[A-Z][a-zA-Z0-9_]*", relevance: 0 },
b = {
begin: "#" + e.UNDERSCORE_IDENT_RE,
relevance: 0,
returnBegin: !0,
contains: [
{ begin: "#" + e.UNDERSCORE_IDENT_RE, relevance: 0 },
{ begin: "{", end: "}", relevance: 0 },
],
},
g = { beginKeywords: "fun receive if try case", end: "end", keywords: r };
g.contains = [
a,
s,
e.inherit(e.APOS_STRING_MODE, { className: "" }),
g,
d,
e.QUOTE_STRING_MODE,
c,
o,
t,
l,
b,
];
var E = [a, s, g, d, e.QUOTE_STRING_MODE, c, o, t, l, b];
(d.contains[1].contains = E), (o.contains = E), (b.contains[1].contains = E);
var u = { className: "params", begin: "\\(", end: "\\)", contains: E };
return {
aliases: ["erl"],
keywords: r,
illegal: "(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",
contains: [
{
className: "function",
begin: "^" + n + "\\s*\\(",
end: "->",
returnBegin: !0,
illegal: "\\(|#|//|/\\*|\\\\|:|;",
contains: [u, e.inherit(e.TITLE_MODE, { begin: n })],
starts: { end: ";|\\.", keywords: r, contains: E },
},
a,
{
begin: "^-",
end: "\\.",
relevance: 0,
excludeEnd: !0,
returnBegin: !0,
lexemes: "-" + e.IDENT_RE,
keywords:
"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",
contains: [u],
},
c,
e.QUOTE_STRING_MODE,
b,
t,
l,
o,
{ begin: /\.$/ },
],
};
};

View File

@@ -0,0 +1,49 @@
module.exports = function (e) {
var a =
"action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",
n =
(e.QUOTE_STRING_MODE,
{
endsWithParent: !0,
relevance: 0,
keywords: { keyword: "as", built_in: a },
contains: [
e.QUOTE_STRING_MODE,
{
illegal: /\}\}/,
begin: /[a-zA-Z0-9_]+=/,
returnBegin: !0,
relevance: 0,
contains: [{ className: "attr", begin: /[a-zA-Z0-9_]+/ }],
},
e.NUMBER_MODE,
],
});
return {
case_insensitive: !0,
subLanguage: "xml",
contains: [
e.COMMENT("{{!(--)?", "(--)?}}"),
{
className: "template-tag",
begin: /\{\{[#\/]/,
end: /\}\}/,
contains: [
{
className: "name",
begin: /[a-zA-Z\.\-]+/,
keywords: { "builtin-name": a },
starts: n,
},
],
},
{
className: "template-variable",
begin: /\{\{[a-zA-Z][a-zA-Z\-]+/,
end: /\}\}/,
keywords: { keyword: "as", built_in: a },
contains: [e.QUOTE_STRING_MODE],
},
],
};
};

View File

@@ -0,0 +1,39 @@
module.exports = function (e) {
var n = "HTTP/[0-9\\.]+";
return {
aliases: ["https"],
illegal: "\\S",
contains: [
{
begin: "^" + n,
end: "$",
contains: [{ className: "number", begin: "\\b\\d{3}\\b" }],
},
{
begin: "^[A-Z]+ (.*?) " + n + "$",
returnBegin: !0,
end: "$",
contains: [
{
className: "string",
begin: " ",
end: " ",
excludeBegin: !0,
excludeEnd: !0,
},
{ begin: n },
{ className: "keyword", begin: "[A-Z]+" },
],
},
{
className: "attribute",
begin: "^\\w",
end: ": ",
excludeEnd: !0,
illegal: "\\n|\\s|=",
starts: { end: "$", relevance: 0 },
},
{ begin: "\\n\\n", starts: { subLanguage: [], endsWithParent: !0 } },
],
};
};

View File

@@ -0,0 +1,141 @@
module.exports = function (e) {
var n = "[A-Za-z$_][0-9A-Za-z$_]*",
a = {
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",
},
r = {
className: "number",
variants: [
{ begin: "\\b(0[bB][01]+)" },
{ begin: "\\b(0[oO][0-7]+)" },
{ begin: e.C_NUMBER_RE },
],
relevance: 0,
},
s = {
className: "subst",
begin: "\\$\\{",
end: "\\}",
keywords: a,
contains: [],
},
i = {
className: "string",
begin: "`",
end: "`",
contains: [e.BACKSLASH_ESCAPE, s],
};
s.contains = [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, i, r, e.REGEXP_MODE];
var t = s.contains.concat([e.C_BLOCK_COMMENT_MODE, e.C_LINE_COMMENT_MODE]);
return {
aliases: ["js", "jsx"],
keywords: a,
contains: [
{
className: "meta",
relevance: 10,
begin: /^\s*['"]use (strict|asm)['"]/,
},
{ className: "meta", begin: /^#!/, end: /$/ },
e.APOS_STRING_MODE,
e.QUOTE_STRING_MODE,
i,
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
r,
{
begin: /[{,]\s*/,
relevance: 0,
contains: [
{
begin: n + "\\s*:",
returnBegin: !0,
relevance: 0,
contains: [{ className: "attr", begin: n, relevance: 0 }],
},
],
},
{
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
keywords: "return throw case",
contains: [
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
e.REGEXP_MODE,
{
className: "function",
begin: "(\\(.*?\\)|" + n + ")\\s*=>",
returnBegin: !0,
end: "\\s*=>",
contains: [
{
className: "params",
variants: [
{ begin: n },
{ begin: /\(\s*\)/ },
{
begin: /\(/,
end: /\)/,
excludeBegin: !0,
excludeEnd: !0,
keywords: a,
contains: t,
},
],
},
],
},
{
begin: /</,
end: /(\/\w+|\w+\/)>/,
subLanguage: "xml",
contains: [
{ begin: /<\w+\s*\/>/, skip: !0 },
{
begin: /<\w+/,
end: /(\/\w+|\w+\/)>/,
skip: !0,
contains: [{ begin: /<\w+\s*\/>/, skip: !0 }, "self"],
},
],
},
],
relevance: 0,
},
{
className: "function",
beginKeywords: "function",
end: /\{/,
excludeEnd: !0,
contains: [
e.inherit(e.TITLE_MODE, { begin: n }),
{
className: "params",
begin: /\(/,
end: /\)/,
excludeBegin: !0,
excludeEnd: !0,
contains: t,
},
],
illegal: /\[|%/,
},
{ begin: /\$[(.]/ },
e.METHOD_GUARD,
{
className: "class",
beginKeywords: "class",
end: /[{;=]/,
excludeEnd: !0,
illegal: /[:"\[\]]/,
contains: [{ beginKeywords: "extends" }, e.UNDERSCORE_TITLE_MODE],
},
{ beginKeywords: "constructor", end: /\{/, excludeEnd: !0 },
],
illegal: /#(?!!)/,
};
};

View File

@@ -0,0 +1,30 @@
module.exports = function (e) {
var n = { literal: "true false null" },
l = [e.QUOTE_STRING_MODE, e.C_NUMBER_MODE],
i = {
end: ",",
endsWithParent: !0,
excludeEnd: !0,
contains: l,
keywords: n,
},
t = {
begin: "{",
end: "}",
contains: [
{
className: "attr",
begin: /"/,
end: /"/,
contains: [e.BACKSLASH_ESCAPE],
illegal: "\\n",
},
e.inherit(i, { begin: /:/ }),
],
illegal: "\\S",
},
a = { begin: "\\[", end: "\\]", contains: [e.inherit(i)], illegal: "\\S" };
return (
l.splice(l.length, 0, t, a), { contains: l, keywords: n, illegal: "\\S" }
);
};

View File

@@ -0,0 +1,106 @@
module.exports = function (e) {
var n = "[\\w-]+",
a = "([\\w-]+|@{[\\w-]+})",
t = [],
s = [],
r = function (e) {
return { className: "string", begin: "~?" + e + ".*?" + e };
},
i = function (e, n, a) {
return { className: e, begin: n, relevance: a };
},
c = { begin: "\\(", end: "\\)", contains: s, relevance: 0 };
s.push(
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
r("'"),
r('"'),
e.CSS_NUMBER_MODE,
{
begin: "(url|data-uri)\\(",
starts: { className: "string", end: "[\\)\\n]", excludeEnd: !0 },
},
i("number", "#[0-9A-Fa-f]+\\b"),
c,
i("variable", "@@?" + n, 10),
i("variable", "@{[\\w-]+}"),
i("built_in", "~?`[^`]*?`"),
{
className: "attribute",
begin: n + "\\s*:",
end: ":",
returnBegin: !0,
excludeEnd: !0,
},
{ className: "meta", begin: "!important" }
);
var l = s.concat({ begin: "{", end: "}", contains: t }),
o = {
beginKeywords: "when",
endsWithParent: !0,
contains: [{ beginKeywords: "and not" }].concat(s),
},
d = {
begin: a + "\\s*:",
returnBegin: !0,
end: "[;}]",
relevance: 0,
contains: [
{
className: "attribute",
begin: a,
end: ":",
excludeEnd: !0,
starts: {
endsWithParent: !0,
illegal: "[<=$]",
relevance: 0,
contains: s,
},
},
],
},
b = {
className: "keyword",
begin:
"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
starts: { end: "[;{}]", returnEnd: !0, contains: s, relevance: 0 },
},
g = {
className: "variable",
variants: [{ begin: "@[\\w-]+\\s*:", relevance: 15 }, { begin: "@" + n }],
starts: { end: "[;}]", returnEnd: !0, contains: l },
},
u = {
variants: [
{ begin: "[\\.#:&\\[>]", end: "[;{}]" },
{ begin: a, end: "{" },
],
returnBegin: !0,
returnEnd: !0,
illegal: "[<='$\"]",
relevance: 0,
contains: [
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
o,
i("keyword", "all\\b"),
i("variable", "@{[\\w-]+}"),
i("selector-tag", a + "%?", 0),
i("selector-id", "#" + a),
i("selector-class", "\\." + a, 0),
i("selector-tag", "&", 0),
{ className: "selector-attr", begin: "\\[", end: "\\]" },
{
className: "selector-pseudo",
begin: /:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/,
},
{ begin: "\\(", end: "\\)", contains: l },
{ begin: "!important" },
],
};
return (
t.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, b, g, d, u),
{ case_insensitive: !0, illegal: "[=>'/<($\"]", contains: t }
);
};

View File

@@ -0,0 +1,58 @@
module.exports = function (e) {
var i = {
className: "variable",
variants: [
{
begin: "\\$\\(" + e.UNDERSCORE_IDENT_RE + "\\)",
contains: [e.BACKSLASH_ESCAPE],
},
{ begin: /\$[@%<?\^\+\*]/ },
],
},
n = {
className: "string",
begin: /"/,
end: /"/,
contains: [e.BACKSLASH_ESCAPE, i],
},
a = {
className: "variable",
begin: /\$\([\w-]+\s/,
end: /\)/,
keywords: {
built_in:
"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value",
},
contains: [i],
},
s = {
begin: "^" + e.UNDERSCORE_IDENT_RE + "\\s*[:+?]?=",
illegal: "\\n",
returnBegin: !0,
contains: [
{ begin: "^" + e.UNDERSCORE_IDENT_RE, end: "[:+?]?=", excludeEnd: !0 },
],
},
r = { className: "section", begin: /^[^\s]+:/, end: /$/, contains: [i] };
return {
aliases: ["mk", "mak"],
keywords:
"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath",
lexemes: /[\w-]+/,
contains: [
e.HASH_COMMENT_MODE,
i,
n,
a,
s,
{
className: "meta",
begin: /^\.PHONY:/,
end: /$/,
keywords: { "meta-keyword": ".PHONY" },
lexemes: /[\.\w]+/,
},
r,
],
};
};

View File

@@ -0,0 +1,81 @@
module.exports = function (e) {
var n = {
className: "variable",
variants: [
{ begin: /\$\d+/ },
{ begin: /\$\{/, end: /}/ },
{ begin: "[\\$\\@]" + e.UNDERSCORE_IDENT_RE },
],
},
a = {
endsWithParent: !0,
lexemes: "[a-z/_]+",
keywords: {
literal:
"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll",
},
relevance: 0,
illegal: "=>",
contains: [
e.HASH_COMMENT_MODE,
{
className: "string",
contains: [e.BACKSLASH_ESCAPE, n],
variants: [
{ begin: /"/, end: /"/ },
{ begin: /'/, end: /'/ },
],
},
{
begin: "([a-z]+):/",
end: "\\s",
endsWithParent: !0,
excludeEnd: !0,
contains: [n],
},
{
className: "regexp",
contains: [e.BACKSLASH_ESCAPE, n],
variants: [
{ begin: "\\s\\^", end: "\\s|{|;", returnEnd: !0 },
{ begin: "~\\*?\\s+", end: "\\s|{|;", returnEnd: !0 },
{ begin: "\\*(\\.[a-z\\-]+)+" },
{ begin: "([a-z\\-]+\\.)+\\*" },
],
},
{
className: "number",
begin: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b",
},
{
className: "number",
begin: "\\b\\d+[kKmMgGdshdwy]*\\b",
relevance: 0,
},
n,
],
};
return {
aliases: ["nginxconf"],
contains: [
e.HASH_COMMENT_MODE,
{
begin: e.UNDERSCORE_IDENT_RE + "\\s+{",
returnBegin: !0,
end: "{",
contains: [{ className: "section", begin: e.UNDERSCORE_IDENT_RE }],
relevance: 0,
},
{
begin: e.UNDERSCORE_IDENT_RE + "\\s",
end: ";|{",
returnBegin: !0,
contains: [
{ className: "attribute", begin: e.UNDERSCORE_IDENT_RE, starts: a },
],
relevance: 0,
},
],
illegal: "[^\\s\\}]",
};
};

View File

@@ -0,0 +1,76 @@
module.exports = function (e) {
var t = { className: "variable", begin: "(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b" },
i = { className: "number", begin: "#[0-9A-Fa-f]+" };
return (
e.CSS_NUMBER_MODE,
e.QUOTE_STRING_MODE,
e.APOS_STRING_MODE,
e.C_BLOCK_COMMENT_MODE,
{
case_insensitive: !0,
illegal: "[=/|']",
contains: [
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
{ className: "selector-id", begin: "\\#[A-Za-z0-9_-]+", relevance: 0 },
{
className: "selector-class",
begin: "\\.[A-Za-z0-9_-]+",
relevance: 0,
},
{ className: "selector-attr", begin: "\\[", end: "\\]", illegal: "$" },
{
className: "selector-tag",
begin:
"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",
relevance: 0,
},
{
begin:
":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)",
},
{
begin:
"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)",
},
t,
{
className: "attribute",
begin:
"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",
illegal: "[^\\s]",
},
{
begin:
"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b",
},
{
begin: ":",
end: ";",
contains: [
t,
i,
e.CSS_NUMBER_MODE,
e.QUOTE_STRING_MODE,
e.APOS_STRING_MODE,
{ className: "meta", begin: "!important" },
],
},
{
begin: "@",
end: "[{;]",
keywords:
"mixin include extend for if else each while charset import debug media page content font-face namespace warn",
contains: [
t,
e.QUOTE_STRING_MODE,
e.APOS_STRING_MODE,
i,
e.CSS_NUMBER_MODE,
{ begin: "\\s[A-Za-z0-9_.-]+", relevance: 0 },
],
},
],
}
);
};

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,127 @@
module.exports = function (e) {
var n = {
keyword:
"in 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 class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",
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 any number boolean string void Promise",
};
return {
aliases: ["ts"],
keywords: n,
contains: [
{ className: "meta", begin: /^\s*['"]use strict['"]/ },
e.APOS_STRING_MODE,
e.QUOTE_STRING_MODE,
{
className: "string",
begin: "`",
end: "`",
contains: [
e.BACKSLASH_ESCAPE,
{ className: "subst", begin: "\\$\\{", end: "\\}" },
],
},
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
{
className: "number",
variants: [
{ begin: "\\b(0[bB][01]+)" },
{ begin: "\\b(0[oO][0-7]+)" },
{ begin: e.C_NUMBER_RE },
],
relevance: 0,
},
{
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
keywords: "return throw case",
contains: [
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
e.REGEXP_MODE,
{
className: "function",
begin: "(\\(.*?\\)|" + e.IDENT_RE + ")\\s*=>",
returnBegin: !0,
end: "\\s*=>",
contains: [
{
className: "params",
variants: [
{ begin: e.IDENT_RE },
{ begin: /\(\s*\)/ },
{
begin: /\(/,
end: /\)/,
excludeBegin: !0,
excludeEnd: !0,
keywords: n,
contains: [
"self",
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
],
},
],
},
],
},
],
relevance: 0,
},
{
className: "function",
begin: "function",
end: /[\{;]/,
excludeEnd: !0,
keywords: n,
contains: [
"self",
e.inherit(e.TITLE_MODE, { begin: /[A-Za-z$_][0-9A-Za-z$_]*/ }),
{
className: "params",
begin: /\(/,
end: /\)/,
excludeBegin: !0,
excludeEnd: !0,
keywords: n,
contains: [e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE],
illegal: /["'\(]/,
},
],
illegal: /%/,
relevance: 0,
},
{
beginKeywords: "constructor",
end: /\{/,
excludeEnd: !0,
contains: [
"self",
{
className: "params",
begin: /\(/,
end: /\)/,
excludeBegin: !0,
excludeEnd: !0,
keywords: n,
contains: [e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE],
illegal: /["'\(]/,
},
],
},
{ begin: /module\./, keywords: { built_in: "module" }, relevance: 0 },
{ beginKeywords: "module", end: /\{/, excludeEnd: !0 },
{
beginKeywords: "interface",
end: /\{/,
excludeEnd: !0,
keywords: "interface extends",
},
{ begin: /\$[(.]/ },
{ begin: "\\." + e.IDENT_RE, relevance: 0 },
{ className: "meta", begin: "@[A-Za-z]+" },
],
};
};