vue-form-craft 2.0.11 → 2.0.13
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/README.md +12 -29
- package/dist/{add-hT59kaby.mjs → add-EoHoyHmQ.mjs} +1 -1
- package/dist/alert-k2rZ-pm2.mjs +53 -0
- package/dist/apl-p0IPP13W.mjs +76 -0
- package/dist/asciiarmor-lJsBxlJJ.mjs +34 -0
- package/dist/asn1-Q9v1zIy5.mjs +102 -0
- package/dist/asterisk-foNkeTjy.mjs +273 -0
- package/dist/brainfuck-0XqyXpNS.mjs +35 -0
- package/dist/{button-GY4d9Y6s.mjs → button-9A6flrTc.mjs} +1 -1
- package/dist/{card-bnWsX8LP.mjs → card-l2TDXmyi.mjs} +1 -1
- package/dist/{cascader-cQst1g0E.mjs → cascader-f8QsYkto.mjs} +1 -1
- package/dist/{checkbox-JWtn28zw.mjs → checkbox-QUwlzHGM.mjs} +1 -1
- package/dist/clike-ak6Z6Yhe.mjs +639 -0
- package/dist/clojure-iYO8U8Sg.mjs +810 -0
- package/dist/cmake-SVzjkxV_.mjs +28 -0
- package/dist/cobol-APHEnAOX.mjs +74 -0
- package/dist/coffeescript-KqQa0SYG.mjs +182 -0
- package/dist/{colorPicker-93LeRPg9.mjs → colorPicker-x6N46_O2.mjs} +1 -1
- package/dist/commonlisp-bwqNqR5V.mjs +79 -0
- package/dist/crystal-BViWuDpA.mjs +217 -0
- package/dist/css-KHXHXfXg.mjs +1572 -0
- package/dist/cypher-XpTt4zQ3.mjs +69 -0
- package/dist/d-fLig6yqY.mjs +139 -0
- package/dist/datePicker-j8yNXBHs.mjs +50 -0
- package/dist/{delete-f_cJBSDh.mjs → delete-xBVATMBo.mjs} +1 -1
- package/dist/{design-yP5EOwhK.mjs → design-x1NREnN9.mjs} +1 -1
- package/dist/diff-WoKGLpy6.mjs +18 -0
- package/dist/dockerfile-P8izJOAf.mjs +194 -0
- package/dist/{document-uyarkumr.mjs → document-O73HbdUh.mjs} +1 -1
- package/dist/dtd-SIJRUW6K.mjs +91 -0
- package/dist/dylan-4HCLhpWP.mjs +238 -0
- package/dist/ebnf-h_0lged5.mjs +77 -0
- package/dist/ecl-Lf4FF0lf.mjs +133 -0
- package/dist/eiffel-qlw8KUyf.mjs +112 -0
- package/dist/elm-QRnB3zXs.mjs +108 -0
- package/dist/erlang-fyVKb7eK.mjs +488 -0
- package/dist/factor-Uq0_GFro.mjs +65 -0
- package/dist/fcl-lRek3hEb.mjs +106 -0
- package/dist/{formList-F8r2l1dB.mjs → formList-hPtEP4Ky.mjs} +1 -1
- package/dist/forth-ua2bRd8T.mjs +60 -0
- package/dist/fortran-WnF7znuN.mjs +443 -0
- package/dist/gas-wowve1o7.mjs +183 -0
- package/dist/gherkin-m7GIChu3.mjs +34 -0
- package/dist/{github-fWRoD_no.mjs → github-KoINobLU.mjs} +1 -1
- package/dist/go-th443Dhb.mjs +158 -0
- package/dist/groovy-tR4RiZnc.mjs +161 -0
- package/dist/haskell-jxVBofv5.mjs +375 -0
- package/dist/haxe-kWPI2tq3.mjs +390 -0
- package/dist/{help-R2LNu7-e.mjs → help-749fhL2P.mjs} +1 -1
- package/dist/http-3GIFWUlG.mjs +45 -0
- package/dist/idl-PvpMZg-l.mjs +947 -0
- package/dist/index-2tOJGL07.mjs +546 -0
- package/dist/index-4wIoK2RV.mjs +76 -0
- package/dist/index-M2pAYnZp.mjs +283 -0
- package/dist/index-NVqZrKkn.mjs +514 -0
- package/dist/index-VLqU2s7k.mjs +99 -0
- package/dist/index-WbISJBFk.mjs +269 -0
- package/dist/index-bbmdPhh5.mjs +163 -0
- package/dist/index-hlA8jpbU.mjs +72 -0
- package/dist/index-k-kmrmDd.mjs +59 -0
- package/dist/index-n44sZXuD.mjs +94 -0
- package/dist/index-p8r3iIzE.mjs +135 -0
- package/dist/index-tLyNcnK8.mjs +141 -0
- package/dist/index-xJCbZsUA.mjs +315 -0
- package/dist/{inline-gwroQeui.mjs → inline-LgsKoZk8.mjs} +1 -1
- package/dist/{input-P8xcJTDu.mjs → input-w22Mgu7d.mjs} +1 -1
- package/dist/{inputNumber-Gq34hoEc.mjs → inputNumber-P71Xzdju.mjs} +1 -1
- package/dist/{itemGroup-h-VYg8H6.mjs → itemGroup-F537CR5s.mjs} +1 -1
- package/dist/javascript-8ZHqHagw.mjs +758 -0
- package/dist/jinja2-vsOFe0qD.mjs +154 -0
- package/dist/{jsonEdit-qjj06Ro-.mjs → jsonEdit-SFTAL9sz.mjs} +1 -1
- package/dist/julia-dlp_pbN1.mjs +241 -0
- package/dist/{library-xpeMt_p0.mjs → library-um2AxRlt.mjs} +1 -1
- package/dist/livescript-Gf5R-LT6.mjs +273 -0
- package/dist/lua-c5Y_JsBp.mjs +221 -0
- package/dist/markdown-WScJtLZn.mjs +31 -0
- package/dist/mathematica-iiGTGmUs.mjs +35 -0
- package/dist/mbox-ZJh86H8B.mjs +78 -0
- package/dist/md/FormDesignDoc.md +44 -0
- package/dist/md/globalConfig.md +22 -0
- package/dist/md/introduce.md +13 -0
- package/dist/md/linkage.md +229 -0
- package/dist/md/lowCode.md +24 -0
- package/dist/md/schema.md +72 -0
- package/dist/md/schemaFormDoc.md +198 -2
- package/dist/md/start.md +5 -5
- package/dist/mirc-i0qkCa0y.mjs +73 -0
- package/dist/mllike-Dy551fZW.mjs +275 -0
- package/dist/modelica-n6tGqUT9.mjs +94 -0
- package/dist/{move-7E4__Mf7.mjs → move-xFoKuPa4.mjs} +1 -1
- package/dist/mscgen-aKSbB7D9.mjs +104 -0
- package/dist/mumps-lNiKA6sp.mjs +25 -0
- package/dist/nginx--YmuCfDj.mjs +93 -0
- package/dist/nsis-gURxwqa7.mjs +62 -0
- package/dist/ntriples-E3jQl3MC.mjs +79 -0
- package/dist/octave-EQvkGIeG.mjs +144 -0
- package/dist/oz-W2cpqFf6.mjs +152 -0
- package/dist/pascal-lCh6ouNZ.mjs +79 -0
- package/dist/{password-Rw7e5EfW.mjs → password-smRUbj5j.mjs} +1 -1
- package/dist/perl-PxEQBX0B.mjs +915 -0
- package/dist/pig-Y_bNcrzS.mjs +56 -0
- package/dist/powershell-GaQP-TZr.mjs +249 -0
- package/dist/properties-mbRyn54L.mjs +26 -0
- package/dist/protobuf-8CJideyJ.mjs +49 -0
- package/dist/puppet-ABBaChNZ.mjs +45 -0
- package/dist/python-sKdHg3Ka.mjs +321 -0
- package/dist/q-_1yG40Nm.mjs +89 -0
- package/dist/r-Ziz56bHT.mjs +108 -0
- package/dist/{radio-kIExfw7_.mjs → radio-i8Osy06n.mjs} +1 -1
- package/dist/{reduce-M0s3xS0f.mjs → reduce-_8z_bJSl.mjs} +1 -1
- package/dist/release-S-TGj6yv.mjs +79353 -0
- package/dist/rpm-ORjGOHaQ.mjs +57 -0
- package/dist/ruby-jlbYq0dT.mjs +233 -0
- package/dist/sas-2n7xeUuO.mjs +107 -0
- package/dist/scheme-XCs-NPeU.mjs +126 -0
- package/dist/{select-S_MiU4fC.mjs → select-6cxe4XOq.mjs} +1 -1
- package/dist/shell-0_1Um7Dq.mjs +184 -0
- package/dist/sieve-7uyJD1x1.mjs +73 -0
- package/dist/simple-mode--HIzBxba.mjs +95 -0
- package/dist/smalltalk-PEFzrlQ-.mjs +48 -0
- package/dist/solr-BLBaHahN.mjs +41 -0
- package/dist/sparql-4F9ZWf1b.mjs +204 -0
- package/dist/spreadsheet-SGSo6blj.mjs +49 -0
- package/dist/sql-tebLBzN0.mjs +291 -0
- package/dist/stex-SFJcFGOO.mjs +130 -0
- package/dist/style.css +1 -1
- package/dist/stylus-rwwWYWFm.mjs +256 -0
- package/dist/swift-eorJ0tCv.mjs +238 -0
- package/dist/{switch-q2ma5cBO.mjs → switch-hPyM9jf5.mjs} +1 -1
- package/dist/tcl-IwXMB8U4.mjs +82 -0
- package/dist/{textarea-kCGp6Dtp.mjs → textarea-5BvvBb9l.mjs} +1 -1
- package/dist/textile-ok2VyjwC.mjs +299 -0
- package/dist/tiddlywiki-DLhz8_pc.mjs +156 -0
- package/dist/tiki-DFAqFElY.mjs +183 -0
- package/dist/toml-ryxpTZEV.mjs +49 -0
- package/dist/troff-ZzZyvNct.mjs +36 -0
- package/dist/ttcn-6gvkqqpW.mjs +136 -0
- package/dist/ttcn-cfg-oSu-Dq5C.mjs +98 -0
- package/dist/turtle-10ofr5au.mjs +87 -0
- package/dist/vb-a6n6fzrD.mjs +74 -0
- package/dist/vbscript-dgvo8jPt.mjs +324 -0
- package/dist/velocity-CBncCrwO.mjs +97 -0
- package/dist/verilog-KlcACt6C.mjs +271 -0
- package/dist/vhdl-NMd7Gf35.mjs +117 -0
- package/dist/vue-form-craft.mjs +2 -2
- package/dist/vue-form-craft.umd.js +271 -148
- package/dist/webidl-z1UE5DN_.mjs +160 -0
- package/dist/xquery-hDt5jWTp.mjs +431 -0
- package/dist/yacas-ftgh_qwr.mjs +74 -0
- package/dist/yaml-DnNTfjXK.mjs +53 -0
- package/dist/z80-dA1PqWe1.mjs +62 -0
- package/package.json +8 -2
- package/dist/release-wq6hOrN5.mjs +0 -44293
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
var l = [
|
|
2
|
+
"and",
|
|
3
|
+
"as",
|
|
4
|
+
"block",
|
|
5
|
+
"endblock",
|
|
6
|
+
"by",
|
|
7
|
+
"cycle",
|
|
8
|
+
"debug",
|
|
9
|
+
"else",
|
|
10
|
+
"elif",
|
|
11
|
+
"extends",
|
|
12
|
+
"filter",
|
|
13
|
+
"endfilter",
|
|
14
|
+
"firstof",
|
|
15
|
+
"do",
|
|
16
|
+
"for",
|
|
17
|
+
"endfor",
|
|
18
|
+
"if",
|
|
19
|
+
"endif",
|
|
20
|
+
"ifchanged",
|
|
21
|
+
"endifchanged",
|
|
22
|
+
"ifequal",
|
|
23
|
+
"endifequal",
|
|
24
|
+
"ifnotequal",
|
|
25
|
+
"set",
|
|
26
|
+
"raw",
|
|
27
|
+
"endraw",
|
|
28
|
+
"endifnotequal",
|
|
29
|
+
"in",
|
|
30
|
+
"include",
|
|
31
|
+
"load",
|
|
32
|
+
"not",
|
|
33
|
+
"now",
|
|
34
|
+
"or",
|
|
35
|
+
"parsed",
|
|
36
|
+
"regroup",
|
|
37
|
+
"reversed",
|
|
38
|
+
"spaceless",
|
|
39
|
+
"call",
|
|
40
|
+
"endcall",
|
|
41
|
+
"macro",
|
|
42
|
+
"endmacro",
|
|
43
|
+
"endspaceless",
|
|
44
|
+
"ssi",
|
|
45
|
+
"templatetag",
|
|
46
|
+
"openblock",
|
|
47
|
+
"closeblock",
|
|
48
|
+
"openvariable",
|
|
49
|
+
"closevariable",
|
|
50
|
+
"without",
|
|
51
|
+
"context",
|
|
52
|
+
"openbrace",
|
|
53
|
+
"closebrace",
|
|
54
|
+
"opencomment",
|
|
55
|
+
"closecomment",
|
|
56
|
+
"widthratio",
|
|
57
|
+
"url",
|
|
58
|
+
"with",
|
|
59
|
+
"endwith",
|
|
60
|
+
"get_current_language",
|
|
61
|
+
"trans",
|
|
62
|
+
"endtrans",
|
|
63
|
+
"noop",
|
|
64
|
+
"blocktrans",
|
|
65
|
+
"endblocktrans",
|
|
66
|
+
"get_available_languages",
|
|
67
|
+
"get_current_language_bidi",
|
|
68
|
+
"pluralize",
|
|
69
|
+
"autoescape",
|
|
70
|
+
"endautoescape"
|
|
71
|
+
], c = /^[+\-*&%=<>!?|~^]/, f = /^[:\[\(\{]/, o = ["true", "false"], r = /^(\d[+\-\*\/])?\d+(\.\d+)?/;
|
|
72
|
+
l = new RegExp("((" + l.join(")|(") + "))\\b");
|
|
73
|
+
o = new RegExp("((" + o.join(")|(") + "))\\b");
|
|
74
|
+
function u(n, e) {
|
|
75
|
+
var i = n.peek();
|
|
76
|
+
if (e.incomment)
|
|
77
|
+
return n.skipTo("#}") ? (n.eatWhile(/\#|}/), e.incomment = !1) : n.skipToEnd(), "comment";
|
|
78
|
+
if (e.intag) {
|
|
79
|
+
if (e.operator) {
|
|
80
|
+
if (e.operator = !1, n.match(o))
|
|
81
|
+
return "atom";
|
|
82
|
+
if (n.match(r))
|
|
83
|
+
return "number";
|
|
84
|
+
}
|
|
85
|
+
if (e.sign) {
|
|
86
|
+
if (e.sign = !1, n.match(o))
|
|
87
|
+
return "atom";
|
|
88
|
+
if (n.match(r))
|
|
89
|
+
return "number";
|
|
90
|
+
}
|
|
91
|
+
if (e.instring)
|
|
92
|
+
return i == e.instring && (e.instring = !1), n.next(), "string";
|
|
93
|
+
if (i == "'" || i == '"')
|
|
94
|
+
return e.instring = i, n.next(), "string";
|
|
95
|
+
if (e.inbraces > 0 && i == ")")
|
|
96
|
+
n.next(), e.inbraces--;
|
|
97
|
+
else if (i == "(")
|
|
98
|
+
n.next(), e.inbraces++;
|
|
99
|
+
else if (e.inbrackets > 0 && i == "]")
|
|
100
|
+
n.next(), e.inbrackets--;
|
|
101
|
+
else if (i == "[")
|
|
102
|
+
n.next(), e.inbrackets++;
|
|
103
|
+
else {
|
|
104
|
+
if (!e.lineTag && (n.match(e.intag + "}") || n.eat("-") && n.match(e.intag + "}")))
|
|
105
|
+
return e.intag = !1, "tag";
|
|
106
|
+
if (n.match(c))
|
|
107
|
+
return e.operator = !0, "operator";
|
|
108
|
+
if (n.match(f))
|
|
109
|
+
e.sign = !0;
|
|
110
|
+
else {
|
|
111
|
+
if (n.column() == 1 && e.lineTag && n.match(l))
|
|
112
|
+
return "keyword";
|
|
113
|
+
if (n.eat(" ") || n.sol()) {
|
|
114
|
+
if (n.match(l))
|
|
115
|
+
return "keyword";
|
|
116
|
+
if (n.match(o))
|
|
117
|
+
return "atom";
|
|
118
|
+
if (n.match(r))
|
|
119
|
+
return "number";
|
|
120
|
+
n.sol() && n.next();
|
|
121
|
+
} else
|
|
122
|
+
n.next();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return "variable";
|
|
126
|
+
} else if (n.eat("{")) {
|
|
127
|
+
if (n.eat("#"))
|
|
128
|
+
return e.incomment = !0, n.skipTo("#}") ? (n.eatWhile(/\#|}/), e.incomment = !1) : n.skipToEnd(), "comment";
|
|
129
|
+
if (i = n.eat(/\{|%/))
|
|
130
|
+
return e.intag = i, e.inbraces = 0, e.inbrackets = 0, i == "{" && (e.intag = "}"), n.eat("-"), "tag";
|
|
131
|
+
} else if (n.eat("#")) {
|
|
132
|
+
if (n.peek() == "#")
|
|
133
|
+
return n.skipToEnd(), "comment";
|
|
134
|
+
if (!n.eol())
|
|
135
|
+
return e.intag = !0, e.lineTag = !0, e.inbraces = 0, e.inbrackets = 0, "tag";
|
|
136
|
+
}
|
|
137
|
+
n.next();
|
|
138
|
+
}
|
|
139
|
+
const a = {
|
|
140
|
+
name: "jinja2",
|
|
141
|
+
startState: function() {
|
|
142
|
+
return { tokenize: u, inbrackets: 0, inbraces: 0 };
|
|
143
|
+
},
|
|
144
|
+
token: function(n, e) {
|
|
145
|
+
var i = e.tokenize(n, e);
|
|
146
|
+
return n.eol() && e.lineTag && !e.instring && e.inbraces == 0 && e.inbrackets == 0 && (e.intag = !1, e.lineTag = !1), i;
|
|
147
|
+
},
|
|
148
|
+
languageData: {
|
|
149
|
+
commentTokens: { block: { open: "{#", close: "#}", line: "##" } }
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
export {
|
|
153
|
+
a as jinja2
|
|
154
|
+
};
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
function o(e, n, i) {
|
|
2
|
+
return typeof i > "u" && (i = ""), typeof n > "u" && (n = "\\b"), new RegExp("^" + i + "((" + e.join(")|(") + "))" + n);
|
|
3
|
+
}
|
|
4
|
+
var v = "\\\\[0-7]{1,3}", k = "\\\\x[A-Fa-f0-9]{1,2}", F = `\\\\[abefnrtv0%?'"\\\\]`, g = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])", a = [
|
|
5
|
+
"[<>]:",
|
|
6
|
+
"[<>=]=",
|
|
7
|
+
"<<=?",
|
|
8
|
+
">>>?=?",
|
|
9
|
+
"=>",
|
|
10
|
+
"--?>",
|
|
11
|
+
"<--[->]?",
|
|
12
|
+
"\\/\\/",
|
|
13
|
+
"\\.{2,3}",
|
|
14
|
+
"[\\.\\\\%*+\\-<>!\\/^|&]=?",
|
|
15
|
+
"\\?",
|
|
16
|
+
"\\$",
|
|
17
|
+
"~",
|
|
18
|
+
":"
|
|
19
|
+
], b = o([
|
|
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
|
+
], ""), y = /^[;,()[\]{}]/, m = /^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/, x = o([v, k, F, g], "'"), z = [
|
|
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
|
+
], A = ["end", "else", "elseif", "catch", "finally"], p = [
|
|
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
|
+
], h = ["true", "false", "nothing", "NaN", "Inf"], E = o(z), C = o(A), _ = o(p), w = o(h), D = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, T = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, P = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/, B = o(a, "", "@"), G = o(a, "", ":");
|
|
108
|
+
function l(e) {
|
|
109
|
+
return e.nestedArrays > 0;
|
|
110
|
+
}
|
|
111
|
+
function S(e) {
|
|
112
|
+
return e.nestedGenerators > 0;
|
|
113
|
+
}
|
|
114
|
+
function t(e, n) {
|
|
115
|
+
return typeof n > "u" && (n = 0), e.scopes.length <= n ? null : e.scopes[e.scopes.length - (n + 1)];
|
|
116
|
+
}
|
|
117
|
+
function f(e, n) {
|
|
118
|
+
if (e.match("#=", !1))
|
|
119
|
+
return n.tokenize = I, n.tokenize(e, n);
|
|
120
|
+
var i = n.leavingExpr;
|
|
121
|
+
if (e.sol() && (i = !1), n.leavingExpr = !1, i && 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 r = e.peek();
|
|
130
|
+
if (r === "#")
|
|
131
|
+
return e.skipToEnd(), "comment";
|
|
132
|
+
if (r === "[" && (n.scopes.push("["), n.nestedArrays++), r === "(" && (n.scopes.push("("), n.nestedGenerators++), l(n) && r === "]") {
|
|
133
|
+
for (; n.scopes.length && t(n) !== "["; )
|
|
134
|
+
n.scopes.pop();
|
|
135
|
+
n.scopes.pop(), n.nestedArrays--, n.leavingExpr = !0;
|
|
136
|
+
}
|
|
137
|
+
if (S(n) && r === ")") {
|
|
138
|
+
for (; n.scopes.length && t(n) !== "("; )
|
|
139
|
+
n.scopes.pop();
|
|
140
|
+
n.scopes.pop(), n.nestedGenerators--, n.leavingExpr = !0;
|
|
141
|
+
}
|
|
142
|
+
if (l(n)) {
|
|
143
|
+
if (n.lastToken == "end" && e.match(":"))
|
|
144
|
+
return "operator";
|
|
145
|
+
if (e.match("end"))
|
|
146
|
+
return "number";
|
|
147
|
+
}
|
|
148
|
+
var u;
|
|
149
|
+
if ((u = e.match(E, !1)) && n.scopes.push(u[0]), e.match(C, !1) && n.scopes.pop(), e.match(/^::(?![:\$])/))
|
|
150
|
+
return n.tokenize = $, n.tokenize(e, n);
|
|
151
|
+
if (!i && (e.match(T) || e.match(G)))
|
|
152
|
+
return "builtin";
|
|
153
|
+
if (e.match(b))
|
|
154
|
+
return "operator";
|
|
155
|
+
if (e.match(/^\.?\d/, !1)) {
|
|
156
|
+
var s = RegExp(/^im\b/), c = !1;
|
|
157
|
+
if (e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i) && (c = !0), e.match(/^0x[0-9a-f_]+/i) && (c = !0), e.match(/^0b[01_]+/i) && (c = !0), e.match(/^0o[0-7_]+/i) && (c = !0), e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i) && (c = !0), e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i) && (c = !0), c)
|
|
158
|
+
return e.match(s), n.leavingExpr = !0, "number";
|
|
159
|
+
}
|
|
160
|
+
if (e.match("'"))
|
|
161
|
+
return n.tokenize = O, n.tokenize(e, n);
|
|
162
|
+
if (e.match(P))
|
|
163
|
+
return n.tokenize = Z(e.current()), n.tokenize(e, n);
|
|
164
|
+
if (e.match(D) || e.match(B))
|
|
165
|
+
return "meta";
|
|
166
|
+
if (e.match(y))
|
|
167
|
+
return null;
|
|
168
|
+
if (e.match(_))
|
|
169
|
+
return "keyword";
|
|
170
|
+
if (e.match(w))
|
|
171
|
+
return "builtin";
|
|
172
|
+
var d = n.isDefinition || n.lastToken == "function" || n.lastToken == "macro" || n.lastToken == "type" || n.lastToken == "struct" || n.lastToken == "immutable";
|
|
173
|
+
return e.match(m) ? d ? e.peek() === "." ? (n.isDefinition = !0, "variable") : (n.isDefinition = !1, "def") : (n.leavingExpr = !0, "variable") : (e.next(), "error");
|
|
174
|
+
}
|
|
175
|
+
function $(e, n) {
|
|
176
|
+
return e.match(/.*?(?=[,;{}()=\s]|$)/), e.match("{") ? n.nestedParameters++ : e.match("}") && n.nestedParameters > 0 && n.nestedParameters--, n.nestedParameters > 0 ? e.match(/.*?(?={|})/) || e.next() : n.nestedParameters == 0 && (n.tokenize = f), "builtin";
|
|
177
|
+
}
|
|
178
|
+
function I(e, n) {
|
|
179
|
+
return e.match("#=") && n.nestedComments++, e.match(/.*?(?=(#=|=#))/) || e.skipToEnd(), e.match("=#") && (n.nestedComments--, n.nestedComments == 0 && (n.tokenize = f)), "comment";
|
|
180
|
+
}
|
|
181
|
+
function O(e, n) {
|
|
182
|
+
var i = !1, r;
|
|
183
|
+
if (e.match(x))
|
|
184
|
+
i = !0;
|
|
185
|
+
else if (r = e.match(/\\u([a-f0-9]{1,4})(?=')/i)) {
|
|
186
|
+
var u = parseInt(r[1], 16);
|
|
187
|
+
(u <= 55295 || u >= 57344) && (i = !0, e.next());
|
|
188
|
+
} else if (r = e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)) {
|
|
189
|
+
var u = parseInt(r[1], 16);
|
|
190
|
+
u <= 1114111 && (i = !0, e.next());
|
|
191
|
+
}
|
|
192
|
+
return i ? (n.leavingExpr = !0, n.tokenize = f, "string") : (e.match(/^[^']+(?=')/) || e.skipToEnd(), e.match("'") && (n.tokenize = f), "error");
|
|
193
|
+
}
|
|
194
|
+
function Z(e) {
|
|
195
|
+
e.substr(-3) === '"""' ? e = '"""' : e.substr(-1) === '"' && (e = '"');
|
|
196
|
+
function n(i, r) {
|
|
197
|
+
if (i.eat("\\"))
|
|
198
|
+
i.next();
|
|
199
|
+
else {
|
|
200
|
+
if (i.match(e))
|
|
201
|
+
return r.tokenize = f, r.leavingExpr = !0, "string";
|
|
202
|
+
i.eat(/[`"]/);
|
|
203
|
+
}
|
|
204
|
+
return i.eatWhile(/[^\\`"]/), "string";
|
|
205
|
+
}
|
|
206
|
+
return n;
|
|
207
|
+
}
|
|
208
|
+
const j = {
|
|
209
|
+
name: "julia",
|
|
210
|
+
startState: function() {
|
|
211
|
+
return {
|
|
212
|
+
tokenize: f,
|
|
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, n) {
|
|
225
|
+
var i = n.tokenize(e, n), r = e.current();
|
|
226
|
+
return r && i && (n.lastToken = r), i;
|
|
227
|
+
},
|
|
228
|
+
indent: function(e, n, i) {
|
|
229
|
+
var r = 0;
|
|
230
|
+
return (n === "]" || n === ")" || /^end\b/.test(n) || /^else/.test(n) || /^catch\b/.test(n) || /^elseif\b/.test(n) || /^finally/.test(n)) && (r = -1), (e.scopes.length + r) * i.unit;
|
|
231
|
+
},
|
|
232
|
+
languageData: {
|
|
233
|
+
indentOnInput: /^\s*(end|else|catch|finally)\b$/,
|
|
234
|
+
commentTokens: { line: "#", block: { open: "#=", close: "=#" } },
|
|
235
|
+
closeBrackets: { brackets: ["(", "[", "{", '"'] },
|
|
236
|
+
autocomplete: p.concat(h)
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
export {
|
|
240
|
+
j as julia
|
|
241
|
+
};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
var f = function(e, n) {
|
|
2
|
+
var r = n.next || "start";
|
|
3
|
+
if (r) {
|
|
4
|
+
n.next = n.next;
|
|
5
|
+
var k = g[r];
|
|
6
|
+
if (k.splice) {
|
|
7
|
+
for (var l = 0; l < k.length; ++l) {
|
|
8
|
+
var t = k[l];
|
|
9
|
+
if (t.regex && e.match(t.regex))
|
|
10
|
+
return n.next = t.next || n.next, t.token;
|
|
11
|
+
}
|
|
12
|
+
return e.next(), "error";
|
|
13
|
+
}
|
|
14
|
+
if (e.match(t = g[r]))
|
|
15
|
+
return t.regex && e.match(t.regex) ? (n.next = t.next, t.token) : (e.next(), "error");
|
|
16
|
+
}
|
|
17
|
+
return e.next(), "error";
|
|
18
|
+
}, s = "(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*", u = RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*" + s + ")?))\\s*$"), o = "(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))", x = {
|
|
19
|
+
token: "string",
|
|
20
|
+
regex: ".+"
|
|
21
|
+
}, g = {
|
|
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)" + o
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
token: "atom",
|
|
38
|
+
regex: "(?:true|false|yes|no|on|off|null|void|undefined)" + o
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
token: "invalid",
|
|
42
|
+
regex: "(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)" + o
|
|
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)" + o
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
token: "variableName.function.standard",
|
|
50
|
+
regex: "(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)" + o
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
token: "variableName.standard",
|
|
54
|
+
regex: "(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)" + o
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
token: "variableName",
|
|
58
|
+
regex: s + "\\s*:(?![:=])"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
token: "variableName",
|
|
62
|
+
regex: s
|
|
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: s,
|
|
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
|
+
x
|
|
197
|
+
],
|
|
198
|
+
qqdoc: [
|
|
199
|
+
{
|
|
200
|
+
token: "string",
|
|
201
|
+
regex: '.*?"""',
|
|
202
|
+
next: "key"
|
|
203
|
+
},
|
|
204
|
+
x
|
|
205
|
+
],
|
|
206
|
+
qstring: [
|
|
207
|
+
{
|
|
208
|
+
token: "string",
|
|
209
|
+
regex: "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
|
|
210
|
+
next: "key"
|
|
211
|
+
},
|
|
212
|
+
x
|
|
213
|
+
],
|
|
214
|
+
qqstring: [
|
|
215
|
+
{
|
|
216
|
+
token: "string",
|
|
217
|
+
regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
|
|
218
|
+
next: "key"
|
|
219
|
+
},
|
|
220
|
+
x
|
|
221
|
+
],
|
|
222
|
+
js: [
|
|
223
|
+
{
|
|
224
|
+
token: "string",
|
|
225
|
+
regex: "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
|
|
226
|
+
next: "key"
|
|
227
|
+
},
|
|
228
|
+
x
|
|
229
|
+
],
|
|
230
|
+
words: [
|
|
231
|
+
{
|
|
232
|
+
token: "string",
|
|
233
|
+
regex: ".*?\\]>",
|
|
234
|
+
next: "key"
|
|
235
|
+
},
|
|
236
|
+
x
|
|
237
|
+
]
|
|
238
|
+
};
|
|
239
|
+
for (var d in g) {
|
|
240
|
+
var a = g[d];
|
|
241
|
+
if (a.splice)
|
|
242
|
+
for (var i = 0, p = a.length; i < p; ++i) {
|
|
243
|
+
var c = a[i];
|
|
244
|
+
typeof c.regex == "string" && (g[d][i].regex = new RegExp("^" + c.regex));
|
|
245
|
+
}
|
|
246
|
+
else
|
|
247
|
+
typeof c.regex == "string" && (g[d].regex = new RegExp("^" + a.regex));
|
|
248
|
+
}
|
|
249
|
+
const y = {
|
|
250
|
+
name: "livescript",
|
|
251
|
+
startState: function() {
|
|
252
|
+
return {
|
|
253
|
+
next: "start",
|
|
254
|
+
lastToken: { style: null, indent: 0, content: "" }
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
token: function(e, n) {
|
|
258
|
+
for (; e.pos == e.start; )
|
|
259
|
+
var r = f(e, n);
|
|
260
|
+
return n.lastToken = {
|
|
261
|
+
style: r,
|
|
262
|
+
indent: e.indentation(),
|
|
263
|
+
content: e.current()
|
|
264
|
+
}, r.replace(/\./g, " ");
|
|
265
|
+
},
|
|
266
|
+
indent: function(e) {
|
|
267
|
+
var n = e.lastToken.indent;
|
|
268
|
+
return e.lastToken.content.match(u) && (n += 2), n;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
export {
|
|
272
|
+
y as liveScript
|
|
273
|
+
};
|