@aiao/code-editor 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apl-B2DGVGxc.js +76 -0
- package/dist/asciiarmor-2LVJmxlE.js +34 -0
- package/dist/asn1-jKiBa2Ya.js +95 -0
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/brainfuck-C_p9pTT8.js +34 -0
- package/dist/clike-BMALKCNj.js +620 -0
- package/dist/clojure-CCKyeQKf.js +800 -0
- package/dist/cmake-CuaCgAKt.js +28 -0
- package/dist/cobol-BlTKFDRj.js +72 -0
- package/dist/coffeescript-BVCvwO8I.js +179 -0
- package/dist/commonlisp-D_kxz07b.js +75 -0
- package/dist/crystal-D309uH6_.js +217 -0
- package/dist/css-BkF-NPzE.js +1553 -0
- package/dist/cypher-BMq4Fwjl.js +68 -0
- package/dist/d-BZcgY6La.js +127 -0
- package/dist/diff-Cg9d_RX2.js +18 -0
- package/dist/dockerfile-DFX8bq9N.js +194 -0
- package/dist/dtd-CtLokQ-U.js +84 -0
- package/dist/dylan-QYeExnWK.js +234 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/ecl-CiXN-g_D.js +121 -0
- package/dist/eiffel-yQhjl4T1.js +110 -0
- package/dist/elm-CNT9vbN0.js +108 -0
- package/dist/erlang-CFOYdy9e.js +487 -0
- package/dist/factor-Clf6BoVk.js +65 -0
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/forth-BmxRyE9S.js +60 -0
- package/dist/fortran-9bvPyrOW.js +442 -0
- package/dist/gas-cpmYfFX2.js +183 -0
- package/dist/gherkin-CJuwpceU.js +34 -0
- package/dist/groovy-DZeT_VM-.js +146 -0
- package/dist/haskell-CxiO_7JL.js +375 -0
- package/dist/haxe-70NVW1pR.js +359 -0
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/idl-B6TRFYjl.js +947 -0
- package/dist/index-4oLq9F9B.js +945 -0
- package/dist/index-9NH8hlZ-.js +342 -0
- package/dist/index-BFXNCCbG.js +253 -0
- package/dist/index-BLHYcXXK.js +101 -0
- package/dist/index-BQU3Rb2C.js +290 -0
- package/dist/index-Bg18ePld.js +157 -0
- package/dist/index-Bp5lqnbN.js +555 -0
- package/dist/index-Bqzq8A1N.js +59 -0
- package/dist/index-Bx-s4g99.js +76 -0
- package/dist/index-BxX25QmV.js +248 -0
- package/dist/index-CFCzgc33.js +1918 -0
- package/dist/index-CL7JTU9M.js +136 -0
- package/dist/index-CZGsg2Zk.js +12945 -0
- package/dist/index-CipmEceX.js +74 -0
- package/dist/index-Cv4vvpa2.js +1305 -0
- package/dist/index-D4hhdPbZ.js +6153 -0
- package/dist/index-DhNQ8g9I.js +270 -0
- package/dist/index-Djp53tAP.js +94 -0
- package/dist/index-KlsAFhIj.js +566 -0
- package/dist/index-OntZqtu6.js +309 -0
- package/dist/index-PGnZjMCR.js +302 -0
- package/dist/index-TyYoYgss.js +613 -0
- package/dist/index-oMSPmlXA.js +960 -0
- package/dist/index-rQC6Gbk0.js +138 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/javascript-DOuB9oqA.js +691 -0
- package/dist/julia-DpvXAuO6.js +241 -0
- package/dist/languages.d.ts +18 -0
- package/dist/languages.d.ts.map +1 -0
- package/dist/livescript-CanGTf8u.js +272 -0
- package/dist/lua-XplVlWi_.js +217 -0
- package/dist/mathematica-jaRHnSxC.js +35 -0
- package/dist/mbox-BctzC1hL.js +76 -0
- package/dist/mirc-CFBPAOaF.js +72 -0
- package/dist/mllike-BSnXJBGA.js +272 -0
- package/dist/modelica-vUgVs--1.js +93 -0
- package/dist/mscgen-Cpl0NYLN.js +104 -0
- package/dist/mumps-CQoS1kWX.js +25 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/nsis-BCLyjY7m.js +62 -0
- package/dist/ntriples-CsNjv2QF.js +79 -0
- package/dist/octave-C8PmmSRH.js +143 -0
- package/dist/oz-Ce8aN8oE.js +151 -0
- package/dist/pascal-De0D6mP7.js +77 -0
- package/dist/perl-B4bSCe1C.js +915 -0
- package/dist/pig-D24Z8EXi.js +54 -0
- package/dist/powershell-DkYVfTzP.js +249 -0
- package/dist/properties-Dn9wna3M.js +26 -0
- package/dist/protobuf-BPIjwpzm.js +49 -0
- package/dist/pug-TGXr6c5j.js +248 -0
- package/dist/puppet-nyd4dhjf.js +45 -0
- package/dist/python-BkR3uSy8.js +313 -0
- package/dist/q-DyHZGnqm.js +86 -0
- package/dist/r-LKEuhEGI.js +104 -0
- package/dist/rpm-IznJm2Xc.js +57 -0
- package/dist/ruby-CcYfvIk6.js +228 -0
- package/dist/sas-7E8yHoCW.js +105 -0
- package/dist/scheme-DjibxsNh.js +124 -0
- package/dist/shell-C0C2sNA_.js +182 -0
- package/dist/sieve-Bwz7vjP5.js +72 -0
- package/dist/simple-mode-mNVtnu0l.js +89 -0
- package/dist/smalltalk-Bhddl2pB.js +48 -0
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/sparql-FarWu_Gb.js +197 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/sql-CfG5lQ3l.js +282 -0
- package/dist/stex-Du4h4KAU.js +129 -0
- package/dist/stylus-CAdqWld3.js +250 -0
- package/dist/swift-DSxqR9R6.js +230 -0
- package/dist/tcl-xfoLljhY.js +81 -0
- package/dist/textile-D1AWE-pc.js +295 -0
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/toml-DWAmxCjl.js +58 -0
- package/dist/troff-D2UO-fKf.js +35 -0
- package/dist/ttcn-Bsa4sfRm.js +123 -0
- package/dist/ttcn-cfg-Bac_acMi.js +88 -0
- package/dist/turtle-xwJUxoPV.js +80 -0
- package/dist/vb-c2kQGd6-.js +74 -0
- package/dist/vbscript-1f_Dhg5H.js +324 -0
- package/dist/velocity-DJd0pTTC.js +96 -0
- package/dist/verilog-CiS1jyi5.js +262 -0
- package/dist/vhdl-T9HkrbI2.js +106 -0
- package/dist/webidl-CjfDENEo.js +155 -0
- package/dist/xquery-Ct6lEb4B.js +422 -0
- package/dist/yacas-C0absKBh.js +73 -0
- package/dist/z80-Pki2zAjW.js +61 -0
- package/package.json +16 -7
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
function c(e) {
|
|
2
|
+
return new RegExp("^(?:" + e.join("|") + ")", "i");
|
|
3
|
+
}
|
|
4
|
+
function o(e) {
|
|
5
|
+
return new RegExp("^(?:" + e.join("|") + ")$", "i");
|
|
6
|
+
}
|
|
7
|
+
var d = o([
|
|
8
|
+
"_G",
|
|
9
|
+
"_VERSION",
|
|
10
|
+
"assert",
|
|
11
|
+
"collectgarbage",
|
|
12
|
+
"dofile",
|
|
13
|
+
"error",
|
|
14
|
+
"getfenv",
|
|
15
|
+
"getmetatable",
|
|
16
|
+
"ipairs",
|
|
17
|
+
"load",
|
|
18
|
+
"loadfile",
|
|
19
|
+
"loadstring",
|
|
20
|
+
"module",
|
|
21
|
+
"next",
|
|
22
|
+
"pairs",
|
|
23
|
+
"pcall",
|
|
24
|
+
"print",
|
|
25
|
+
"rawequal",
|
|
26
|
+
"rawget",
|
|
27
|
+
"rawset",
|
|
28
|
+
"require",
|
|
29
|
+
"select",
|
|
30
|
+
"setfenv",
|
|
31
|
+
"setmetatable",
|
|
32
|
+
"tonumber",
|
|
33
|
+
"tostring",
|
|
34
|
+
"type",
|
|
35
|
+
"unpack",
|
|
36
|
+
"xpcall",
|
|
37
|
+
"coroutine.create",
|
|
38
|
+
"coroutine.resume",
|
|
39
|
+
"coroutine.running",
|
|
40
|
+
"coroutine.status",
|
|
41
|
+
"coroutine.wrap",
|
|
42
|
+
"coroutine.yield",
|
|
43
|
+
"debug.debug",
|
|
44
|
+
"debug.getfenv",
|
|
45
|
+
"debug.gethook",
|
|
46
|
+
"debug.getinfo",
|
|
47
|
+
"debug.getlocal",
|
|
48
|
+
"debug.getmetatable",
|
|
49
|
+
"debug.getregistry",
|
|
50
|
+
"debug.getupvalue",
|
|
51
|
+
"debug.setfenv",
|
|
52
|
+
"debug.sethook",
|
|
53
|
+
"debug.setlocal",
|
|
54
|
+
"debug.setmetatable",
|
|
55
|
+
"debug.setupvalue",
|
|
56
|
+
"debug.traceback",
|
|
57
|
+
"close",
|
|
58
|
+
"flush",
|
|
59
|
+
"lines",
|
|
60
|
+
"read",
|
|
61
|
+
"seek",
|
|
62
|
+
"setvbuf",
|
|
63
|
+
"write",
|
|
64
|
+
"io.close",
|
|
65
|
+
"io.flush",
|
|
66
|
+
"io.input",
|
|
67
|
+
"io.lines",
|
|
68
|
+
"io.open",
|
|
69
|
+
"io.output",
|
|
70
|
+
"io.popen",
|
|
71
|
+
"io.read",
|
|
72
|
+
"io.stderr",
|
|
73
|
+
"io.stdin",
|
|
74
|
+
"io.stdout",
|
|
75
|
+
"io.tmpfile",
|
|
76
|
+
"io.type",
|
|
77
|
+
"io.write",
|
|
78
|
+
"math.abs",
|
|
79
|
+
"math.acos",
|
|
80
|
+
"math.asin",
|
|
81
|
+
"math.atan",
|
|
82
|
+
"math.atan2",
|
|
83
|
+
"math.ceil",
|
|
84
|
+
"math.cos",
|
|
85
|
+
"math.cosh",
|
|
86
|
+
"math.deg",
|
|
87
|
+
"math.exp",
|
|
88
|
+
"math.floor",
|
|
89
|
+
"math.fmod",
|
|
90
|
+
"math.frexp",
|
|
91
|
+
"math.huge",
|
|
92
|
+
"math.ldexp",
|
|
93
|
+
"math.log",
|
|
94
|
+
"math.log10",
|
|
95
|
+
"math.max",
|
|
96
|
+
"math.min",
|
|
97
|
+
"math.modf",
|
|
98
|
+
"math.pi",
|
|
99
|
+
"math.pow",
|
|
100
|
+
"math.rad",
|
|
101
|
+
"math.random",
|
|
102
|
+
"math.randomseed",
|
|
103
|
+
"math.sin",
|
|
104
|
+
"math.sinh",
|
|
105
|
+
"math.sqrt",
|
|
106
|
+
"math.tan",
|
|
107
|
+
"math.tanh",
|
|
108
|
+
"os.clock",
|
|
109
|
+
"os.date",
|
|
110
|
+
"os.difftime",
|
|
111
|
+
"os.execute",
|
|
112
|
+
"os.exit",
|
|
113
|
+
"os.getenv",
|
|
114
|
+
"os.remove",
|
|
115
|
+
"os.rename",
|
|
116
|
+
"os.setlocale",
|
|
117
|
+
"os.time",
|
|
118
|
+
"os.tmpname",
|
|
119
|
+
"package.cpath",
|
|
120
|
+
"package.loaded",
|
|
121
|
+
"package.loaders",
|
|
122
|
+
"package.loadlib",
|
|
123
|
+
"package.path",
|
|
124
|
+
"package.preload",
|
|
125
|
+
"package.seeall",
|
|
126
|
+
"string.byte",
|
|
127
|
+
"string.char",
|
|
128
|
+
"string.dump",
|
|
129
|
+
"string.find",
|
|
130
|
+
"string.format",
|
|
131
|
+
"string.gmatch",
|
|
132
|
+
"string.gsub",
|
|
133
|
+
"string.len",
|
|
134
|
+
"string.lower",
|
|
135
|
+
"string.match",
|
|
136
|
+
"string.rep",
|
|
137
|
+
"string.reverse",
|
|
138
|
+
"string.sub",
|
|
139
|
+
"string.upper",
|
|
140
|
+
"table.concat",
|
|
141
|
+
"table.insert",
|
|
142
|
+
"table.maxn",
|
|
143
|
+
"table.remove",
|
|
144
|
+
"table.sort"
|
|
145
|
+
]), g = o([
|
|
146
|
+
"and",
|
|
147
|
+
"break",
|
|
148
|
+
"elseif",
|
|
149
|
+
"false",
|
|
150
|
+
"nil",
|
|
151
|
+
"not",
|
|
152
|
+
"or",
|
|
153
|
+
"return",
|
|
154
|
+
"true",
|
|
155
|
+
"function",
|
|
156
|
+
"end",
|
|
157
|
+
"if",
|
|
158
|
+
"then",
|
|
159
|
+
"else",
|
|
160
|
+
"do",
|
|
161
|
+
"while",
|
|
162
|
+
"repeat",
|
|
163
|
+
"until",
|
|
164
|
+
"for",
|
|
165
|
+
"in",
|
|
166
|
+
"local"
|
|
167
|
+
]), f = o(["function", "if", "repeat", "do", "\\(", "{"]), h = o(["end", "until", "\\)", "}"]), p = c(["end", "until", "\\)", "}", "else", "elseif"]);
|
|
168
|
+
function u(e) {
|
|
169
|
+
for (var t = 0; e.eat("="); ) ++t;
|
|
170
|
+
return e.eat("["), t;
|
|
171
|
+
}
|
|
172
|
+
function l(e, t) {
|
|
173
|
+
var n = e.next();
|
|
174
|
+
return n == "-" && e.eat("-") ? e.eat("[") && e.eat("[") ? (t.cur = s(u(e), "comment"))(e, t) : (e.skipToEnd(), "comment") : n == '"' || n == "'" ? (t.cur = m(n))(e, t) : n == "[" && /[\[=]/.test(e.peek()) ? (t.cur = s(u(e), "string"))(e, t) : /\d/.test(n) ? (e.eatWhile(/[\w.%]/), "number") : /[\w_]/.test(n) ? (e.eatWhile(/[\w\\\-_.]/), "variable") : null;
|
|
175
|
+
}
|
|
176
|
+
function s(e, t) {
|
|
177
|
+
return function(n, i) {
|
|
178
|
+
for (var a = null, r; (r = n.next()) != null; )
|
|
179
|
+
if (a == null)
|
|
180
|
+
r == "]" && (a = 0);
|
|
181
|
+
else if (r == "=") ++a;
|
|
182
|
+
else if (r == "]" && a == e) {
|
|
183
|
+
i.cur = l;
|
|
184
|
+
break;
|
|
185
|
+
} else a = null;
|
|
186
|
+
return t;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function m(e) {
|
|
190
|
+
return function(t, n) {
|
|
191
|
+
for (var i = !1, a; (a = t.next()) != null && !(a == e && !i); )
|
|
192
|
+
i = !i && a == "\\";
|
|
193
|
+
return i || (n.cur = l), "string";
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const b = {
|
|
197
|
+
name: "lua",
|
|
198
|
+
startState: function() {
|
|
199
|
+
return { basecol: 0, indentDepth: 0, cur: l };
|
|
200
|
+
},
|
|
201
|
+
token: function(e, t) {
|
|
202
|
+
if (e.eatSpace()) return null;
|
|
203
|
+
var n = t.cur(e, t), i = e.current();
|
|
204
|
+
return n == "variable" && (g.test(i) ? n = "keyword" : d.test(i) && (n = "builtin")), n != "comment" && n != "string" && (f.test(i) ? ++t.indentDepth : h.test(i) && --t.indentDepth), n;
|
|
205
|
+
},
|
|
206
|
+
indent: function(e, t, n) {
|
|
207
|
+
var i = p.test(t);
|
|
208
|
+
return e.basecol + n.unit * (e.indentDepth - (i ? 1 : 0));
|
|
209
|
+
},
|
|
210
|
+
languageData: {
|
|
211
|
+
indentOnInput: /^\s*(?:end|until|else|\)|\})$/,
|
|
212
|
+
commentTokens: { line: "--", block: { open: "--[[", close: "]]--" } }
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
export {
|
|
216
|
+
b as lua
|
|
217
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var u = "[a-zA-Z\\$][a-zA-Z0-9\\$]*", f = "(?:\\d+)", c = "(?:\\.\\d+|\\d+\\.\\d*|\\d+)", o = "(?:\\.\\w+|\\w+\\.\\w*|\\w+)", l = "(?:`(?:`?" + c + ")?)", z = new RegExp("(?:" + f + "(?:\\^\\^" + o + l + "?(?:\\*\\^[+-]?\\d+)?))"), m = new RegExp("(?:" + c + l + "?(?:\\*\\^[+-]?\\d+)?)"), A = new RegExp("(?:`?)(?:" + u + ")(?:`(?:" + u + "))*(?:`?)");
|
|
2
|
+
function i(e, a) {
|
|
3
|
+
var n;
|
|
4
|
+
return n = e.next(), n === '"' ? (a.tokenize = Z, a.tokenize(e, a)) : n === "(" && e.eat("*") ? (a.commentLevel++, a.tokenize = $, a.tokenize(e, a)) : (e.backUp(1), e.match(z, !0, !1) || e.match(m, !0, !1) ? "number" : e.match(/(?:In|Out)\[[0-9]*\]/, !0, !1) ? "atom" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/, !0, !1) ? "meta" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/, !0, !1) ? "string.special" : e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/, !0, !1) || e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/, !0, !1) || e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/, !0, !1) || e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/, !0, !1) ? "variableName.special" : e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/, !0, !1) ? "character" : e.match(/(?:\[|\]|{|}|\(|\))/, !0, !1) ? "bracket" : e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/, !0, !1) ? "variableName.constant" : e.match(A, !0, !1) ? "keyword" : e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, !0, !1) ? "operator" : (e.next(), "error"));
|
|
5
|
+
}
|
|
6
|
+
function Z(e, a) {
|
|
7
|
+
for (var n, r = !1, t = !1; (n = e.next()) != null; ) {
|
|
8
|
+
if (n === '"' && !t) {
|
|
9
|
+
r = !0;
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
t = !t && n === "\\";
|
|
13
|
+
}
|
|
14
|
+
return r && !t && (a.tokenize = i), "string";
|
|
15
|
+
}
|
|
16
|
+
function $(e, a) {
|
|
17
|
+
for (var n, r; a.commentLevel > 0 && (r = e.next()) != null; )
|
|
18
|
+
n === "(" && r === "*" && a.commentLevel++, n === "*" && r === ")" && a.commentLevel--, n = r;
|
|
19
|
+
return a.commentLevel <= 0 && (a.tokenize = i), "comment";
|
|
20
|
+
}
|
|
21
|
+
const v = {
|
|
22
|
+
name: "mathematica",
|
|
23
|
+
startState: function() {
|
|
24
|
+
return { tokenize: i, commentLevel: 0 };
|
|
25
|
+
},
|
|
26
|
+
token: function(e, a) {
|
|
27
|
+
return e.eatSpace() ? null : a.tokenize(e, a);
|
|
28
|
+
},
|
|
29
|
+
languageData: {
|
|
30
|
+
commentTokens: { block: { open: "(*", close: "*)" } }
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
v as mathematica
|
|
35
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var o = [
|
|
2
|
+
"From",
|
|
3
|
+
"Sender",
|
|
4
|
+
"Reply-To",
|
|
5
|
+
"To",
|
|
6
|
+
"Cc",
|
|
7
|
+
"Bcc",
|
|
8
|
+
"Message-ID",
|
|
9
|
+
"In-Reply-To",
|
|
10
|
+
"References",
|
|
11
|
+
"Resent-From",
|
|
12
|
+
"Resent-Sender",
|
|
13
|
+
"Resent-To",
|
|
14
|
+
"Resent-Cc",
|
|
15
|
+
"Resent-Bcc",
|
|
16
|
+
"Resent-Message-ID",
|
|
17
|
+
"Return-Path",
|
|
18
|
+
"Received"
|
|
19
|
+
], l = [
|
|
20
|
+
"Date",
|
|
21
|
+
"Subject",
|
|
22
|
+
"Comments",
|
|
23
|
+
"Keywords",
|
|
24
|
+
"Resent-Date"
|
|
25
|
+
], u = /^[ \t]/, d = /^From /, f = new RegExp("^(" + o.join("|") + "): "), c = new RegExp("^(" + l.join("|") + "): "), t = /^[^:]+:/, m = /^[^ ]+@[^ ]+/, p = /^.*?(?=[^ ]+?@[^ ]+)/, H = /^<.*?>/, v = /^.*?(?=<.*>)/;
|
|
26
|
+
function h(e) {
|
|
27
|
+
return e === "Subject" ? "header" : "string";
|
|
28
|
+
}
|
|
29
|
+
function R(e, r) {
|
|
30
|
+
if (e.sol()) {
|
|
31
|
+
if (r.inSeparator = !1, r.inHeader && e.match(u))
|
|
32
|
+
return null;
|
|
33
|
+
if (r.inHeader = !1, r.header = null, e.match(d))
|
|
34
|
+
return r.inHeaders = !0, r.inSeparator = !0, "atom";
|
|
35
|
+
var n, i = !1;
|
|
36
|
+
return (n = e.match(c)) || (i = !0) && (n = e.match(f)) ? (r.inHeaders = !0, r.inHeader = !0, r.emailPermitted = i, r.header = n[1], "atom") : r.inHeaders && (n = e.match(t)) ? (r.inHeader = !0, r.emailPermitted = !0, r.header = n[1], "atom") : (r.inHeaders = !1, e.skipToEnd(), null);
|
|
37
|
+
}
|
|
38
|
+
if (r.inSeparator)
|
|
39
|
+
return e.match(m) ? "link" : (e.match(p) || e.skipToEnd(), "atom");
|
|
40
|
+
if (r.inHeader) {
|
|
41
|
+
var a = h(r.header);
|
|
42
|
+
if (r.emailPermitted) {
|
|
43
|
+
if (e.match(H)) return a + " link";
|
|
44
|
+
if (e.match(v)) return a;
|
|
45
|
+
}
|
|
46
|
+
return e.skipToEnd(), a;
|
|
47
|
+
}
|
|
48
|
+
return e.skipToEnd(), null;
|
|
49
|
+
}
|
|
50
|
+
const k = {
|
|
51
|
+
name: "mbox",
|
|
52
|
+
startState: function() {
|
|
53
|
+
return {
|
|
54
|
+
// Is in a mbox separator
|
|
55
|
+
inSeparator: !1,
|
|
56
|
+
// Is in a mail header
|
|
57
|
+
inHeader: !1,
|
|
58
|
+
// If bracketed email is permitted. Only applicable when inHeader
|
|
59
|
+
emailPermitted: !1,
|
|
60
|
+
// Name of current header
|
|
61
|
+
header: null,
|
|
62
|
+
// Is in a region of mail headers
|
|
63
|
+
inHeaders: !1
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
token: R,
|
|
67
|
+
blankLine: function(e) {
|
|
68
|
+
e.inHeaders = e.inSeparator = e.inHeader = !1;
|
|
69
|
+
},
|
|
70
|
+
languageData: {
|
|
71
|
+
autocomplete: o.concat(l)
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
k as mbox
|
|
76
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
function n(e) {
|
|
2
|
+
for (var $ = {}, r = e.split(" "), i = 0; i < r.length; ++i) $[r[i]] = !0;
|
|
3
|
+
return $;
|
|
4
|
+
}
|
|
5
|
+
var a = n("$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"), s = n("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item"), l = n("if elseif else and not or eq ne in ni for foreach while switch"), c = /[+\-*&%=<>!?^\/\|]/;
|
|
6
|
+
function d(e, $, r) {
|
|
7
|
+
return $.tokenize = r, r(e, $);
|
|
8
|
+
}
|
|
9
|
+
function o(e, $) {
|
|
10
|
+
var r = $.beforeParams;
|
|
11
|
+
$.beforeParams = !1;
|
|
12
|
+
var i = e.next();
|
|
13
|
+
if (/[\[\]{}\(\),\.]/.test(i))
|
|
14
|
+
return i == "(" && r ? $.inParams = !0 : i == ")" && ($.inParams = !1), null;
|
|
15
|
+
if (/\d/.test(i))
|
|
16
|
+
return e.eatWhile(/[\w\.]/), "number";
|
|
17
|
+
if (i == "\\")
|
|
18
|
+
return e.eat("\\"), e.eat(/./), "number";
|
|
19
|
+
if (i == "/" && e.eat("*"))
|
|
20
|
+
return d(e, $, m);
|
|
21
|
+
if (i == ";" && e.match(/ *\( *\(/))
|
|
22
|
+
return d(e, $, p);
|
|
23
|
+
if (i == ";" && !$.inParams)
|
|
24
|
+
return e.skipToEnd(), "comment";
|
|
25
|
+
if (i == '"')
|
|
26
|
+
return e.eat(/"/), "keyword";
|
|
27
|
+
if (i == "$")
|
|
28
|
+
return e.eatWhile(/[$_a-z0-9A-Z\.:]/), a && a.propertyIsEnumerable(e.current().toLowerCase()) ? "keyword" : ($.beforeParams = !0, "builtin");
|
|
29
|
+
if (i == "%")
|
|
30
|
+
return e.eatWhile(/[^,\s()]/), $.beforeParams = !0, "string";
|
|
31
|
+
if (c.test(i))
|
|
32
|
+
return e.eatWhile(c), "operator";
|
|
33
|
+
e.eatWhile(/[\w\$_{}]/);
|
|
34
|
+
var t = e.current().toLowerCase();
|
|
35
|
+
return s && s.propertyIsEnumerable(t) ? "keyword" : l && l.propertyIsEnumerable(t) ? ($.beforeParams = !0, "keyword") : null;
|
|
36
|
+
}
|
|
37
|
+
function m(e, $) {
|
|
38
|
+
for (var r = !1, i; i = e.next(); ) {
|
|
39
|
+
if (i == "/" && r) {
|
|
40
|
+
$.tokenize = o;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
r = i == "*";
|
|
44
|
+
}
|
|
45
|
+
return "comment";
|
|
46
|
+
}
|
|
47
|
+
function p(e, $) {
|
|
48
|
+
for (var r = 0, i; i = e.next(); ) {
|
|
49
|
+
if (i == ";" && r == 2) {
|
|
50
|
+
$.tokenize = o;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
i == ")" ? r++ : i != " " && (r = 0);
|
|
54
|
+
}
|
|
55
|
+
return "meta";
|
|
56
|
+
}
|
|
57
|
+
const u = {
|
|
58
|
+
name: "mirc",
|
|
59
|
+
startState: function() {
|
|
60
|
+
return {
|
|
61
|
+
tokenize: o,
|
|
62
|
+
beforeParams: !1,
|
|
63
|
+
inParams: !1
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
token: function(e, $) {
|
|
67
|
+
return e.eatSpace() ? null : $.tokenize(e, $);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
u as mirc
|
|
72
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
function y(i) {
|
|
2
|
+
var t = {
|
|
3
|
+
as: "keyword",
|
|
4
|
+
do: "keyword",
|
|
5
|
+
else: "keyword",
|
|
6
|
+
end: "keyword",
|
|
7
|
+
exception: "keyword",
|
|
8
|
+
fun: "keyword",
|
|
9
|
+
functor: "keyword",
|
|
10
|
+
if: "keyword",
|
|
11
|
+
in: "keyword",
|
|
12
|
+
include: "keyword",
|
|
13
|
+
let: "keyword",
|
|
14
|
+
of: "keyword",
|
|
15
|
+
open: "keyword",
|
|
16
|
+
rec: "keyword",
|
|
17
|
+
struct: "keyword",
|
|
18
|
+
then: "keyword",
|
|
19
|
+
type: "keyword",
|
|
20
|
+
val: "keyword",
|
|
21
|
+
while: "keyword",
|
|
22
|
+
with: "keyword"
|
|
23
|
+
}, l = i.extraWords || {};
|
|
24
|
+
for (var w in l)
|
|
25
|
+
l.hasOwnProperty(w) && (t[w] = i.extraWords[w]);
|
|
26
|
+
var u = [];
|
|
27
|
+
for (var a in t)
|
|
28
|
+
u.push(a);
|
|
29
|
+
function d(e, r) {
|
|
30
|
+
var o = e.next();
|
|
31
|
+
if (o === '"')
|
|
32
|
+
return r.tokenize = c, r.tokenize(e, r);
|
|
33
|
+
if (o === "{" && e.eat("|"))
|
|
34
|
+
return r.longString = !0, r.tokenize = b, r.tokenize(e, r);
|
|
35
|
+
if (o === "(" && e.match(/^\*(?!\))/))
|
|
36
|
+
return r.commentLevel++, r.tokenize = f, r.tokenize(e, r);
|
|
37
|
+
if (o === "~" || o === "?")
|
|
38
|
+
return e.eatWhile(/\w/), "variableName.special";
|
|
39
|
+
if (o === "`")
|
|
40
|
+
return e.eatWhile(/\w/), "quote";
|
|
41
|
+
if (o === "/" && i.slashComments && e.eat("/"))
|
|
42
|
+
return e.skipToEnd(), "comment";
|
|
43
|
+
if (/\d/.test(o))
|
|
44
|
+
return o === "0" && e.eat(/[bB]/) && e.eatWhile(/[01]/), o === "0" && e.eat(/[xX]/) && e.eatWhile(/[0-9a-fA-F]/), o === "0" && e.eat(/[oO]/) ? e.eatWhile(/[0-7]/) : (e.eatWhile(/[\d_]/), e.eat(".") && e.eatWhile(/[\d]/), e.eat(/[eE]/) && e.eatWhile(/[\d\-+]/)), "number";
|
|
45
|
+
if (/[+\-*&%=<>!?|@\.~:]/.test(o))
|
|
46
|
+
return "operator";
|
|
47
|
+
if (/[\w\xa1-\uffff]/.test(o)) {
|
|
48
|
+
e.eatWhile(/[\w\xa1-\uffff]/);
|
|
49
|
+
var n = e.current();
|
|
50
|
+
return t.hasOwnProperty(n) ? t[n] : "variable";
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
function c(e, r) {
|
|
55
|
+
for (var o, n = !1, k = !1; (o = e.next()) != null; ) {
|
|
56
|
+
if (o === '"' && !k) {
|
|
57
|
+
n = !0;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
k = !k && o === "\\";
|
|
61
|
+
}
|
|
62
|
+
return n && !k && (r.tokenize = d), "string";
|
|
63
|
+
}
|
|
64
|
+
function f(e, r) {
|
|
65
|
+
for (var o, n; r.commentLevel > 0 && (n = e.next()) != null; )
|
|
66
|
+
o === "(" && n === "*" && r.commentLevel++, o === "*" && n === ")" && r.commentLevel--, o = n;
|
|
67
|
+
return r.commentLevel <= 0 && (r.tokenize = d), "comment";
|
|
68
|
+
}
|
|
69
|
+
function b(e, r) {
|
|
70
|
+
for (var o, n; r.longString && (n = e.next()) != null; )
|
|
71
|
+
o === "|" && n === "}" && (r.longString = !1), o = n;
|
|
72
|
+
return r.longString || (r.tokenize = d), "string";
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
startState: function() {
|
|
76
|
+
return { tokenize: d, commentLevel: 0, longString: !1 };
|
|
77
|
+
},
|
|
78
|
+
token: function(e, r) {
|
|
79
|
+
return e.eatSpace() ? null : r.tokenize(e, r);
|
|
80
|
+
},
|
|
81
|
+
languageData: {
|
|
82
|
+
autocomplete: u,
|
|
83
|
+
commentTokens: {
|
|
84
|
+
line: i.slashComments ? "//" : void 0,
|
|
85
|
+
block: { open: "(*", close: "*)" }
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const s = y({
|
|
91
|
+
extraWords: {
|
|
92
|
+
and: "keyword",
|
|
93
|
+
assert: "keyword",
|
|
94
|
+
begin: "keyword",
|
|
95
|
+
class: "keyword",
|
|
96
|
+
constraint: "keyword",
|
|
97
|
+
done: "keyword",
|
|
98
|
+
downto: "keyword",
|
|
99
|
+
external: "keyword",
|
|
100
|
+
function: "keyword",
|
|
101
|
+
initializer: "keyword",
|
|
102
|
+
lazy: "keyword",
|
|
103
|
+
match: "keyword",
|
|
104
|
+
method: "keyword",
|
|
105
|
+
module: "keyword",
|
|
106
|
+
mutable: "keyword",
|
|
107
|
+
new: "keyword",
|
|
108
|
+
nonrec: "keyword",
|
|
109
|
+
object: "keyword",
|
|
110
|
+
private: "keyword",
|
|
111
|
+
sig: "keyword",
|
|
112
|
+
to: "keyword",
|
|
113
|
+
try: "keyword",
|
|
114
|
+
value: "keyword",
|
|
115
|
+
virtual: "keyword",
|
|
116
|
+
when: "keyword",
|
|
117
|
+
// builtins
|
|
118
|
+
raise: "builtin",
|
|
119
|
+
failwith: "builtin",
|
|
120
|
+
true: "builtin",
|
|
121
|
+
false: "builtin",
|
|
122
|
+
// Pervasives builtins
|
|
123
|
+
asr: "builtin",
|
|
124
|
+
land: "builtin",
|
|
125
|
+
lor: "builtin",
|
|
126
|
+
lsl: "builtin",
|
|
127
|
+
lsr: "builtin",
|
|
128
|
+
lxor: "builtin",
|
|
129
|
+
mod: "builtin",
|
|
130
|
+
or: "builtin",
|
|
131
|
+
// More Pervasives
|
|
132
|
+
raise_notrace: "builtin",
|
|
133
|
+
trace: "builtin",
|
|
134
|
+
exit: "builtin",
|
|
135
|
+
print_string: "builtin",
|
|
136
|
+
print_endline: "builtin",
|
|
137
|
+
int: "type",
|
|
138
|
+
float: "type",
|
|
139
|
+
bool: "type",
|
|
140
|
+
char: "type",
|
|
141
|
+
string: "type",
|
|
142
|
+
unit: "type",
|
|
143
|
+
// Modules
|
|
144
|
+
List: "builtin"
|
|
145
|
+
}
|
|
146
|
+
}), h = y({
|
|
147
|
+
extraWords: {
|
|
148
|
+
abstract: "keyword",
|
|
149
|
+
assert: "keyword",
|
|
150
|
+
base: "keyword",
|
|
151
|
+
begin: "keyword",
|
|
152
|
+
class: "keyword",
|
|
153
|
+
default: "keyword",
|
|
154
|
+
delegate: "keyword",
|
|
155
|
+
"do!": "keyword",
|
|
156
|
+
done: "keyword",
|
|
157
|
+
downcast: "keyword",
|
|
158
|
+
downto: "keyword",
|
|
159
|
+
elif: "keyword",
|
|
160
|
+
extern: "keyword",
|
|
161
|
+
finally: "keyword",
|
|
162
|
+
for: "keyword",
|
|
163
|
+
function: "keyword",
|
|
164
|
+
global: "keyword",
|
|
165
|
+
inherit: "keyword",
|
|
166
|
+
inline: "keyword",
|
|
167
|
+
interface: "keyword",
|
|
168
|
+
internal: "keyword",
|
|
169
|
+
lazy: "keyword",
|
|
170
|
+
"let!": "keyword",
|
|
171
|
+
match: "keyword",
|
|
172
|
+
member: "keyword",
|
|
173
|
+
module: "keyword",
|
|
174
|
+
mutable: "keyword",
|
|
175
|
+
namespace: "keyword",
|
|
176
|
+
new: "keyword",
|
|
177
|
+
null: "keyword",
|
|
178
|
+
override: "keyword",
|
|
179
|
+
private: "keyword",
|
|
180
|
+
public: "keyword",
|
|
181
|
+
"return!": "keyword",
|
|
182
|
+
return: "keyword",
|
|
183
|
+
select: "keyword",
|
|
184
|
+
static: "keyword",
|
|
185
|
+
to: "keyword",
|
|
186
|
+
try: "keyword",
|
|
187
|
+
upcast: "keyword",
|
|
188
|
+
"use!": "keyword",
|
|
189
|
+
use: "keyword",
|
|
190
|
+
void: "keyword",
|
|
191
|
+
when: "keyword",
|
|
192
|
+
"yield!": "keyword",
|
|
193
|
+
yield: "keyword",
|
|
194
|
+
// Reserved words
|
|
195
|
+
atomic: "keyword",
|
|
196
|
+
break: "keyword",
|
|
197
|
+
checked: "keyword",
|
|
198
|
+
component: "keyword",
|
|
199
|
+
const: "keyword",
|
|
200
|
+
constraint: "keyword",
|
|
201
|
+
constructor: "keyword",
|
|
202
|
+
continue: "keyword",
|
|
203
|
+
eager: "keyword",
|
|
204
|
+
event: "keyword",
|
|
205
|
+
external: "keyword",
|
|
206
|
+
fixed: "keyword",
|
|
207
|
+
method: "keyword",
|
|
208
|
+
mixin: "keyword",
|
|
209
|
+
object: "keyword",
|
|
210
|
+
parallel: "keyword",
|
|
211
|
+
process: "keyword",
|
|
212
|
+
protected: "keyword",
|
|
213
|
+
pure: "keyword",
|
|
214
|
+
sealed: "keyword",
|
|
215
|
+
tailcall: "keyword",
|
|
216
|
+
trait: "keyword",
|
|
217
|
+
virtual: "keyword",
|
|
218
|
+
volatile: "keyword",
|
|
219
|
+
// builtins
|
|
220
|
+
List: "builtin",
|
|
221
|
+
Seq: "builtin",
|
|
222
|
+
Map: "builtin",
|
|
223
|
+
Set: "builtin",
|
|
224
|
+
Option: "builtin",
|
|
225
|
+
int: "builtin",
|
|
226
|
+
string: "builtin",
|
|
227
|
+
not: "builtin",
|
|
228
|
+
true: "builtin",
|
|
229
|
+
false: "builtin",
|
|
230
|
+
raise: "builtin",
|
|
231
|
+
failwith: "builtin"
|
|
232
|
+
},
|
|
233
|
+
slashComments: !0
|
|
234
|
+
}), p = y({
|
|
235
|
+
extraWords: {
|
|
236
|
+
abstype: "keyword",
|
|
237
|
+
and: "keyword",
|
|
238
|
+
andalso: "keyword",
|
|
239
|
+
case: "keyword",
|
|
240
|
+
datatype: "keyword",
|
|
241
|
+
fn: "keyword",
|
|
242
|
+
handle: "keyword",
|
|
243
|
+
infix: "keyword",
|
|
244
|
+
infixr: "keyword",
|
|
245
|
+
local: "keyword",
|
|
246
|
+
nonfix: "keyword",
|
|
247
|
+
op: "keyword",
|
|
248
|
+
orelse: "keyword",
|
|
249
|
+
raise: "keyword",
|
|
250
|
+
withtype: "keyword",
|
|
251
|
+
eqtype: "keyword",
|
|
252
|
+
sharing: "keyword",
|
|
253
|
+
sig: "keyword",
|
|
254
|
+
signature: "keyword",
|
|
255
|
+
structure: "keyword",
|
|
256
|
+
where: "keyword",
|
|
257
|
+
true: "keyword",
|
|
258
|
+
false: "keyword",
|
|
259
|
+
// types
|
|
260
|
+
int: "builtin",
|
|
261
|
+
real: "builtin",
|
|
262
|
+
string: "builtin",
|
|
263
|
+
char: "builtin",
|
|
264
|
+
bool: "builtin"
|
|
265
|
+
},
|
|
266
|
+
slashComments: !0
|
|
267
|
+
});
|
|
268
|
+
export {
|
|
269
|
+
h as fSharp,
|
|
270
|
+
s as oCaml,
|
|
271
|
+
p as sml
|
|
272
|
+
};
|