@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,68 @@
|
|
|
1
|
+
var i = function(e) {
|
|
2
|
+
return new RegExp("^(?:" + e.join("|") + ")$", "i");
|
|
3
|
+
}, p = function(e) {
|
|
4
|
+
a = null;
|
|
5
|
+
var t = e.next();
|
|
6
|
+
if (t === '"')
|
|
7
|
+
return e.match(/^.*?"/), "string";
|
|
8
|
+
if (t === "'")
|
|
9
|
+
return e.match(/^.*?'/), "string";
|
|
10
|
+
if (/[{}\(\),\.;\[\]]/.test(t))
|
|
11
|
+
return a = t, "punctuation";
|
|
12
|
+
if (t === "/" && e.eat("/"))
|
|
13
|
+
return e.skipToEnd(), "comment";
|
|
14
|
+
if (d.test(t))
|
|
15
|
+
return e.eatWhile(d), null;
|
|
16
|
+
if (e.eatWhile(/[_\w\d]/), e.eat(":"))
|
|
17
|
+
return e.eatWhile(/[\w\d_\-]/), "atom";
|
|
18
|
+
var n = e.current();
|
|
19
|
+
return u.test(n) ? "builtin" : m.test(n) ? "def" : x.test(n) || h.test(n) ? "keyword" : "variable";
|
|
20
|
+
}, o = function(e, t, n) {
|
|
21
|
+
return e.context = {
|
|
22
|
+
prev: e.context,
|
|
23
|
+
indent: e.indent,
|
|
24
|
+
col: n,
|
|
25
|
+
type: t
|
|
26
|
+
};
|
|
27
|
+
}, s = function(e) {
|
|
28
|
+
return e.indent = e.context.indent, e.context = e.context.prev;
|
|
29
|
+
}, a, u = i(["abs", "acos", "allShortestPaths", "asin", "atan", "atan2", "avg", "ceil", "coalesce", "collect", "cos", "cot", "count", "degrees", "e", "endnode", "exp", "extract", "filter", "floor", "haversin", "head", "id", "keys", "labels", "last", "left", "length", "log", "log10", "lower", "ltrim", "max", "min", "node", "nodes", "percentileCont", "percentileDisc", "pi", "radians", "rand", "range", "reduce", "rel", "relationship", "relationships", "replace", "reverse", "right", "round", "rtrim", "shortestPath", "sign", "sin", "size", "split", "sqrt", "startnode", "stdev", "stdevp", "str", "substring", "sum", "tail", "tan", "timestamp", "toFloat", "toInt", "toString", "trim", "type", "upper"]), m = i(["all", "and", "any", "contains", "exists", "has", "in", "none", "not", "or", "single", "xor"]), x = i(["as", "asc", "ascending", "assert", "by", "case", "commit", "constraint", "create", "csv", "cypher", "delete", "desc", "descending", "detach", "distinct", "drop", "else", "end", "ends", "explain", "false", "fieldterminator", "foreach", "from", "headers", "in", "index", "is", "join", "limit", "load", "match", "merge", "null", "on", "optional", "order", "periodic", "profile", "remove", "return", "scan", "set", "skip", "start", "starts", "then", "true", "union", "unique", "unwind", "using", "when", "where", "with", "call", "yield"]), h = i(["access", "active", "assign", "all", "alter", "as", "catalog", "change", "copy", "create", "constraint", "constraints", "current", "database", "databases", "dbms", "default", "deny", "drop", "element", "elements", "exists", "from", "grant", "graph", "graphs", "if", "index", "indexes", "label", "labels", "management", "match", "name", "names", "new", "node", "nodes", "not", "of", "on", "or", "password", "populated", "privileges", "property", "read", "relationship", "relationships", "remove", "replace", "required", "revoke", "role", "roles", "set", "show", "start", "status", "stop", "suspended", "to", "traverse", "type", "types", "user", "users", "with", "write"]), d = /[*+\-<>=&|~%^]/;
|
|
30
|
+
const f = {
|
|
31
|
+
name: "cypher",
|
|
32
|
+
startState: function() {
|
|
33
|
+
return {
|
|
34
|
+
tokenize: p,
|
|
35
|
+
context: null,
|
|
36
|
+
indent: 0,
|
|
37
|
+
col: 0
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
token: function(e, t) {
|
|
41
|
+
if (e.sol() && (t.context && t.context.align == null && (t.context.align = !1), t.indent = e.indentation()), e.eatSpace())
|
|
42
|
+
return null;
|
|
43
|
+
var n = t.tokenize(e, t);
|
|
44
|
+
if (n !== "comment" && t.context && t.context.align == null && t.context.type !== "pattern" && (t.context.align = !0), a === "(")
|
|
45
|
+
o(t, ")", e.column());
|
|
46
|
+
else if (a === "[")
|
|
47
|
+
o(t, "]", e.column());
|
|
48
|
+
else if (a === "{")
|
|
49
|
+
o(t, "}", e.column());
|
|
50
|
+
else if (/[\]\}\)]/.test(a)) {
|
|
51
|
+
for (; t.context && t.context.type === "pattern"; )
|
|
52
|
+
s(t);
|
|
53
|
+
t.context && a === t.context.type && s(t);
|
|
54
|
+
} else a === "." && t.context && t.context.type === "pattern" ? s(t) : /atom|string|variable/.test(n) && t.context && (/[\}\]]/.test(t.context.type) ? o(t, "pattern", e.column()) : t.context.type === "pattern" && !t.context.align && (t.context.align = !0, t.context.col = e.column()));
|
|
55
|
+
return n;
|
|
56
|
+
},
|
|
57
|
+
indent: function(e, t, n) {
|
|
58
|
+
var l = t && t.charAt(0), r = e.context;
|
|
59
|
+
if (/[\]\}]/.test(l))
|
|
60
|
+
for (; r && r.type === "pattern"; )
|
|
61
|
+
r = r.prev;
|
|
62
|
+
var c = r && l === r.type;
|
|
63
|
+
return r ? r.type === "keywords" ? null : r.align ? r.col + (c ? 0 : 1) : r.indent + (c ? 0 : n.unit) : 0;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
f as cypher
|
|
68
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
function s(t) {
|
|
2
|
+
for (var e = {}, n = t.split(" "), r = 0; r < n.length; ++r) e[n[r]] = !0;
|
|
3
|
+
return e;
|
|
4
|
+
}
|
|
5
|
+
var f = "body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";
|
|
6
|
+
const i = {
|
|
7
|
+
keywords: s("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + f),
|
|
8
|
+
blockKeywords: s(f),
|
|
9
|
+
builtin: s("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),
|
|
10
|
+
atoms: s("exit failure success true false null"),
|
|
11
|
+
hooks: {
|
|
12
|
+
"@": function(t, e) {
|
|
13
|
+
return t.eatWhile(/[\w\$_]/), "meta";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var v = i.statementIndentUnit, x = i.keywords, g = i.builtin, d = i.blockKeywords, w = i.atoms, m = i.hooks, _ = i.multiLineStrings, p = /[+\-*&%=<>!?|\/]/, o;
|
|
18
|
+
function y(t, e) {
|
|
19
|
+
var n = t.next();
|
|
20
|
+
if (m[n]) {
|
|
21
|
+
var r = m[n](t, e);
|
|
22
|
+
if (r !== !1) return r;
|
|
23
|
+
}
|
|
24
|
+
if (n == '"' || n == "'" || n == "`")
|
|
25
|
+
return e.tokenize = z(n), e.tokenize(t, e);
|
|
26
|
+
if (/[\[\]{}\(\),;\:\.]/.test(n))
|
|
27
|
+
return o = n, null;
|
|
28
|
+
if (/\d/.test(n))
|
|
29
|
+
return t.eatWhile(/[\w\.]/), "number";
|
|
30
|
+
if (n == "/") {
|
|
31
|
+
if (t.eat("+"))
|
|
32
|
+
return e.tokenize = b, b(t, e);
|
|
33
|
+
if (t.eat("*"))
|
|
34
|
+
return e.tokenize = h, h(t, e);
|
|
35
|
+
if (t.eat("/"))
|
|
36
|
+
return t.skipToEnd(), "comment";
|
|
37
|
+
}
|
|
38
|
+
if (p.test(n))
|
|
39
|
+
return t.eatWhile(p), "operator";
|
|
40
|
+
t.eatWhile(/[\w\$_\xa1-\uffff]/);
|
|
41
|
+
var a = t.current();
|
|
42
|
+
return x.propertyIsEnumerable(a) ? (d.propertyIsEnumerable(a) && (o = "newstatement"), "keyword") : g.propertyIsEnumerable(a) ? (d.propertyIsEnumerable(a) && (o = "newstatement"), "builtin") : w.propertyIsEnumerable(a) ? "atom" : "variable";
|
|
43
|
+
}
|
|
44
|
+
function z(t) {
|
|
45
|
+
return function(e, n) {
|
|
46
|
+
for (var r = !1, a, l = !1; (a = e.next()) != null; ) {
|
|
47
|
+
if (a == t && !r) {
|
|
48
|
+
l = !0;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
r = !r && a == "\\";
|
|
52
|
+
}
|
|
53
|
+
return (l || !(r || _)) && (n.tokenize = null), "string";
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function h(t, e) {
|
|
57
|
+
for (var n = !1, r; r = t.next(); ) {
|
|
58
|
+
if (r == "/" && n) {
|
|
59
|
+
e.tokenize = null;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
n = r == "*";
|
|
63
|
+
}
|
|
64
|
+
return "comment";
|
|
65
|
+
}
|
|
66
|
+
function b(t, e) {
|
|
67
|
+
for (var n = !1, r; r = t.next(); ) {
|
|
68
|
+
if (r == "/" && n) {
|
|
69
|
+
e.tokenize = null;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
n = r == "+";
|
|
73
|
+
}
|
|
74
|
+
return "comment";
|
|
75
|
+
}
|
|
76
|
+
function k(t, e, n, r, a) {
|
|
77
|
+
this.indented = t, this.column = e, this.type = n, this.align = r, this.prev = a;
|
|
78
|
+
}
|
|
79
|
+
function c(t, e, n) {
|
|
80
|
+
var r = t.indented;
|
|
81
|
+
return t.context && t.context.type == "statement" && (r = t.context.indented), t.context = new k(r, e, n, null, t.context);
|
|
82
|
+
}
|
|
83
|
+
function u(t) {
|
|
84
|
+
var e = t.context.type;
|
|
85
|
+
return (e == ")" || e == "]" || e == "}") && (t.indented = t.context.indented), t.context = t.context.prev;
|
|
86
|
+
}
|
|
87
|
+
const E = {
|
|
88
|
+
name: "d",
|
|
89
|
+
startState: function(t) {
|
|
90
|
+
return {
|
|
91
|
+
tokenize: null,
|
|
92
|
+
context: new k(-t, 0, "top", !1),
|
|
93
|
+
indented: 0,
|
|
94
|
+
startOfLine: !0
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
token: function(t, e) {
|
|
98
|
+
var n = e.context;
|
|
99
|
+
if (t.sol() && (n.align == null && (n.align = !1), e.indented = t.indentation(), e.startOfLine = !0), t.eatSpace()) return null;
|
|
100
|
+
o = null;
|
|
101
|
+
var r = (e.tokenize || y)(t, e);
|
|
102
|
+
if (r == "comment" || r == "meta") return r;
|
|
103
|
+
if (n.align == null && (n.align = !0), (o == ";" || o == ":" || o == ",") && n.type == "statement") u(e);
|
|
104
|
+
else if (o == "{") c(e, t.column(), "}");
|
|
105
|
+
else if (o == "[") c(e, t.column(), "]");
|
|
106
|
+
else if (o == "(") c(e, t.column(), ")");
|
|
107
|
+
else if (o == "}") {
|
|
108
|
+
for (; n.type == "statement"; ) n = u(e);
|
|
109
|
+
for (n.type == "}" && (n = u(e)); n.type == "statement"; ) n = u(e);
|
|
110
|
+
} else o == n.type ? u(e) : ((n.type == "}" || n.type == "top") && o != ";" || n.type == "statement" && o == "newstatement") && c(e, t.column(), "statement");
|
|
111
|
+
return e.startOfLine = !1, r;
|
|
112
|
+
},
|
|
113
|
+
indent: function(t, e, n) {
|
|
114
|
+
if (t.tokenize != y && t.tokenize != null) return null;
|
|
115
|
+
var r = t.context, a = e && e.charAt(0);
|
|
116
|
+
r.type == "statement" && a == "}" && (r = r.prev);
|
|
117
|
+
var l = a == r.type;
|
|
118
|
+
return r.type == "statement" ? r.indented + (a == "{" ? 0 : v || n.unit) : r.align ? r.column + (l ? 0 : 1) : r.indented + (l ? 0 : n.unit);
|
|
119
|
+
},
|
|
120
|
+
languageData: {
|
|
121
|
+
indentOnInput: /^\s*[{}]$/,
|
|
122
|
+
commentTokens: { line: "//", block: { open: "/*", close: "*/" } }
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
E as d
|
|
127
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var t = {
|
|
2
|
+
"+": "inserted",
|
|
3
|
+
"-": "deleted",
|
|
4
|
+
"@": "meta"
|
|
5
|
+
};
|
|
6
|
+
const o = {
|
|
7
|
+
name: "diff",
|
|
8
|
+
token: function(e) {
|
|
9
|
+
var r = e.string.search(/[\t ]+?$/);
|
|
10
|
+
if (!e.sol() || r === 0)
|
|
11
|
+
return e.skipToEnd(), ("error " + (t[e.string.charAt(0)] || "")).replace(/ $/, "");
|
|
12
|
+
var i = t[e.peek()] || e.skipToEnd();
|
|
13
|
+
return r === -1 ? e.skipToEnd() : e.pos = r, i;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
o as diff
|
|
18
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { k as o } from "./simple-mode-mNVtnu0l-BC8mf7KF.js";
|
|
2
|
+
var e = "from", l = new RegExp("^(\\s*)\\b(" + e + ")\\b", "i"), n = ["run", "cmd", "entrypoint", "shell"], s = new RegExp("^(\\s*)(" + n.join("|") + ")(\\s+\\[)", "i"), t = "expose", x = new RegExp("^(\\s*)(" + t + ")(\\s+)", "i"), g = [
|
|
3
|
+
"arg",
|
|
4
|
+
"from",
|
|
5
|
+
"maintainer",
|
|
6
|
+
"label",
|
|
7
|
+
"env",
|
|
8
|
+
"add",
|
|
9
|
+
"copy",
|
|
10
|
+
"volume",
|
|
11
|
+
"user",
|
|
12
|
+
"workdir",
|
|
13
|
+
"onbuild",
|
|
14
|
+
"stopsignal",
|
|
15
|
+
"healthcheck",
|
|
16
|
+
"shell"
|
|
17
|
+
], u = [e, t].concat(n).concat(g), r = "(" + u.join("|") + ")", k = new RegExp("^(\\s*)" + r + "(\\s*)(#.*)?$", "i"), a = new RegExp("^(\\s*)" + r + "(\\s+)", "i");
|
|
18
|
+
const m = o({
|
|
19
|
+
start: [
|
|
20
|
+
// Block comment: This is a line starting with a comment
|
|
21
|
+
{
|
|
22
|
+
regex: /^\s*#.*$/,
|
|
23
|
+
sol: !0,
|
|
24
|
+
token: "comment"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
regex: l,
|
|
28
|
+
token: [null, "keyword"],
|
|
29
|
+
sol: !0,
|
|
30
|
+
next: "from"
|
|
31
|
+
},
|
|
32
|
+
// Highlight an instruction without any arguments (for convenience)
|
|
33
|
+
{
|
|
34
|
+
regex: k,
|
|
35
|
+
token: [null, "keyword", null, "error"],
|
|
36
|
+
sol: !0
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
regex: s,
|
|
40
|
+
token: [null, "keyword", null],
|
|
41
|
+
sol: !0,
|
|
42
|
+
next: "array"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
regex: x,
|
|
46
|
+
token: [null, "keyword", null],
|
|
47
|
+
sol: !0,
|
|
48
|
+
next: "expose"
|
|
49
|
+
},
|
|
50
|
+
// Highlight an instruction followed by arguments
|
|
51
|
+
{
|
|
52
|
+
regex: a,
|
|
53
|
+
token: [null, "keyword", null],
|
|
54
|
+
sol: !0,
|
|
55
|
+
next: "arguments"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
regex: /./,
|
|
59
|
+
token: null
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
from: [
|
|
63
|
+
{
|
|
64
|
+
regex: /\s*$/,
|
|
65
|
+
token: null,
|
|
66
|
+
next: "start"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
// Line comment without instruction arguments is an error
|
|
70
|
+
regex: /(\s*)(#.*)$/,
|
|
71
|
+
token: [null, "error"],
|
|
72
|
+
next: "start"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
regex: /(\s*\S+\s+)(as)/i,
|
|
76
|
+
token: [null, "keyword"],
|
|
77
|
+
next: "start"
|
|
78
|
+
},
|
|
79
|
+
// Fail safe return to start
|
|
80
|
+
{
|
|
81
|
+
token: null,
|
|
82
|
+
next: "start"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
single: [
|
|
86
|
+
{
|
|
87
|
+
regex: /(?:[^\\']|\\.)/,
|
|
88
|
+
token: "string"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
regex: /'/,
|
|
92
|
+
token: "string",
|
|
93
|
+
pop: !0
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
double: [
|
|
97
|
+
{
|
|
98
|
+
regex: /(?:[^\\"]|\\.)/,
|
|
99
|
+
token: "string"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
regex: /"/,
|
|
103
|
+
token: "string",
|
|
104
|
+
pop: !0
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
array: [
|
|
108
|
+
{
|
|
109
|
+
regex: /\]/,
|
|
110
|
+
token: null,
|
|
111
|
+
next: "start"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
regex: /"(?:[^\\"]|\\.)*"?/,
|
|
115
|
+
token: "string"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
expose: [
|
|
119
|
+
{
|
|
120
|
+
regex: /\d+$/,
|
|
121
|
+
token: "number",
|
|
122
|
+
next: "start"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
regex: /[^\d]+$/,
|
|
126
|
+
token: null,
|
|
127
|
+
next: "start"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
regex: /\d+/,
|
|
131
|
+
token: "number"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
regex: /[^\d]+/,
|
|
135
|
+
token: null
|
|
136
|
+
},
|
|
137
|
+
// Fail safe return to start
|
|
138
|
+
{
|
|
139
|
+
token: null,
|
|
140
|
+
next: "start"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
arguments: [
|
|
144
|
+
{
|
|
145
|
+
regex: /^\s*#.*$/,
|
|
146
|
+
sol: !0,
|
|
147
|
+
token: "comment"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
regex: /"(?:[^\\"]|\\.)*"?$/,
|
|
151
|
+
token: "string",
|
|
152
|
+
next: "start"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
regex: /"/,
|
|
156
|
+
token: "string",
|
|
157
|
+
push: "double"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
regex: /'(?:[^\\']|\\.)*'?$/,
|
|
161
|
+
token: "string",
|
|
162
|
+
next: "start"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
regex: /'/,
|
|
166
|
+
token: "string",
|
|
167
|
+
push: "single"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
regex: /[^#"']+[\\`]$/,
|
|
171
|
+
token: null
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
regex: /[^#"']+$/,
|
|
175
|
+
token: null,
|
|
176
|
+
next: "start"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
regex: /[^#"']+/,
|
|
180
|
+
token: null
|
|
181
|
+
},
|
|
182
|
+
// Fail safe return to start
|
|
183
|
+
{
|
|
184
|
+
token: null,
|
|
185
|
+
next: "start"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
languageData: {
|
|
189
|
+
commentTokens: { line: "#" }
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
export {
|
|
193
|
+
m as dockerFile
|
|
194
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var a;
|
|
2
|
+
function u(e, t) {
|
|
3
|
+
return a = t, e;
|
|
4
|
+
}
|
|
5
|
+
function i(e, t) {
|
|
6
|
+
var n = e.next();
|
|
7
|
+
if (n == "<" && e.eat("!")) {
|
|
8
|
+
if (e.eatWhile(/[\-]/))
|
|
9
|
+
return t.tokenize = o, o(e, t);
|
|
10
|
+
if (e.eatWhile(/[\w]/)) return u("keyword", "doindent");
|
|
11
|
+
} else {
|
|
12
|
+
if (n == "<" && e.eat("?"))
|
|
13
|
+
return t.tokenize = c("meta", "?>"), u("meta", n);
|
|
14
|
+
if (n == "#" && e.eatWhile(/[\w]/)) return u("atom", "tag");
|
|
15
|
+
if (n == "|") return u("keyword", "separator");
|
|
16
|
+
if (n.match(/[\(\)\[\]\-\.,\+\?>]/)) return u(null, n);
|
|
17
|
+
if (n.match(/[\[\]]/)) return u("rule", n);
|
|
18
|
+
if (n == '"' || n == "'")
|
|
19
|
+
return t.tokenize = s(n), t.tokenize(e, t);
|
|
20
|
+
if (e.eatWhile(/[a-zA-Z\?\+\d]/)) {
|
|
21
|
+
var r = e.current();
|
|
22
|
+
return r.substr(r.length - 1, r.length).match(/\?|\+/) !== null && e.backUp(1), u("tag", "tag");
|
|
23
|
+
} else return n == "%" || n == "*" ? u("number", "number") : (e.eatWhile(/[\w\\\-_%.{,]/), u(null, null));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function o(e, t) {
|
|
27
|
+
for (var n = 0, r; (r = e.next()) != null; ) {
|
|
28
|
+
if (n >= 2 && r == ">") {
|
|
29
|
+
t.tokenize = i;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
n = r == "-" ? n + 1 : 0;
|
|
33
|
+
}
|
|
34
|
+
return u("comment", "comment");
|
|
35
|
+
}
|
|
36
|
+
function s(e) {
|
|
37
|
+
return function(t, n) {
|
|
38
|
+
for (var r = !1, l; (l = t.next()) != null; ) {
|
|
39
|
+
if (l == e && !r) {
|
|
40
|
+
n.tokenize = i;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
r = !r && l == "\\";
|
|
44
|
+
}
|
|
45
|
+
return u("string", "tag");
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function c(e, t) {
|
|
49
|
+
return function(n, r) {
|
|
50
|
+
for (; !n.eol(); ) {
|
|
51
|
+
if (n.match(t)) {
|
|
52
|
+
r.tokenize = i;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
n.next();
|
|
56
|
+
}
|
|
57
|
+
return e;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const k = {
|
|
61
|
+
name: "dtd",
|
|
62
|
+
startState: function() {
|
|
63
|
+
return {
|
|
64
|
+
tokenize: i,
|
|
65
|
+
baseIndent: 0,
|
|
66
|
+
stack: []
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
token: function(e, t) {
|
|
70
|
+
if (e.eatSpace()) return null;
|
|
71
|
+
var n = t.tokenize(e, t), r = t.stack[t.stack.length - 1];
|
|
72
|
+
return e.current() == "[" || a === "doindent" || a == "[" ? t.stack.push("rule") : a === "endtag" ? t.stack[t.stack.length - 1] = "endtag" : e.current() == "]" || a == "]" || a == ">" && r == "rule" ? t.stack.pop() : a == "[" && t.stack.push("["), n;
|
|
73
|
+
},
|
|
74
|
+
indent: function(e, t, n) {
|
|
75
|
+
var r = e.stack.length;
|
|
76
|
+
return t.charAt(0) === "]" ? r-- : t.substr(t.length - 1, t.length) === ">" && (t.substr(0, 1) === "<" || a == "doindent" && t.length > 1 || (a == "doindent" ? r-- : a == ">" && t.length > 1 || a == "tag" && t !== ">" || (a == "tag" && e.stack[e.stack.length - 1] == "rule" ? r-- : a == "tag" ? r++ : t === ">" && e.stack[e.stack.length - 1] == "rule" && a === ">" ? r-- : t === ">" && e.stack[e.stack.length - 1] == "rule" || (t.substr(0, 1) !== "<" && t.substr(0, 1) === ">" ? r = r - 1 : t === ">" || (r = r - 1)))), (a == null || a == "]") && r--), e.baseIndent + r * n.unit;
|
|
77
|
+
},
|
|
78
|
+
languageData: {
|
|
79
|
+
indentOnInput: /^\s*[\]>]$/
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
k as dtd
|
|
84
|
+
};
|