zs_library 0.4.6 → 0.4.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.
Files changed (118) hide show
  1. package/dist/apl-DzB7vleG.js +77 -0
  2. package/dist/asciiarmor-GBg_dTix.js +35 -0
  3. package/dist/asn1-C3znSLx9.js +96 -0
  4. package/dist/asterisk-DlqRFsge.js +272 -0
  5. package/dist/brainfuck-BRsrPeoO.js +35 -0
  6. package/dist/clike-BvRdj3ii.js +621 -0
  7. package/dist/clojure-DoHCnq3P.js +801 -0
  8. package/dist/cmake-lga2BQKc.js +29 -0
  9. package/dist/cobol-CoUZEClC.js +73 -0
  10. package/dist/coffeescript-DtzhVgPb.js +180 -0
  11. package/dist/commonlisp-Dczl5pgK.js +76 -0
  12. package/dist/crystal-CGcK8mnw.js +218 -0
  13. package/dist/css-BSROsPdq.js +1561 -0
  14. package/dist/cypher-DtSMl1Mv.js +69 -0
  15. package/dist/d-Dvhr70b-.js +128 -0
  16. package/dist/diff-CGwDp7kO.js +19 -0
  17. package/dist/dockerfile-comEO-T6.js +195 -0
  18. package/dist/dtd-CCHJ68ra.js +85 -0
  19. package/dist/dylan-DuvcMu5H.js +235 -0
  20. package/dist/ebnf-40BT7kIS.js +79 -0
  21. package/dist/ecl-D1uoNQJW.js +122 -0
  22. package/dist/eiffel-5pGo0kXa.js +111 -0
  23. package/dist/elm-BaiVOLJD.js +109 -0
  24. package/dist/erlang-CkzodiGe.js +488 -0
  25. package/dist/factor-BOXOAn_M.js +66 -0
  26. package/dist/fcl-BpnTn_eU.js +104 -0
  27. package/dist/forth-DErAeAEb.js +61 -0
  28. package/dist/fortran-D2-6KpzO.js +443 -0
  29. package/dist/gas-DyEPANLH.js +184 -0
  30. package/dist/gherkin-Drt_srgO.js +35 -0
  31. package/dist/groovy-BMVfw_nf.js +147 -0
  32. package/dist/haskell-hWhKnZO1.js +376 -0
  33. package/dist/haxe-B1MRfS0p.js +360 -0
  34. package/dist/http-DmgKxj-g.js +45 -0
  35. package/dist/idl-DqZ86h3r.js +948 -0
  36. package/dist/index-5dj8r7GK.js +266 -0
  37. package/dist/index-BTXiadLB.js +309 -0
  38. package/dist/index-BlC4-BmN.js +72 -0
  39. package/dist/index-BrFeP3fX.js +244 -0
  40. package/dist/index-Bto4OncH.js +539 -0
  41. package/dist/index-Bvv7YkGe.js +136 -0
  42. package/dist/index-Bx4MkRG_.js +76 -0
  43. package/dist/index-CVOhQMF3.js +608 -0
  44. package/dist/index-CecD8NGL.js +228472 -0
  45. package/dist/index-CmoZmAhh.js +289 -0
  46. package/dist/index-DE3hmKbB.js +135 -0
  47. package/dist/index-DF7XjAxV.js +94 -0
  48. package/dist/index-DcChItCb.js +157 -0
  49. package/dist/index-Dl5DpQ2k.js +342 -0
  50. package/dist/index-Dpbxeq5U.js +59 -0
  51. package/dist/index-gpJmCEdM.js +99 -0
  52. package/dist/index-udH8R_K0.js +300 -0
  53. package/dist/{zs_library.css → index.css} +1 -1
  54. package/dist/index.js +9 -0
  55. package/dist/javascript-BvuVDFxD.js +691 -0
  56. package/dist/jinja2-sU0UaYnG.js +155 -0
  57. package/dist/julia-3_lRZPrK.js +242 -0
  58. package/dist/livescript-BeDiX_lv.js +273 -0
  59. package/dist/lua-DsgFLpii.js +218 -0
  60. package/dist/mathematica-1GSq-6KQ.js +36 -0
  61. package/dist/mbox-agttEgFX.js +77 -0
  62. package/dist/mirc-0mTi20sq.js +73 -0
  63. package/dist/mllike-Cn3QD1L6.js +273 -0
  64. package/dist/modelica-zXUsSMFb.js +94 -0
  65. package/dist/mscgen-CjqYDKLG.js +105 -0
  66. package/dist/mumps-o2cuacx9.js +26 -0
  67. package/dist/nginx-BwTpvSVN.js +90 -0
  68. package/dist/nsis-BuRdhAu4.js +63 -0
  69. package/dist/ntriples-DrgMTIhT.js +80 -0
  70. package/dist/octave-Cxdtf9mO.js +144 -0
  71. package/dist/oz-DFmTw-qE.js +152 -0
  72. package/dist/pascal-DXxn4Ogv.js +78 -0
  73. package/dist/perl-C73cx1ym.js +916 -0
  74. package/dist/pig-Bb8sMbk0.js +55 -0
  75. package/dist/powershell-DxmufwKU.js +250 -0
  76. package/dist/properties-C4fhBR7T.js +27 -0
  77. package/dist/protobuf-Eqae3kep.js +50 -0
  78. package/dist/pug-Cdoid33I.js +249 -0
  79. package/dist/puppet-BH84QZvC.js +46 -0
  80. package/dist/python-D32-_XsH.js +314 -0
  81. package/dist/q-CDvEpNHY.js +84 -0
  82. package/dist/r-D9TtEI-G.js +105 -0
  83. package/dist/rpm-Ckejt31K.js +58 -0
  84. package/dist/ruby-gRVA_lpr.js +229 -0
  85. package/dist/sas-Cetv6MtF.js +106 -0
  86. package/dist/scheme-BpAxUIwV.js +125 -0
  87. package/dist/shell-DmARhv5h.js +183 -0
  88. package/dist/sieve-DJENs6f1.js +73 -0
  89. package/dist/simple-mode-B0kVDhR7.js +89 -0
  90. package/dist/smalltalk-CtRR6guu.js +49 -0
  91. package/dist/solr-ZVIJNGhC.js +42 -0
  92. package/dist/sparql-Cg1WYQva.js +198 -0
  93. package/dist/spreadsheet-Bi94Lk_2.js +50 -0
  94. package/dist/sql-BLhvp4JJ.js +283 -0
  95. package/dist/stex-DuReG47O.js +130 -0
  96. package/dist/stylus-D5QpSSbb.js +251 -0
  97. package/dist/swift-CZplZXOW.js +231 -0
  98. package/dist/tcl-COiqjz-O.js +82 -0
  99. package/dist/textile-BIDpYsbD.js +296 -0
  100. package/dist/tiddlywiki-C4woD_uK.js +156 -0
  101. package/dist/tiki-Ddj0Z2aQ.js +182 -0
  102. package/dist/toml-Byr0PaXO.js +50 -0
  103. package/dist/troff-BEvN8lSw.js +36 -0
  104. package/dist/ttcn-CyeSpuPS.js +124 -0
  105. package/dist/ttcn-cfg-C4JBLVfg.js +89 -0
  106. package/dist/turtle-8qSCc9Tc.js +81 -0
  107. package/dist/vb-BOJI7cFm.js +75 -0
  108. package/dist/vbscript-Cu6iG9pw.js +325 -0
  109. package/dist/velocity-BEpFYT7L.js +97 -0
  110. package/dist/verilog-BBxq08Rh.js +264 -0
  111. package/dist/vhdl-B0tZHMGi.js +107 -0
  112. package/dist/webidl-CW91NtvY.js +156 -0
  113. package/dist/xquery-DzC9wL36.js +423 -0
  114. package/dist/yacas-lKwNB4DM.js +74 -0
  115. package/dist/z80-Bq0fiCqy.js +62 -0
  116. package/package.json +146 -146
  117. package/dist/index.es.js +0 -10618
  118. package/dist/index.umd.js +0 -701
