@aiao/code-editor-vue 0.0.7 → 0.0.8
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-Dd6D39pP.js +76 -0
- package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +34 -0
- package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +95 -0
- package/dist/asterisk-DS281yxp-B5eTWk_B.js +271 -0
- package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +34 -0
- package/dist/clike-BMALKCNj-Ck7Gc35_.js +620 -0
- package/dist/clojure-CCKyeQKf-N9sg777Z.js +800 -0
- package/dist/cmake-CuaCgAKt-BbEgXraO.js +28 -0
- package/dist/cobol-BlTKFDRj-CHCoWafp.js +72 -0
- package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +179 -0
- package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +75 -0
- package/dist/crystal-D309uH6_-DS6LrXoE.js +217 -0
- package/dist/css-BkF-NPzE-DiJu9Nkd.js +1553 -0
- package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +68 -0
- package/dist/d-BZcgY6La-KCW6-bIm.js +127 -0
- package/dist/diff-Cg9d_RX2-C01qBVFc.js +18 -0
- package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +194 -0
- package/dist/dtd-CtLokQ-U-DCbNdeIA.js +84 -0
- package/dist/dylan-QYeExnWK-DIUVpsct.js +234 -0
- package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +78 -0
- package/dist/ecl-CiXN-g_D-DOI-W0if.js +121 -0
- package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +110 -0
- package/dist/elm-CNT9vbN0-BcYlydpO.js +108 -0
- package/dist/erlang-CFOYdy9e-DULXsFZl.js +487 -0
- package/dist/factor-Clf6BoVk-DBb2EHMF.js +65 -0
- package/dist/fcl-CPC2WYrI-CuXG3fcK.js +103 -0
- package/dist/forth-BmxRyE9S-BcFwWpeL.js +60 -0
- package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +442 -0
- package/dist/gas-cpmYfFX2-sZgGhMxB.js +183 -0
- package/dist/gherkin-CJuwpceU-BRrr8yjO.js +34 -0
- package/dist/groovy-DZeT_VM--CmF8wcSo.js +146 -0
- package/dist/haskell-CxiO_7JL-BuULsXvv.js +375 -0
- package/dist/haxe-70NVW1pR-CM27SfgM.js +359 -0
- package/dist/http-D9LttvKF-j9E8oQ7o.js +44 -0
- package/dist/idl-B6TRFYjl-B6TRFYjl.js +947 -0
- package/dist/index-BMiCCEB1-Bhkem_yf.js +305 -0
- package/dist/index-BNuasEBW-Djq6JMRj.js +94 -0
- package/dist/index-Bg1KDWyt-DaNGMguF.js +290 -0
- package/dist/{index-D6_k5ZgA.js → index-BuVm7ZG6-BZLKs8s6.js} +106 -106
- package/dist/index-BvS1cnHq-DM0hbFEQ.js +613 -0
- package/dist/index-C44L0DmY-BmmnwVzM.js +138 -0
- package/dist/index-C71CZfUx-CXN80Lrt.js +247 -0
- package/dist/{index-BluJGN_u.js → index-CQ6JWNwi-BkIQd0CX.js} +131 -130
- package/dist/index-CpRVx97--qRVKhpm0.js +342 -0
- package/dist/index-CqvQj6d--Cks52f8R.js +270 -0
- package/dist/index-CrbQBmWq-CH-PcW1J.js +157 -0
- package/dist/index-CzovO10m-BGtdggaq.js +301 -0
- package/dist/index-D0BZOY-S-DP1N-_JY.js +101 -0
- package/dist/{index-DcMCsmYb.js → index-D0svJS59-B1ELwWap.js} +79 -78
- package/dist/index-D93XVMi1-BA3BTMNq.js +136 -0
- package/dist/index-DEB5VK0f-DmPMy-wS.js +252 -0
- package/dist/index-Dp8osI_J-_47iGH9z.js +960 -0
- package/dist/index-Ds4AioqO-C6aO_ISw.js +1917 -0
- package/dist/{index-DBgKi_NE.js → index-Dy-OpkyQ-BBMsyHBR.js} +18 -18
- package/dist/index-Dyi9rNIT-DTaMAKyY.js +391 -0
- package/dist/index-ZJkjD9tT-CsDrbsME.js +74 -0
- package/dist/index-qH2lMs0G-VT1Nd_LF.js +944 -0
- package/dist/index-srIksFxX-jkv39JhL.js +59 -0
- package/dist/index-wcsJ2mym.js +31598 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/javascript-DOuB9oqA-BxiygWgm.js +691 -0
- package/dist/julia-DpvXAuO6-Bk_IfD8X.js +241 -0
- package/dist/livescript-CanGTf8u-Cx6PrvS4.js +272 -0
- package/dist/lua-XplVlWi_-8f8obHzY.js +217 -0
- package/dist/mathematica-jaRHnSxC-B83gQsL2.js +35 -0
- package/dist/mbox-BctzC1hL-Hg5U2B4l.js +76 -0
- package/dist/mirc-CFBPAOaF-CfzSSk9W.js +72 -0
- package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +272 -0
- package/dist/modelica-vUgVs--1-BObVpYBg.js +93 -0
- package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +104 -0
- package/dist/mumps-CQoS1kWX-CkTUOQnt.js +25 -0
- package/dist/nginx-zDPm3Z74-DJk4KP7N.js +87 -0
- package/dist/nsis-BCLyjY7m-C2MffOQ3.js +62 -0
- package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +79 -0
- package/dist/octave-C8PmmSRH-DM5vTWlU.js +143 -0
- package/dist/oz-Ce8aN8oE-BcJM4SVy.js +151 -0
- package/dist/pascal-De0D6mP7-D7DGFFKL.js +77 -0
- package/dist/perl-B4bSCe1C-6aIa2glS.js +915 -0
- package/dist/pig-D24Z8EXi-BD-qt5FU.js +54 -0
- package/dist/powershell-DkYVfTzP-Blt1Rodi.js +249 -0
- package/dist/properties-Dn9wna3M-EOOwnCnk.js +26 -0
- package/dist/protobuf-BPIjwpzm-DAButU8_.js +49 -0
- package/dist/pug-TGXr6c5j-C9HfQ86E.js +248 -0
- package/dist/puppet-nyd4dhjf-CGzH5dsa.js +45 -0
- package/dist/python-BkR3uSy8-CjDnyp3B.js +313 -0
- package/dist/q-DyHZGnqm-DGuqeH_T.js +86 -0
- package/dist/r-LKEuhEGI-BFQhJnTP.js +104 -0
- package/dist/rpm-IznJm2Xc-CbZqrWCM.js +57 -0
- package/dist/ruby-CcYfvIk6-DzPSfSGo.js +228 -0
- package/dist/sas-7E8yHoCW-D726Uzkw.js +105 -0
- package/dist/scheme-DjibxsNh-Bp5gVFkm.js +124 -0
- package/dist/shell-C0C2sNA_-BTeYg6ir.js +182 -0
- package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +72 -0
- package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +89 -0
- package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +48 -0
- package/dist/solr-BNlsLglM-BM2OpfTI.js +41 -0
- package/dist/sparql-FarWu_Gb-FN_uQNd4.js +197 -0
- package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +49 -0
- package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +278 -0
- package/dist/stex-Du4h4KAU-QOov_zHj.js +129 -0
- package/dist/stylus-CAdqWld3-BcRBbBxD.js +250 -0
- package/dist/swift-DSxqR9R6-2Hz4NOoF.js +230 -0
- package/dist/tcl-xfoLljhY-DAZBRGQI.js +81 -0
- package/dist/textile-D1AWE-pc-DuiIfEnb.js +295 -0
- package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +155 -0
- package/dist/tiki-__Kn3CeS-CWcR9ib_.js +181 -0
- package/dist/toml-DWAmxCjl-CyJoDzs6.js +56 -0
- package/dist/troff-D2UO-fKf-DVoIzS-O.js +35 -0
- package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +123 -0
- package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +88 -0
- package/dist/turtle-xwJUxoPV-fs94wdNM.js +80 -0
- package/dist/vb-c2kQGd6--DU726qF0.js +74 -0
- package/dist/vbscript-1f_Dhg5H-DriA32xD.js +324 -0
- package/dist/velocity-DJd0pTTC-BG368IR6.js +96 -0
- package/dist/verilog-CiS1jyi5-giQA8J-e.js +259 -0
- package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +106 -0
- package/dist/webidl-CjfDENEo-BM8KXKJ5.js +155 -0
- package/dist/xquery-Ct6lEb4B-C5KDc61l.js +422 -0
- package/dist/yacas-C0absKBh-B82QJ76F.js +73 -0
- package/dist/z80-Pki2zAjW-B0IQoIbR.js +61 -0
- package/package.json +8 -10
- package/dist/index-3d5LPf68.js +0 -19017
- package/dist/languages.d.ts +0 -3
- package/dist/languages.d.ts.map +0 -1
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
function u(e, t, r) {
|
|
2
|
+
return typeof r > "u" && (r = ""), typeof t > "u" && (t = "\\b"), new RegExp("^" + r + "((" + e.join(")|(") + "))" + t);
|
|
3
|
+
}
|
|
4
|
+
var d = "\\\\[0-7]{1,3}", F = "\\\\x[A-Fa-f0-9]{1,2}", k = `\\\\[abefnrtv0%?'"\\\\]`, b = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])", l = [
|
|
5
|
+
"[<>]:",
|
|
6
|
+
"[<>=]=",
|
|
7
|
+
"<<=?",
|
|
8
|
+
">>>?=?",
|
|
9
|
+
"=>",
|
|
10
|
+
"--?>",
|
|
11
|
+
"<--[->]?",
|
|
12
|
+
"\\/\\/",
|
|
13
|
+
"\\.{2,3}",
|
|
14
|
+
"[\\.\\\\%*+\\-<>!\\/^|&]=?",
|
|
15
|
+
"\\?",
|
|
16
|
+
"\\$",
|
|
17
|
+
"~",
|
|
18
|
+
":"
|
|
19
|
+
], g = u([
|
|
20
|
+
"[<>]:",
|
|
21
|
+
"[<>=]=",
|
|
22
|
+
"[!=]==",
|
|
23
|
+
"<<=?",
|
|
24
|
+
">>>?=?",
|
|
25
|
+
"=>?",
|
|
26
|
+
"--?>",
|
|
27
|
+
"<--[->]?",
|
|
28
|
+
"\\/\\/",
|
|
29
|
+
"[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?",
|
|
30
|
+
"\\?",
|
|
31
|
+
"\\$",
|
|
32
|
+
"~",
|
|
33
|
+
":",
|
|
34
|
+
"\\u00D7",
|
|
35
|
+
"\\u2208",
|
|
36
|
+
"\\u2209",
|
|
37
|
+
"\\u220B",
|
|
38
|
+
"\\u220C",
|
|
39
|
+
"\\u2218",
|
|
40
|
+
"\\u221A",
|
|
41
|
+
"\\u221B",
|
|
42
|
+
"\\u2229",
|
|
43
|
+
"\\u222A",
|
|
44
|
+
"\\u2260",
|
|
45
|
+
"\\u2264",
|
|
46
|
+
"\\u2265",
|
|
47
|
+
"\\u2286",
|
|
48
|
+
"\\u2288",
|
|
49
|
+
"\\u228A",
|
|
50
|
+
"\\u22C5",
|
|
51
|
+
"\\b(in|isa)\\b(?!.?\\()"
|
|
52
|
+
], ""), v = /^[;,()[\]{}]/, x = /^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/, y = u([d, F, k, b], "'"), A = [
|
|
53
|
+
"begin",
|
|
54
|
+
"function",
|
|
55
|
+
"type",
|
|
56
|
+
"struct",
|
|
57
|
+
"immutable",
|
|
58
|
+
"let",
|
|
59
|
+
"macro",
|
|
60
|
+
"for",
|
|
61
|
+
"while",
|
|
62
|
+
"quote",
|
|
63
|
+
"if",
|
|
64
|
+
"else",
|
|
65
|
+
"elseif",
|
|
66
|
+
"try",
|
|
67
|
+
"finally",
|
|
68
|
+
"catch",
|
|
69
|
+
"do"
|
|
70
|
+
], z = ["end", "else", "elseif", "catch", "finally"], f = [
|
|
71
|
+
"if",
|
|
72
|
+
"else",
|
|
73
|
+
"elseif",
|
|
74
|
+
"while",
|
|
75
|
+
"for",
|
|
76
|
+
"begin",
|
|
77
|
+
"let",
|
|
78
|
+
"end",
|
|
79
|
+
"do",
|
|
80
|
+
"try",
|
|
81
|
+
"catch",
|
|
82
|
+
"finally",
|
|
83
|
+
"return",
|
|
84
|
+
"break",
|
|
85
|
+
"continue",
|
|
86
|
+
"global",
|
|
87
|
+
"local",
|
|
88
|
+
"const",
|
|
89
|
+
"export",
|
|
90
|
+
"import",
|
|
91
|
+
"importall",
|
|
92
|
+
"using",
|
|
93
|
+
"function",
|
|
94
|
+
"where",
|
|
95
|
+
"macro",
|
|
96
|
+
"module",
|
|
97
|
+
"baremodule",
|
|
98
|
+
"struct",
|
|
99
|
+
"type",
|
|
100
|
+
"mutable",
|
|
101
|
+
"immutable",
|
|
102
|
+
"quote",
|
|
103
|
+
"typealias",
|
|
104
|
+
"abstract",
|
|
105
|
+
"primitive",
|
|
106
|
+
"bitstype"
|
|
107
|
+
], m = ["true", "false", "nothing", "NaN", "Inf"], E = u(A), _ = u(z), D = u(f), T = u(m), w = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, C = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, P = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/, B = u(l, "", "@"), $ = u(l, "", ":");
|
|
108
|
+
function o(e) {
|
|
109
|
+
return e.nestedArrays > 0;
|
|
110
|
+
}
|
|
111
|
+
function G(e) {
|
|
112
|
+
return e.nestedGenerators > 0;
|
|
113
|
+
}
|
|
114
|
+
function c(e, t) {
|
|
115
|
+
return typeof t > "u" && (t = 0), e.scopes.length <= t ? null : e.scopes[e.scopes.length - (t + 1)];
|
|
116
|
+
}
|
|
117
|
+
function n(e, t) {
|
|
118
|
+
if (e.match("#=", !1))
|
|
119
|
+
return t.tokenize = Z, t.tokenize(e, t);
|
|
120
|
+
var r = t.leavingExpr;
|
|
121
|
+
if (e.sol() && (r = !1), t.leavingExpr = !1, r && e.match(/^'+/))
|
|
122
|
+
return "operator";
|
|
123
|
+
if (e.match(/\.{4,}/))
|
|
124
|
+
return "error";
|
|
125
|
+
if (e.match(/\.{1,3}/))
|
|
126
|
+
return "operator";
|
|
127
|
+
if (e.eatSpace())
|
|
128
|
+
return null;
|
|
129
|
+
var a = e.peek();
|
|
130
|
+
if (a === "#")
|
|
131
|
+
return e.skipToEnd(), "comment";
|
|
132
|
+
if (a === "[" && (t.scopes.push("["), t.nestedArrays++), a === "(" && (t.scopes.push("("), t.nestedGenerators++), o(t) && a === "]") {
|
|
133
|
+
for (; t.scopes.length && c(t) !== "["; )
|
|
134
|
+
t.scopes.pop();
|
|
135
|
+
t.scopes.pop(), t.nestedArrays--, t.leavingExpr = !0;
|
|
136
|
+
}
|
|
137
|
+
if (G(t) && a === ")") {
|
|
138
|
+
for (; t.scopes.length && c(t) !== "("; )
|
|
139
|
+
t.scopes.pop();
|
|
140
|
+
t.scopes.pop(), t.nestedGenerators--, t.leavingExpr = !0;
|
|
141
|
+
}
|
|
142
|
+
if (o(t)) {
|
|
143
|
+
if (t.lastToken == "end" && e.match(":"))
|
|
144
|
+
return "operator";
|
|
145
|
+
if (e.match("end"))
|
|
146
|
+
return "number";
|
|
147
|
+
}
|
|
148
|
+
var s;
|
|
149
|
+
if ((s = e.match(E, !1)) && t.scopes.push(s[0]), e.match(_, !1) && t.scopes.pop(), e.match(/^::(?![:\$])/))
|
|
150
|
+
return t.tokenize = I, t.tokenize(e, t);
|
|
151
|
+
if (!r && (e.match(C) || e.match($)))
|
|
152
|
+
return "builtin";
|
|
153
|
+
if (e.match(g))
|
|
154
|
+
return "operator";
|
|
155
|
+
if (e.match(/^\.?\d/, !1)) {
|
|
156
|
+
var p = RegExp(/^im\b/), i = !1;
|
|
157
|
+
if (e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i) && (i = !0), e.match(/^0x[0-9a-f_]+/i) && (i = !0), e.match(/^0b[01_]+/i) && (i = !0), e.match(/^0o[0-7_]+/i) && (i = !0), e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i) && (i = !0), e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i) && (i = !0), i)
|
|
158
|
+
return e.match(p), t.leavingExpr = !0, "number";
|
|
159
|
+
}
|
|
160
|
+
if (e.match("'"))
|
|
161
|
+
return t.tokenize = j, t.tokenize(e, t);
|
|
162
|
+
if (e.match(P))
|
|
163
|
+
return t.tokenize = S(e.current()), t.tokenize(e, t);
|
|
164
|
+
if (e.match(w) || e.match(B))
|
|
165
|
+
return "meta";
|
|
166
|
+
if (e.match(v))
|
|
167
|
+
return null;
|
|
168
|
+
if (e.match(D))
|
|
169
|
+
return "keyword";
|
|
170
|
+
if (e.match(T))
|
|
171
|
+
return "builtin";
|
|
172
|
+
var h = t.isDefinition || t.lastToken == "function" || t.lastToken == "macro" || t.lastToken == "type" || t.lastToken == "struct" || t.lastToken == "immutable";
|
|
173
|
+
return e.match(x) ? h ? e.peek() === "." ? (t.isDefinition = !0, "variable") : (t.isDefinition = !1, "def") : (t.leavingExpr = !0, "variable") : (e.next(), "error");
|
|
174
|
+
}
|
|
175
|
+
function I(e, t) {
|
|
176
|
+
return e.match(/.*?(?=[,;{}()=\s]|$)/), e.match("{") ? t.nestedParameters++ : e.match("}") && t.nestedParameters > 0 && t.nestedParameters--, t.nestedParameters > 0 ? e.match(/.*?(?={|})/) || e.next() : t.nestedParameters == 0 && (t.tokenize = n), "builtin";
|
|
177
|
+
}
|
|
178
|
+
function Z(e, t) {
|
|
179
|
+
return e.match("#=") && t.nestedComments++, e.match(/.*?(?=(#=|=#))/) || e.skipToEnd(), e.match("=#") && (t.nestedComments--, t.nestedComments == 0 && (t.tokenize = n)), "comment";
|
|
180
|
+
}
|
|
181
|
+
function j(e, t) {
|
|
182
|
+
var r = !1, a;
|
|
183
|
+
if (e.match(y))
|
|
184
|
+
r = !0;
|
|
185
|
+
else if (a = e.match(/\\u([a-f0-9]{1,4})(?=')/i)) {
|
|
186
|
+
var s = parseInt(a[1], 16);
|
|
187
|
+
(s <= 55295 || s >= 57344) && (r = !0, e.next());
|
|
188
|
+
} else if (a = e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)) {
|
|
189
|
+
var s = parseInt(a[1], 16);
|
|
190
|
+
s <= 1114111 && (r = !0, e.next());
|
|
191
|
+
}
|
|
192
|
+
return r ? (t.leavingExpr = !0, t.tokenize = n, "string") : (e.match(/^[^']+(?=')/) || e.skipToEnd(), e.match("'") && (t.tokenize = n), "error");
|
|
193
|
+
}
|
|
194
|
+
function S(e) {
|
|
195
|
+
e.substr(-3) === '"""' ? e = '"""' : e.substr(-1) === '"' && (e = '"');
|
|
196
|
+
function t(r, a) {
|
|
197
|
+
if (r.eat("\\"))
|
|
198
|
+
r.next();
|
|
199
|
+
else {
|
|
200
|
+
if (r.match(e))
|
|
201
|
+
return a.tokenize = n, a.leavingExpr = !0, "string";
|
|
202
|
+
r.eat(/[`"]/);
|
|
203
|
+
}
|
|
204
|
+
return r.eatWhile(/[^\\`"]/), "string";
|
|
205
|
+
}
|
|
206
|
+
return t;
|
|
207
|
+
}
|
|
208
|
+
const q = {
|
|
209
|
+
name: "julia",
|
|
210
|
+
startState: function() {
|
|
211
|
+
return {
|
|
212
|
+
tokenize: n,
|
|
213
|
+
scopes: [],
|
|
214
|
+
lastToken: null,
|
|
215
|
+
leavingExpr: !1,
|
|
216
|
+
isDefinition: !1,
|
|
217
|
+
nestedArrays: 0,
|
|
218
|
+
nestedComments: 0,
|
|
219
|
+
nestedGenerators: 0,
|
|
220
|
+
nestedParameters: 0,
|
|
221
|
+
firstParenPos: -1
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
token: function(e, t) {
|
|
225
|
+
var r = t.tokenize(e, t), a = e.current();
|
|
226
|
+
return a && r && (t.lastToken = a), r;
|
|
227
|
+
},
|
|
228
|
+
indent: function(e, t, r) {
|
|
229
|
+
var a = 0;
|
|
230
|
+
return (t === "]" || t === ")" || /^end\b/.test(t) || /^else/.test(t) || /^catch\b/.test(t) || /^elseif\b/.test(t) || /^finally/.test(t)) && (a = -1), (e.scopes.length + a) * r.unit;
|
|
231
|
+
},
|
|
232
|
+
languageData: {
|
|
233
|
+
indentOnInput: /^\s*(end|else|catch|finally)\b$/,
|
|
234
|
+
commentTokens: { line: "#", block: { open: "#=", close: "=#" } },
|
|
235
|
+
closeBrackets: { brackets: ["(", "[", "{", '"'] },
|
|
236
|
+
autocomplete: f.concat(m)
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
export {
|
|
240
|
+
q as julia
|
|
241
|
+
};
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
var m = function(e, t) {
|
|
2
|
+
var a = t.next || "start";
|
|
3
|
+
{
|
|
4
|
+
t.next = t.next;
|
|
5
|
+
var k = x[a];
|
|
6
|
+
if (k.splice) {
|
|
7
|
+
for (var l = 0; l < k.length; ++l) {
|
|
8
|
+
var r = k[l];
|
|
9
|
+
if (r.regex && e.match(r.regex))
|
|
10
|
+
return t.next = r.next || t.next, r.token;
|
|
11
|
+
}
|
|
12
|
+
return e.next(), "error";
|
|
13
|
+
}
|
|
14
|
+
if (e.match(r = x[a]))
|
|
15
|
+
return r.regex && e.match(r.regex) ? (t.next = r.next, r.token) : (e.next(), "error");
|
|
16
|
+
}
|
|
17
|
+
return e.next(), "error";
|
|
18
|
+
}, i = "(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*", p = RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*" + i + ")?))\\s*$"), n = "(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))", o = {
|
|
19
|
+
token: "string",
|
|
20
|
+
regex: ".+"
|
|
21
|
+
}, x = {
|
|
22
|
+
start: [
|
|
23
|
+
{
|
|
24
|
+
token: "docComment",
|
|
25
|
+
regex: "/\\*",
|
|
26
|
+
next: "comment"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
token: "comment",
|
|
30
|
+
regex: "#.*"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
token: "keyword",
|
|
34
|
+
regex: "(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)" + n
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
token: "atom",
|
|
38
|
+
regex: "(?:true|false|yes|no|on|off|null|void|undefined)" + n
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
token: "invalid",
|
|
42
|
+
regex: "(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)" + n
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
token: "className.standard",
|
|
46
|
+
regex: "(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)" + n
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
token: "variableName.function.standard",
|
|
50
|
+
regex: "(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)" + n
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
token: "variableName.standard",
|
|
54
|
+
regex: "(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)" + n
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
token: "variableName",
|
|
58
|
+
regex: i + "\\s*:(?![:=])"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
token: "variableName",
|
|
62
|
+
regex: i
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
token: "operatorKeyword",
|
|
66
|
+
regex: "(?:\\.{3}|\\s+\\?)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
token: "keyword",
|
|
70
|
+
regex: "(?:@+|::|\\.\\.)",
|
|
71
|
+
next: "key"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
token: "operatorKeyword",
|
|
75
|
+
regex: "\\.\\s*",
|
|
76
|
+
next: "key"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
token: "string",
|
|
80
|
+
regex: "\\\\\\S[^\\s,;)}\\]]*"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
token: "docString",
|
|
84
|
+
regex: "'''",
|
|
85
|
+
next: "qdoc"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
token: "docString",
|
|
89
|
+
regex: '"""',
|
|
90
|
+
next: "qqdoc"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
token: "string",
|
|
94
|
+
regex: "'",
|
|
95
|
+
next: "qstring"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
token: "string",
|
|
99
|
+
regex: '"',
|
|
100
|
+
next: "qqstring"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
token: "string",
|
|
104
|
+
regex: "`",
|
|
105
|
+
next: "js"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
token: "string",
|
|
109
|
+
regex: "<\\[",
|
|
110
|
+
next: "words"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
token: "regexp",
|
|
114
|
+
regex: "//",
|
|
115
|
+
next: "heregex"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
token: "regexp",
|
|
119
|
+
regex: "\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",
|
|
120
|
+
next: "key"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
token: "number",
|
|
124
|
+
regex: "(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
token: "paren",
|
|
128
|
+
regex: "[({[]"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
token: "paren",
|
|
132
|
+
regex: "[)}\\]]",
|
|
133
|
+
next: "key"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
token: "operatorKeyword",
|
|
137
|
+
regex: "\\S+"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
token: "content",
|
|
141
|
+
regex: "\\s+"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
heregex: [
|
|
145
|
+
{
|
|
146
|
+
token: "regexp",
|
|
147
|
+
regex: ".*?//[gimy$?]{0,4}",
|
|
148
|
+
next: "start"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
token: "regexp",
|
|
152
|
+
regex: "\\s*#{"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
token: "comment",
|
|
156
|
+
regex: "\\s+(?:#.*)?"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
token: "regexp",
|
|
160
|
+
regex: "\\S+"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
key: [
|
|
164
|
+
{
|
|
165
|
+
token: "operatorKeyword",
|
|
166
|
+
regex: "[.?@!]+"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
token: "variableName",
|
|
170
|
+
regex: i,
|
|
171
|
+
next: "start"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
token: "content",
|
|
175
|
+
regex: "",
|
|
176
|
+
next: "start"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
comment: [
|
|
180
|
+
{
|
|
181
|
+
token: "docComment",
|
|
182
|
+
regex: ".*?\\*/",
|
|
183
|
+
next: "start"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
token: "docComment",
|
|
187
|
+
regex: ".+"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
qdoc: [
|
|
191
|
+
{
|
|
192
|
+
token: "string",
|
|
193
|
+
regex: ".*?'''",
|
|
194
|
+
next: "key"
|
|
195
|
+
},
|
|
196
|
+
o
|
|
197
|
+
],
|
|
198
|
+
qqdoc: [
|
|
199
|
+
{
|
|
200
|
+
token: "string",
|
|
201
|
+
regex: '.*?"""',
|
|
202
|
+
next: "key"
|
|
203
|
+
},
|
|
204
|
+
o
|
|
205
|
+
],
|
|
206
|
+
qstring: [
|
|
207
|
+
{
|
|
208
|
+
token: "string",
|
|
209
|
+
regex: "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
|
|
210
|
+
next: "key"
|
|
211
|
+
},
|
|
212
|
+
o
|
|
213
|
+
],
|
|
214
|
+
qqstring: [
|
|
215
|
+
{
|
|
216
|
+
token: "string",
|
|
217
|
+
regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
|
|
218
|
+
next: "key"
|
|
219
|
+
},
|
|
220
|
+
o
|
|
221
|
+
],
|
|
222
|
+
js: [
|
|
223
|
+
{
|
|
224
|
+
token: "string",
|
|
225
|
+
regex: "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
|
|
226
|
+
next: "key"
|
|
227
|
+
},
|
|
228
|
+
o
|
|
229
|
+
],
|
|
230
|
+
words: [
|
|
231
|
+
{
|
|
232
|
+
token: "string",
|
|
233
|
+
regex: ".*?\\]>",
|
|
234
|
+
next: "key"
|
|
235
|
+
},
|
|
236
|
+
o
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
for (var d in x) {
|
|
240
|
+
var g = x[d];
|
|
241
|
+
if (g.splice)
|
|
242
|
+
for (var s = 0, u = g.length; s < u; ++s) {
|
|
243
|
+
var c = g[s];
|
|
244
|
+
typeof c.regex == "string" && (x[d][s].regex = new RegExp("^" + c.regex));
|
|
245
|
+
}
|
|
246
|
+
else typeof c.regex == "string" && (x[d].regex = new RegExp("^" + g.regex));
|
|
247
|
+
}
|
|
248
|
+
const y = {
|
|
249
|
+
name: "livescript",
|
|
250
|
+
startState: function() {
|
|
251
|
+
return {
|
|
252
|
+
next: "start",
|
|
253
|
+
lastToken: { style: null, indent: 0, content: "" }
|
|
254
|
+
};
|
|
255
|
+
},
|
|
256
|
+
token: function(e, t) {
|
|
257
|
+
for (; e.pos == e.start; )
|
|
258
|
+
var a = m(e, t);
|
|
259
|
+
return t.lastToken = {
|
|
260
|
+
style: a,
|
|
261
|
+
indent: e.indentation(),
|
|
262
|
+
content: e.current()
|
|
263
|
+
}, a.replace(/\./g, " ");
|
|
264
|
+
},
|
|
265
|
+
indent: function(e) {
|
|
266
|
+
var t = e.lastToken.indent;
|
|
267
|
+
return e.lastToken.content.match(p) && (t += 2), t;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
export {
|
|
271
|
+
y as liveScript
|
|
272
|
+
};
|