@@ -0,0 +1,235 @@
1
+ import "./index.css";
2
+ function b(e, i) {
3
+ for (var n = 0; n < e.length; n++) i(e[n], n);
4
+ }
5
+ function x(e, i) {
6
+ for (var n = 0; n < e.length; n++) if (i(e[n], n)) return !0;
7
+ return !1;
8
+ }
9
+ var t = {
10
+ // Words that introduce unnamed definitions like "define interface"
11
+ unnamedDefinition: ["interface"],
12
+ // Words that introduce simple named definitions like "define library"
13
+ namedDefinition: [
14
+ "module",
15
+ "library",
16
+ "macro",
17
+ "C-struct",
18
+ "C-union",
19
+ "C-function",
20
+ "C-callable-wrapper"
21
+ ],
22
+ // Words that introduce type definitions like "define class".
23
+ // These are also parameterized like "define method" and are
24
+ // appended to otherParameterizedDefinitionWords
25
+ typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"],
26
+ // Words that introduce trickier definitions like "define method".
27
+ // These require special definitions to be added to startExpressions
28
+ otherParameterizedDefinition: [
29
+ "method",
30
+ "function",
31
+ "C-variable",
32
+ "C-address"
33
+ ],
34
+ // Words that introduce module constant definitions.
35
+ // These must also be simple definitions and are
36
+ // appended to otherSimpleDefinitionWords
37
+ constantSimpleDefinition: ["constant"],
38
+ // Words that introduce module variable definitions.
39
+ // These must also be simple definitions and are
40
+ // appended to otherSimpleDefinitionWords
41
+ variableSimpleDefinition: ["variable"],
42
+ // Other words that introduce simple definitions
43
+ // (without implicit bodies).
44
+ otherSimpleDefinition: [
45
+ "generic",
46
+ "domain",
47
+ "C-pointer-type",
48
+ "table"
49
+ ],
50
+ // Words that begin statements with implicit bodies.
51
+ statement: [
52
+ "if",
53
+ "block",
54
+ "begin",
55
+ "method",
56
+ "case",
57
+ "for",
58
+ "select",
59
+ "when",
60
+ "unless",
61
+ "until",
62
+ "while",
63
+ "iterate",
64
+ "profiling",
65
+ "dynamic-bind"
66
+ ],
67
+ // Patterns that act as separators in compound statements.
68
+ // This may include any general pattern that must be indented
69
+ // specially.
70
+ separator: [
71
+ "finally",
72
+ "exception",
73
+ "cleanup",
74
+ "else",
75
+ "elseif",
76
+ "afterwards"
77
+ ],
78
+ // Keywords that do not require special indentation handling,
79
+ // but which should be highlighted
80
+ other: [
81
+ "above",
82
+ "below",
83
+ "by",
84
+ "from",
85
+ "handler",
86
+ "in",
87
+ "instance",
88
+ "let",
89
+ "local",
90
+ "otherwise",
91
+ "slot",
92
+ "subclass",
93
+ "then",
94
+ "to",
95
+ "keyed-by",
96
+ "virtual"
97
+ ],
98
+ // Condition signaling function calls
99
+ signalingCalls: [
100
+ "signal",
101
+ "error",
102
+ "cerror",
103
+ "break",
104
+ "check-type",
105
+ "abort"
106
+ ]
107
+ };
108
+ t.otherDefinition = t.unnamedDefinition.concat(t.namedDefinition).concat(t.otherParameterizedDefinition);
109
+ t.definition = t.typeParameterizedDefinition.concat(t.otherDefinition);
110
+ t.parameterizedDefinition = t.typeParameterizedDefinition.concat(t.otherParameterizedDefinition);
111
+ t.simpleDefinition = t.constantSimpleDefinition.concat(t.variableSimpleDefinition).concat(t.otherSimpleDefinition);
112
+ t.keyword = t.statement.concat(t.separator).concat(t.other);
113
+ var f = "[-_a-zA-Z?!*@<>$%]+", v = new RegExp("^" + f), a = {
114
+ // Symbols with special syntax
115
+ symbolKeyword: f + ":",
116
+ symbolClass: "<" + f + ">",
117
+ symbolGlobal: "\\*" + f + "\\*",
118
+ symbolConstant: "\\$" + f
119
+ }, w = {
120
+ symbolKeyword: "atom",
121
+ symbolClass: "tag",
122
+ symbolGlobal: "variableName.standard",
123
+ symbolConstant: "variableName.constant"
124
+ };
125
+ for (var c in a)
126
+ a.hasOwnProperty(c) && (a[c] = new RegExp("^" + a[c]));
127
+ a.keyword = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];
128
+ var u = {};
129
+ u.keyword = "keyword";
130
+ u.definition = "def";
131
+ u.simpleDefinition = "def";
132
+ u.signalingCalls = "builtin";
133
+ var y = {}, k = {};
134
+ b([
135
+ "keyword",
136
+ "definition",
137
+ "simpleDefinition",
138
+ "signalingCalls"
139
+ ], function(e) {
140
+ b(t[e], function(i) {
141
+ y[i] = e, k[i] = u[e];
142
+ });
143
+ });
144
+ function d(e, i, n) {
145
+ return i.tokenize = n, n(e, i);
146
+ }
147
+ function s(e, i) {
148
+ var n = e.peek();
149
+ if (n == "'" || n == '"')
150
+ return e.next(), d(e, i, h(n, "string"));
151
+ if (n == "/") {
152
+ if (e.next(), e.eat("*"))
153
+ return d(e, i, D);
154
+ if (e.eat("/"))
155
+ return e.skipToEnd(), "comment";
156
+ e.backUp(1);
157
+ } else if (/[+\-\d\.]/.test(n)) {
158
+ if (e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i) || e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i) || e.match(/^[+-]?\d+/))
159
+ return "number";
160
+ } else {
161
+ if (n == "#")
162
+ return e.next(), n = e.peek(), n == '"' ? (e.next(), d(e, i, h('"', "string"))) : n == "b" ? (e.next(), e.eatWhile(/[01]/), "number") : n == "x" ? (e.next(), e.eatWhile(/[\da-f]/i), "number") : n == "o" ? (e.next(), e.eatWhile(/[0-7]/), "number") : n == "#" ? (e.next(), "punctuation") : n == "[" || n == "(" ? (e.next(), "bracket") : e.match(/f|t|all-keys|include|key|next|rest/i) ? "atom" : (e.eatWhile(/[-a-zA-Z]/), "error");
163
+ if (n == "~")
164
+ return e.next(), n = e.peek(), n == "=" ? (e.next(), n = e.peek(), n == "=" && e.next(), "operator") : "operator";
165
+ if (n == ":") {
166
+ if (e.next(), n = e.peek(), n == "=")
167
+ return e.next(), "operator";
168
+ if (n == ":")
169
+ return e.next(), "punctuation";
170
+ } else {
171
+ if ("[](){}".indexOf(n) != -1)
172
+ return e.next(), "bracket";
173
+ if (".,".indexOf(n) != -1)
174
+ return e.next(), "punctuation";
175
+ if (e.match("end"))
176
+ return "keyword";
177
+ }
178
+ }
179
+ for (var l in a)
180
+ if (a.hasOwnProperty(l)) {
181
+ var r = a[l];
182
+ if (r instanceof Array && x(r, function(o) {
183
+ return e.match(o);
184
+ }) || e.match(r))
185
+ return w[l];
186
+ }
187
+ return /[+\-*\/^=<>&|]/.test(n) ? (e.next(), "operator") : e.match("define") ? "def" : (e.eatWhile(/[\w\-]/), y.hasOwnProperty(e.current()) ? k[e.current()] : e.current().match(v) ? "variable" : (e.next(), "variableName.standard"));
188
+ }
189
+ function D(e, i) {
190
+ for (var n = !1, l = !1, r = 0, o; o = e.next(); ) {
191
+ if (o == "/" && n)
192
+ if (r > 0)
193
+ r--;
194
+ else {
195
+ i.tokenize = s;
196
+ break;
197
+ }
198
+ else o == "*" && l && r++;
199
+ n = o == "*", l = o == "/";
200
+ }
201
+ return "comment";
202
+ }
203
+ function h(e, i) {
204
+ return function(n, l) {
205
+ for (var r = !1, o, p = !1; (o = n.next()) != null; ) {
206
+ if (o == e && !r) {
207
+ p = !0;
208
+ break;
209
+ }
210
+ r = !r && o == "\\";
211
+ }
212
+ return (p || !r) && (l.tokenize = s), i;
213
+ };
214
+ }
215
+ const m = {
216
+ name: "dylan",
217
+ startState: function() {
218
+ return {
219
+ tokenize: s,
220
+ currentIndent: 0
221
+ };
222
+ },
223
+ token: function(e, i) {
224
+ if (e.eatSpace())
225
+ return null;
226
+ var n = i.tokenize(e, i);
227
+ return n;
228
+ },
229
+ languageData: {
230
+ commentTokens: { block: { open: "/*", close: "*/" } }
231
+ }
232
+ };
233
+ export {
234
+ m as dylan
235
+ };
@@ -0,0 +1,79 @@
1
+ import "./index.css";
2
+ var i = { slash: 0, parenthesis: 1 }, n = { comment: 0, _string: 1, characterClass: 2 };
3
+ const r = {
4
+ name: "ebnf",
5
+ startState: function() {
6
+ return {
7
+ stringType: null,
8
+ commentType: null,
9
+ braced: 0,
10
+ lhs: !0,
11
+ localState: null,
12
+ stack: [],
13
+ inDefinition: !1
14
+ };
15
+ },
16
+ token: function(e, c) {
17
+ if (e) {
18
+ switch (c.stack.length === 0 && (e.peek() == '"' || e.peek() == "'" ? (c.stringType = e.peek(), e.next(), c.stack.unshift(n._string)) : e.match("/*") ? (c.stack.unshift(n.comment), c.commentType = i.slash) : e.match("(*") && (c.stack.unshift(n.comment), c.commentType = i.parenthesis)), c.stack[0]) {
19
+ case n._string:
20
+ for (; c.stack[0] === n._string && !e.eol(); )
21
+ e.peek() === c.stringType ? (e.next(), c.stack.shift()) : e.peek() === "\\" ? (e.next(), e.next()) : e.match(/^.[^\\\"\']*/);
22
+ return c.lhs ? "property" : "string";
23
+ // Token style
24
+ case n.comment:
25
+ for (; c.stack[0] === n.comment && !e.eol(); )
26
+ c.commentType === i.slash && e.match("*/") || c.commentType === i.parenthesis && e.match("*)") ? (c.stack.shift(), c.commentType = null) : e.match(/^.[^\*]*/);
27
+ return "comment";
28
+ case n.characterClass:
29
+ for (; c.stack[0] === n.characterClass && !e.eol(); )
30
+ e.match(/^[^\]\\]+/) || e.match(".") || c.stack.shift();
31
+ return "operator";
32
+ }
33
+ var t = e.peek();
34
+ switch (t) {
35
+ case "[":
36
+ return e.next(), c.stack.unshift(n.characterClass), "bracket";
37
+ case ":":
38
+ case "|":
39
+ case ";":
40
+ return e.next(), "operator";
41
+ case "%":
42
+ if (e.match("%%"))
43
+ return "header";
44
+ if (e.match(/[%][A-Za-z]+/))
45
+ return "keyword";
46
+ if (e.match(/[%][}]/))
47
+ return "bracket";
48
+ break;
49
+ case "/":
50
+ if (e.match(/[\/][A-Za-z]+/))
51
+ return "keyword";
52
+ case "\\":
53
+ if (e.match(/[\][a-z]+/))
54
+ return "string.special";
55
+ case ".":
56
+ if (e.match("."))
57
+ return "atom";
58
+ case "*":
59
+ case "-":
60
+ case "+":
61
+ case "^":
62
+ if (e.match(t))
63
+ return "atom";
64
+ case "$":
65
+ if (e.match("$$"))
66
+ return "builtin";
67
+ if (e.match(/[$][0-9]+/))
68
+ return "variableName.special";
69
+ case "<":
70
+ if (e.match(/<<[a-zA-Z_]+>>/))
71
+ return "builtin";
72
+ }
73
+ return e.match("//") ? (e.skipToEnd(), "comment") : e.match("return") ? "operator" : e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/) ? e.match(/(?=[\(.])/) ? "variable" : e.match(/(?=[\s\n]*[:=])/) ? "def" : "variableName.special" : ["[", "]", "(", ")"].indexOf(e.peek()) != -1 ? (e.next(), "bracket") : (e.eatSpace() || e.next(), null);
74
+ }
75
+ }
76
+ };
77
+ export {
78
+ r as ebnf
79
+ };
@@ -0,0 +1,122 @@
1
+ import "./index.css";
2
+ function l(e) {
3
+ for (var n = {}, t = e.split(" "), r = 0; r < t.length; ++r) n[t[r]] = !0;
4
+ return n;
5
+ }
6
+ function b(e, n) {
7
+ return n.startOfLine ? (e.skipToEnd(), "meta") : !1;
8
+ }
9
+ var g = l("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"), w = l("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"), x = l("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"), f = l("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"), k = l("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"), s = l("catch class do else finally for if switch try while"), E = l("true false null"), m = { "#": b }, h = /[+\-*&%=<>!?|\/]/, o;
10
+ function p(e, n) {
11
+ var t = e.next();
12
+ if (m[t]) {
13
+ var r = m[t](e, n);
14
+ if (r !== !1) return r;
15
+ }
16
+ if (t == '"' || t == "'")
17
+ return n.tokenize = I(t), n.tokenize(e, n);
18
+ if (/[\[\]{}\(\),;\:\.]/.test(t))
19
+ return o = t, null;
20
+ if (/\d/.test(t))
21
+ return e.eatWhile(/[\w\.]/), "number";
22
+ if (t == "/") {
23
+ if (e.eat("*"))
24
+ return n.tokenize = y, y(e, n);
25
+ if (e.eat("/"))
26
+ return e.skipToEnd(), "comment";
27
+ }
28
+ if (h.test(t))
29
+ return e.eatWhile(h), "operator";
30
+ e.eatWhile(/[\w\$_]/);
31
+ var i = e.current().toLowerCase();
32
+ if (g.propertyIsEnumerable(i))
33
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "keyword";
34
+ if (w.propertyIsEnumerable(i))
35
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "variable";
36
+ if (x.propertyIsEnumerable(i))
37
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "modifier";
38
+ if (f.propertyIsEnumerable(i))
39
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "type";
40
+ if (k.propertyIsEnumerable(i))
41
+ return s.propertyIsEnumerable(i) && (o = "newstatement"), "builtin";
42
+ for (var a = i.length - 1; a >= 0 && (!isNaN(i[a]) || i[a] == "_"); )
43
+ --a;
44
+ if (a > 0) {
45
+ var d = i.substr(0, a + 1);
46
+ if (f.propertyIsEnumerable(d))
47
+ return s.propertyIsEnumerable(d) && (o = "newstatement"), "type";
48
+ }
49
+ return E.propertyIsEnumerable(i) ? "atom" : null;
50
+ }
51
+ function I(e) {
52
+ return function(n, t) {
53
+ for (var r = !1, i, a = !1; (i = n.next()) != null; ) {
54
+ if (i == e && !r) {
55
+ a = !0;
56
+ break;
57
+ }
58
+ r = !r && i == "\\";
59
+ }
60
+ return (a || !r) && (t.tokenize = p), "string";
61
+ };
62
+ }
63
+ function y(e, n) {
64
+ for (var t = !1, r; r = e.next(); ) {
65
+ if (r == "/" && t) {
66
+ n.tokenize = p;
67
+ break;
68
+ }
69
+ t = r == "*";
70
+ }
71
+ return "comment";
72
+ }
73
+ function v(e, n, t, r, i) {
74
+ this.indented = e, this.column = n, this.type = t, this.align = r, this.prev = i;
75
+ }
76
+ function c(e, n, t) {
77
+ return e.context = new v(e.indented, n, t, null, e.context);
78
+ }
79
+ function u(e) {
80
+ var n = e.context.type;
81
+ return (n == ")" || n == "]" || n == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
82
+ }
83
+ const _ = {
84
+ name: "ecl",
85
+ startState: function(e) {
86
+ return {
87
+ tokenize: null,
88
+ context: new v(-e, 0, "top", !1),
89
+ indented: 0,
90
+ startOfLine: !0
91
+ };
92
+ },
93
+ token: function(e, n) {
94
+ var t = n.context;
95
+ if (e.sol() && (t.align == null && (t.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace()) return null;
96
+ o = null;
97
+ var r = (n.tokenize || p)(e, n);
98
+ if (r == "comment" || r == "meta") return r;
99
+ if (t.align == null && (t.align = !0), (o == ";" || o == ":") && t.type == "statement") u(n);
100
+ else if (o == "{") c(n, e.column(), "}");
101
+ else if (o == "[") c(n, e.column(), "]");
102
+ else if (o == "(") c(n, e.column(), ")");
103
+ else if (o == "}") {
104
+ for (; t.type == "statement"; ) t = u(n);
105
+ for (t.type == "}" && (t = u(n)); t.type == "statement"; ) t = u(n);
106
+ } else o == t.type ? u(n) : (t.type == "}" || t.type == "top" || t.type == "statement" && o == "newstatement") && c(n, e.column(), "statement");
107
+ return n.startOfLine = !1, r;
108
+ },
109
+ indent: function(e, n, t) {
110
+ if (e.tokenize != p && e.tokenize != null) return 0;
111
+ var r = e.context, i = n && n.charAt(0);
112
+ r.type == "statement" && i == "}" && (r = r.prev);
113
+ var a = i == r.type;
114
+ return r.type == "statement" ? r.indented + (i == "{" ? 0 : t.unit) : r.align ? r.column + (a ? 0 : 1) : r.indented + (a ? 0 : t.unit);
115
+ },
116
+ languageData: {
117
+ indentOnInput: /^\s*[{}]$/
118
+ }
119
+ };
120
+ export {
121
+ _ as ecl
122
+ };
@@ -0,0 +1,111 @@
1
+ import "./index.css";
2
+ function u(e) {
3
+ for (var r = {}, n = 0, t = e.length; n < t; ++n) r[e[n]] = !0;
4
+ return r;
5
+ }
6
+ var l = u([
7
+ "note",
8
+ "across",
9
+ "when",
10
+ "variant",
11
+ "until",
12
+ "unique",
13
+ "undefine",
14
+ "then",
15
+ "strip",
16
+ "select",
17
+ "retry",
18
+ "rescue",
19
+ "require",
20
+ "rename",
21
+ "reference",
22
+ "redefine",
23
+ "prefix",
24
+ "once",
25
+ "old",
26
+ "obsolete",
27
+ "loop",
28
+ "local",
29
+ "like",
30
+ "is",
31
+ "inspect",
32
+ "infix",
33
+ "include",
34
+ "if",
35
+ "frozen",
36
+ "from",
37
+ "external",
38
+ "export",
39
+ "ensure",
40
+ "end",
41
+ "elseif",
42
+ "else",
43
+ "do",
44
+ "creation",
45
+ "create",
46
+ "check",
47
+ "alias",
48
+ "agent",
49
+ "separate",
50
+ "invariant",
51
+ "inherit",
52
+ "indexing",
53
+ "feature",
54
+ "expanded",
55
+ "deferred",
56
+ "class",
57
+ "Void",
58
+ "True",
59
+ "Result",
60
+ "Precursor",
61
+ "False",
62
+ "Current",
63
+ "create",
64
+ "attached",
65
+ "detachable",
66
+ "as",
67
+ "and",
68
+ "implies",
69
+ "not",
70
+ "or"
71
+ ]), c = u([":=", "and then", "and", "or", "<<", ">>"]);
72
+ function f(e, r, n) {
73
+ return n.tokenize.push(e), e(r, n);
74
+ }
75
+ function s(e, r) {
76
+ if (e.eatSpace()) return null;
77
+ var n = e.next();
78
+ return n == '"' || n == "'" ? f(p(n, "string"), e, r) : n == "-" && e.eat("-") ? (e.skipToEnd(), "comment") : n == ":" && e.eat("=") ? "operator" : /[0-9]/.test(n) ? (e.eatWhile(/[xXbBCc0-9\.]/), e.eat(/[\?\!]/), "variable") : /[a-zA-Z_0-9]/.test(n) ? (e.eatWhile(/[a-zA-Z_0-9]/), e.eat(/[\?\!]/), "variable") : /[=+\-\/*^%<>~]/.test(n) ? (e.eatWhile(/[=+\-\/*^%<>~]/), "operator") : null;
79
+ }
80
+ function p(e, r, n) {
81
+ return function(t, o) {
82
+ for (var a = !1, i; (i = t.next()) != null; ) {
83
+ if (i == e && !a) {
84
+ o.tokenize.pop();
85
+ break;
86
+ }
87
+ a = !a && i == "%";
88
+ }
89
+ return r;
90
+ };
91
+ }
92
+ const b = {
93
+ name: "eiffel",
94
+ startState: function() {
95
+ return { tokenize: [s] };
96
+ },
97
+ token: function(e, r) {
98
+ var n = r.tokenize[r.tokenize.length - 1](e, r);
99
+ if (n == "variable") {
100
+ var t = e.current();
101
+ n = l.propertyIsEnumerable(e.current()) ? "keyword" : c.propertyIsEnumerable(e.current()) ? "operator" : /^[A-Z][A-Z_0-9]*$/g.test(t) ? "tag" : /^0[bB][0-1]+$/g.test(t) || /^0[cC][0-7]+$/g.test(t) || /^0[xX][a-fA-F0-9]+$/g.test(t) || /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(t) || /^[0-9]+$/g.test(t) ? "number" : "variable";
102
+ }
103
+ return n;
104
+ },
105
+ languageData: {
106
+ commentTokens: { line: "--" }
107
+ }
108
+ };
109
+ export {
110
+ b as eiffel
111
+ };
@@ -0,0 +1,109 @@
1
+ import "./index.css";
2
+ function a(n, t, i) {
3
+ return t(i), i(n, t);
4
+ }
5
+ var v = /[a-z]/, o = /[A-Z]/, l = /[a-zA-Z0-9_]/, f = /[0-9]/, g = /[0-9A-Fa-f]/, p = /[-&*+.\\/<>=?^|:]/, w = /[(),[\]{}]/, x = /[ \v\f]/;
6
+ function r() {
7
+ return function(n, t) {
8
+ if (n.eatWhile(x))
9
+ return null;
10
+ var i = n.next();
11
+ if (w.test(i))
12
+ return i === "{" && n.eat("-") ? a(n, t, h(1)) : i === "[" && n.match("glsl|") ? a(n, t, u) : "builtin";
13
+ if (i === "'")
14
+ return a(n, t, d);
15
+ if (i === '"')
16
+ return n.eat('"') ? n.eat('"') ? a(n, t, k) : "string" : a(n, t, E);
17
+ if (o.test(i))
18
+ return n.eatWhile(l), "type";
19
+ if (v.test(i)) {
20
+ var e = n.pos === 1;
21
+ return n.eatWhile(l), e ? "def" : "variable";
22
+ }
23
+ if (f.test(i)) {
24
+ if (i === "0") {
25
+ if (n.eat(/[xX]/))
26
+ return n.eatWhile(g), "number";
27
+ } else
28
+ n.eatWhile(f);
29
+ return n.eat(".") && n.eatWhile(f), n.eat(/[eE]/) && (n.eat(/[-+]/), n.eatWhile(f)), "number";
30
+ }
31
+ return p.test(i) ? i === "-" && n.eat("-") ? (n.skipToEnd(), "comment") : (n.eatWhile(p), "keyword") : i === "_" ? "keyword" : "error";
32
+ };
33
+ }
34
+ function h(n) {
35
+ return n == 0 ? r() : function(t, i) {
36
+ for (; !t.eol(); ) {
37
+ var e = t.next();
38
+ if (e == "{" && t.eat("-"))
39
+ ++n;
40
+ else if (e == "-" && t.eat("}") && (--n, n === 0))
41
+ return i(r()), "comment";
42
+ }
43
+ return i(h(n)), "comment";
44
+ };
45
+ }
46
+ function k(n, t) {
47
+ for (; !n.eol(); ) {
48
+ var i = n.next();
49
+ if (i === '"' && n.eat('"') && n.eat('"'))
50
+ return t(r()), "string";
51
+ }
52
+ return "string";
53
+ }
54
+ function E(n, t) {
55
+ for (; n.skipTo('\\"'); )
56
+ n.next(), n.next();
57
+ return n.skipTo('"') ? (n.next(), t(r()), "string") : (n.skipToEnd(), t(r()), "error");
58
+ }
59
+ function d(n, t) {
60
+ for (; n.skipTo("\\'"); )
61
+ n.next(), n.next();
62
+ return n.skipTo("'") ? (n.next(), t(r()), "string") : (n.skipToEnd(), t(r()), "error");
63
+ }
64
+ function u(n, t) {
65
+ for (; !n.eol(); ) {
66
+ var i = n.next();
67
+ if (i === "|" && n.eat("]"))
68
+ return t(r()), "string";
69
+ }
70
+ return "string";
71
+ }
72
+ var y = {
73
+ case: 1,
74
+ of: 1,
75
+ as: 1,
76
+ if: 1,
77
+ then: 1,
78
+ else: 1,
79
+ let: 1,
80
+ in: 1,
81
+ type: 1,
82
+ alias: 1,
83
+ module: 1,
84
+ where: 1,
85
+ import: 1,
86
+ exposing: 1,
87
+ port: 1
88
+ };
89
+ const R = {
90
+ name: "elm",
91
+ startState: function() {
92
+ return { f: r() };
93
+ },
94
+ copyState: function(n) {
95
+ return { f: n.f };
96
+ },
97
+ token: function(n, t) {
98
+ var i = t.f(n, function(m) {
99
+ t.f = m;
100
+ }), e = n.current();
101
+ return y.hasOwnProperty(e) ? "keyword" : i;
102
+ },
103
+ languageData: {
104
+ commentTokens: { line: "--" }
105
+ }
106
+ };
107
+ export {
108
+ R as elm
109
+ };