zs_library 0.4.8 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +11245 -6
  3. package/package.json +146 -146
  4. package/dist/apl-DzB7vleG.js +0 -77
  5. package/dist/asciiarmor-GBg_dTix.js +0 -35
  6. package/dist/asn1-C3znSLx9.js +0 -96
  7. package/dist/asterisk-DlqRFsge.js +0 -272
  8. package/dist/brainfuck-BRsrPeoO.js +0 -35
  9. package/dist/clike-BvRdj3ii.js +0 -621
  10. package/dist/clojure-DoHCnq3P.js +0 -801
  11. package/dist/cmake-lga2BQKc.js +0 -29
  12. package/dist/cobol-CoUZEClC.js +0 -73
  13. package/dist/coffeescript-DtzhVgPb.js +0 -180
  14. package/dist/commonlisp-Dczl5pgK.js +0 -76
  15. package/dist/crystal-CGcK8mnw.js +0 -218
  16. package/dist/css-BSROsPdq.js +0 -1561
  17. package/dist/cypher-DtSMl1Mv.js +0 -69
  18. package/dist/d-Dvhr70b-.js +0 -128
  19. package/dist/diff-CGwDp7kO.js +0 -19
  20. package/dist/dockerfile-comEO-T6.js +0 -195
  21. package/dist/dtd-CCHJ68ra.js +0 -85
  22. package/dist/dylan-DuvcMu5H.js +0 -235
  23. package/dist/ebnf-40BT7kIS.js +0 -79
  24. package/dist/ecl-D1uoNQJW.js +0 -122
  25. package/dist/eiffel-5pGo0kXa.js +0 -111
  26. package/dist/elm-BaiVOLJD.js +0 -109
  27. package/dist/erlang-CkzodiGe.js +0 -488
  28. package/dist/factor-BOXOAn_M.js +0 -66
  29. package/dist/fcl-BpnTn_eU.js +0 -104
  30. package/dist/forth-DErAeAEb.js +0 -61
  31. package/dist/fortran-D2-6KpzO.js +0 -443
  32. package/dist/gas-DyEPANLH.js +0 -184
  33. package/dist/gherkin-Drt_srgO.js +0 -35
  34. package/dist/groovy-BMVfw_nf.js +0 -147
  35. package/dist/haskell-hWhKnZO1.js +0 -376
  36. package/dist/haxe-B1MRfS0p.js +0 -360
  37. package/dist/http-DmgKxj-g.js +0 -45
  38. package/dist/idl-DqZ86h3r.js +0 -948
  39. package/dist/index-5dj8r7GK.js +0 -266
  40. package/dist/index-BTXiadLB.js +0 -309
  41. package/dist/index-BlC4-BmN.js +0 -72
  42. package/dist/index-BrFeP3fX.js +0 -244
  43. package/dist/index-Bto4OncH.js +0 -539
  44. package/dist/index-Bvv7YkGe.js +0 -136
  45. package/dist/index-Bx4MkRG_.js +0 -76
  46. package/dist/index-CVOhQMF3.js +0 -608
  47. package/dist/index-CecD8NGL.js +0 -228472
  48. package/dist/index-CmoZmAhh.js +0 -289
  49. package/dist/index-DE3hmKbB.js +0 -135
  50. package/dist/index-DF7XjAxV.js +0 -94
  51. package/dist/index-DcChItCb.js +0 -157
  52. package/dist/index-Dl5DpQ2k.js +0 -342
  53. package/dist/index-Dpbxeq5U.js +0 -59
  54. package/dist/index-gpJmCEdM.js +0 -99
  55. package/dist/index-udH8R_K0.js +0 -300
  56. package/dist/javascript-BvuVDFxD.js +0 -691
  57. package/dist/jinja2-sU0UaYnG.js +0 -155
  58. package/dist/julia-3_lRZPrK.js +0 -242
  59. package/dist/livescript-BeDiX_lv.js +0 -273
  60. package/dist/lua-DsgFLpii.js +0 -218
  61. package/dist/mathematica-1GSq-6KQ.js +0 -36
  62. package/dist/mbox-agttEgFX.js +0 -77
  63. package/dist/mirc-0mTi20sq.js +0 -73
  64. package/dist/mllike-Cn3QD1L6.js +0 -273
  65. package/dist/modelica-zXUsSMFb.js +0 -94
  66. package/dist/mscgen-CjqYDKLG.js +0 -105
  67. package/dist/mumps-o2cuacx9.js +0 -26
  68. package/dist/nginx-BwTpvSVN.js +0 -90
  69. package/dist/nsis-BuRdhAu4.js +0 -63
  70. package/dist/ntriples-DrgMTIhT.js +0 -80
  71. package/dist/octave-Cxdtf9mO.js +0 -144
  72. package/dist/oz-DFmTw-qE.js +0 -152
  73. package/dist/pascal-DXxn4Ogv.js +0 -78
  74. package/dist/perl-C73cx1ym.js +0 -916
  75. package/dist/pig-Bb8sMbk0.js +0 -55
  76. package/dist/powershell-DxmufwKU.js +0 -250
  77. package/dist/properties-C4fhBR7T.js +0 -27
  78. package/dist/protobuf-Eqae3kep.js +0 -50
  79. package/dist/pug-Cdoid33I.js +0 -249
  80. package/dist/puppet-BH84QZvC.js +0 -46
  81. package/dist/python-D32-_XsH.js +0 -314
  82. package/dist/q-CDvEpNHY.js +0 -84
  83. package/dist/r-D9TtEI-G.js +0 -105
  84. package/dist/rpm-Ckejt31K.js +0 -58
  85. package/dist/ruby-gRVA_lpr.js +0 -229
  86. package/dist/sas-Cetv6MtF.js +0 -106
  87. package/dist/scheme-BpAxUIwV.js +0 -125
  88. package/dist/shell-DmARhv5h.js +0 -183
  89. package/dist/sieve-DJENs6f1.js +0 -73
  90. package/dist/simple-mode-B0kVDhR7.js +0 -89
  91. package/dist/smalltalk-CtRR6guu.js +0 -49
  92. package/dist/solr-ZVIJNGhC.js +0 -42
  93. package/dist/sparql-Cg1WYQva.js +0 -198
  94. package/dist/spreadsheet-Bi94Lk_2.js +0 -50
  95. package/dist/sql-BLhvp4JJ.js +0 -283
  96. package/dist/stex-DuReG47O.js +0 -130
  97. package/dist/stylus-D5QpSSbb.js +0 -251
  98. package/dist/swift-CZplZXOW.js +0 -231
  99. package/dist/tcl-COiqjz-O.js +0 -82
  100. package/dist/textile-BIDpYsbD.js +0 -296
  101. package/dist/tiddlywiki-C4woD_uK.js +0 -156
  102. package/dist/tiki-Ddj0Z2aQ.js +0 -182
  103. package/dist/toml-Byr0PaXO.js +0 -50
  104. package/dist/troff-BEvN8lSw.js +0 -36
  105. package/dist/ttcn-CyeSpuPS.js +0 -124
  106. package/dist/ttcn-cfg-C4JBLVfg.js +0 -89
  107. package/dist/turtle-8qSCc9Tc.js +0 -81
  108. package/dist/vb-BOJI7cFm.js +0 -75
  109. package/dist/vbscript-Cu6iG9pw.js +0 -325
  110. package/dist/velocity-BEpFYT7L.js +0 -97
  111. package/dist/verilog-BBxq08Rh.js +0 -264
  112. package/dist/vhdl-B0tZHMGi.js +0 -107
  113. package/dist/webidl-CW91NtvY.js +0 -156
  114. package/dist/xquery-DzC9wL36.js +0 -423
  115. package/dist/yacas-lKwNB4DM.js +0 -74
  116. package/dist/z80-Bq0fiCqy.js +0 -62
@@ -1,314 +0,0 @@
1
- import "./index.css";
2
- function s(o) {
3
- return new RegExp("^((" + o.join(")|(") + "))\\b");
4
- }
5
- var N = s(["and", "or", "not", "is"]), E = [
6
- "as",
7
- "assert",
8
- "break",
9
- "class",
10
- "continue",
11
- "def",
12
- "del",
13
- "elif",
14
- "else",
15
- "except",
16
- "finally",
17
- "for",
18
- "from",
19
- "global",
20
- "if",
21
- "import",
22
- "lambda",
23
- "pass",
24
- "raise",
25
- "return",
26
- "try",
27
- "while",
28
- "with",
29
- "yield",
30
- "in",
31
- "False",
32
- "True"
33
- ], F = [
34
- "abs",
35
- "all",
36
- "any",
37
- "bin",
38
- "bool",
39
- "bytearray",
40
- "callable",
41
- "chr",
42
- "classmethod",
43
- "compile",
44
- "complex",
45
- "delattr",
46
- "dict",
47
- "dir",
48
- "divmod",
49
- "enumerate",
50
- "eval",
51
- "filter",
52
- "float",
53
- "format",
54
- "frozenset",
55
- "getattr",
56
- "globals",
57
- "hasattr",
58
- "hash",
59
- "help",
60
- "hex",
61
- "id",
62
- "input",
63
- "int",
64
- "isinstance",
65
- "issubclass",
66
- "iter",
67
- "len",
68
- "list",
69
- "locals",
70
- "map",
71
- "max",
72
- "memoryview",
73
- "min",
74
- "next",
75
- "object",
76
- "oct",
77
- "open",
78
- "ord",
79
- "pow",
80
- "property",
81
- "range",
82
- "repr",
83
- "reversed",
84
- "round",
85
- "set",
86
- "setattr",
87
- "slice",
88
- "sorted",
89
- "staticmethod",
90
- "str",
91
- "sum",
92
- "super",
93
- "tuple",
94
- "type",
95
- "vars",
96
- "zip",
97
- "__import__",
98
- "NotImplemented",
99
- "Ellipsis",
100
- "__debug__"
101
- ];
102
- function c(o) {
103
- return o.scopes[o.scopes.length - 1];
104
- }
105
- function A(o) {
106
- for (var p = "error", O = o.delimiters || o.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/, h = [
107
- o.singleOperators,
108
- o.doubleOperators,
109
- o.doubleDelimiters,
110
- o.tripleDelimiters,
111
- o.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/
112
- ], g = 0; g < h.length; g++) h[g] || h.splice(g--, 1);
113
- var k = o.hangingIndent, d = E, a = F;
114
- o.extra_keywords != null && (d = d.concat(o.extra_keywords)), o.extra_builtins != null && (a = a.concat(o.extra_builtins));
115
- var x = !(o.version && Number(o.version) < 3);
116
- if (x) {
117
- var y = o.identifiers || /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
118
- d = d.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]), a = a.concat(["ascii", "bytes", "exec", "print"]);
119
- var w = new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`, "i");
120
- } else {
121
- var y = o.identifiers || /^[_A-Za-z][_A-Za-z0-9]*/;
122
- d = d.concat(["exec", "print"]), a = a.concat([
123
- "apply",
124
- "basestring",
125
- "buffer",
126
- "cmp",
127
- "coerce",
128
- "execfile",
129
- "file",
130
- "intern",
131
- "long",
132
- "raw_input",
133
- "reduce",
134
- "reload",
135
- "unichr",
136
- "unicode",
137
- "xrange",
138
- "None"
139
- ]);
140
- var w = new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`, "i");
141
- }
142
- var I = s(d), L = s(a);
143
- function z(n, e) {
144
- var r = n.sol() && e.lastToken != "\\";
145
- if (r && (e.indent = n.indentation()), r && c(e).type == "py") {
146
- var i = c(e).offset;
147
- if (n.eatSpace()) {
148
- var l = n.indentation();
149
- return l > i ? S(n, e) : l < i && _(n, e) && n.peek() != "#" && (e.errorToken = !0), null;
150
- } else {
151
- var t = v(n, e);
152
- return i > 0 && _(n, e) && (t += " " + p), t;
153
- }
154
- }
155
- return v(n, e);
156
- }
157
- function v(n, e, r) {
158
- if (n.eatSpace()) return null;
159
- if (!r && n.match(/^#.*/)) return "comment";
160
- if (n.match(/^[0-9\.]/, !1)) {
161
- var i = !1;
162
- if (n.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i) && (i = !0), n.match(/^[\d_]+\.\d*/) && (i = !0), n.match(/^\.\d+/) && (i = !0), i)
163
- return n.eat(/J/i), "number";
164
- var l = !1;
165
- if (n.match(/^0x[0-9a-f_]+/i) && (l = !0), n.match(/^0b[01_]+/i) && (l = !0), n.match(/^0o[0-7_]+/i) && (l = !0), n.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/) && (n.eat(/J/i), l = !0), n.match(/^0(?![\dx])/i) && (l = !0), l)
166
- return n.eat(/L/i), "number";
167
- }
168
- if (n.match(w)) {
169
- var t = n.current().toLowerCase().indexOf("f") !== -1;
170
- return t ? (e.tokenize = R(n.current(), e.tokenize), e.tokenize(n, e)) : (e.tokenize = m(n.current(), e.tokenize), e.tokenize(n, e));
171
- }
172
- for (var u = 0; u < h.length; u++)
173
- if (n.match(h[u])) return "operator";
174
- return n.match(O) ? "punctuation" : e.lastToken == "." && n.match(y) ? "property" : n.match(I) || n.match(N) ? "keyword" : n.match(L) ? "builtin" : n.match(/^(self|cls)\b/) ? "self" : n.match(y) ? e.lastToken == "def" || e.lastToken == "class" ? "def" : "variable" : (n.next(), r ? null : p);
175
- }
176
- function R(n, e) {
177
- for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
178
- n = n.substr(1);
179
- var r = n.length == 1, i = "string";
180
- function l(u) {
181
- return function(f, b) {
182
- var T = v(f, b, !0);
183
- return T == "punctuation" && (f.current() == "{" ? b.tokenize = l(u + 1) : f.current() == "}" && (u > 1 ? b.tokenize = l(u - 1) : b.tokenize = t)), T;
184
- };
185
- }
186
- function t(u, f) {
187
- for (; !u.eol(); )
188
- if (u.eatWhile(/[^'"\{\}\\]/), u.eat("\\")) {
189
- if (u.next(), r && u.eol())
190
- return i;
191
- } else {
192
- if (u.match(n))
193
- return f.tokenize = e, i;
194
- if (u.match("{{"))
195
- return i;
196
- if (u.match("{", !1))
197
- return f.tokenize = l(0), u.current() ? i : f.tokenize(u, f);
198
- if (u.match("}}"))
199
- return i;
200
- if (u.match("}"))
201
- return p;
202
- u.eat(/['"]/);
203
- }
204
- if (r) {
205
- if (o.singleLineStringErrors)
206
- return p;
207
- f.tokenize = e;
208
- }
209
- return i;
210
- }
211
- return t.isString = !0, t;
212
- }
213
- function m(n, e) {
214
- for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
215
- n = n.substr(1);
216
- var r = n.length == 1, i = "string";
217
- function l(t, u) {
218
- for (; !t.eol(); )
219
- if (t.eatWhile(/[^'"\\]/), t.eat("\\")) {
220
- if (t.next(), r && t.eol())
221
- return i;
222
- } else {
223
- if (t.match(n))
224
- return u.tokenize = e, i;
225
- t.eat(/['"]/);
226
- }
227
- if (r) {
228
- if (o.singleLineStringErrors)
229
- return p;
230
- u.tokenize = e;
231
- }
232
- return i;
233
- }
234
- return l.isString = !0, l;
235
- }
236
- function S(n, e) {
237
- for (; c(e).type != "py"; ) e.scopes.pop();
238
- e.scopes.push({
239
- offset: c(e).offset + n.indentUnit,
240
- type: "py",
241
- align: null
242
- });
243
- }
244
- function B(n, e, r) {
245
- var i = n.match(/^[\s\[\{\(]*(?:#|$)/, !1) ? null : n.column() + 1;
246
- e.scopes.push({
247
- offset: e.indent + (k || n.indentUnit),
248
- type: r,
249
- align: i
250
- });
251
- }
252
- function _(n, e) {
253
- for (var r = n.indentation(); e.scopes.length > 1 && c(e).offset > r; ) {
254
- if (c(e).type != "py") return !0;
255
- e.scopes.pop();
256
- }
257
- return c(e).offset != r;
258
- }
259
- function D(n, e) {
260
- n.sol() && (e.beginningOfLine = !0, e.dedent = !1);
261
- var r = e.tokenize(n, e), i = n.current();
262
- if (e.beginningOfLine && i == "@")
263
- return n.match(y, !1) ? "meta" : x ? "operator" : p;
264
- if (/\S/.test(i) && (e.beginningOfLine = !1), (r == "variable" || r == "builtin") && e.lastToken == "meta" && (r = "meta"), (i == "pass" || i == "return") && (e.dedent = !0), i == "lambda" && (e.lambda = !0), i == ":" && !e.lambda && c(e).type == "py" && n.match(/^\s*(?:#|$)/, !1) && S(n, e), i.length == 1 && !/string|comment/.test(r)) {
265
- var l = "[({".indexOf(i);
266
- if (l != -1 && B(n, e, "])}".slice(l, l + 1)), l = "])}".indexOf(i), l != -1)
267
- if (c(e).type == i) e.indent = e.scopes.pop().offset - (k || n.indentUnit);
268
- else return p;
269
- }
270
- return e.dedent && n.eol() && c(e).type == "py" && e.scopes.length > 1 && e.scopes.pop(), r;
271
- }
272
- return {
273
- name: "python",
274
- startState: function() {
275
- return {
276
- tokenize: z,
277
- scopes: [{ offset: 0, type: "py", align: null }],
278
- indent: 0,
279
- lastToken: null,
280
- lambda: !1,
281
- dedent: 0
282
- };
283
- },
284
- token: function(n, e) {
285
- var r = e.errorToken;
286
- r && (e.errorToken = !1);
287
- var i = D(n, e);
288
- return i && i != "comment" && (e.lastToken = i == "keyword" || i == "punctuation" ? n.current() : i), i == "punctuation" && (i = null), n.eol() && e.lambda && (e.lambda = !1), r ? p : i;
289
- },
290
- indent: function(n, e, r) {
291
- if (n.tokenize != z)
292
- return n.tokenize.isString ? null : 0;
293
- var i = c(n), l = i.type == e.charAt(0) || i.type == "py" && !n.dedent && /^(else:|elif |except |finally:)/.test(e);
294
- return i.align != null ? i.align - (l ? 1 : 0) : i.offset - (l ? k || r.unit : 0);
295
- },
296
- languageData: {
297
- autocomplete: E.concat(F).concat(["exec", "print"]),
298
- indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
299
- commentTokens: { line: "#" },
300
- closeBrackets: { brackets: ["(", "[", "{", "'", '"', "'''", '"""'] }
301
- }
302
- };
303
- }
304
- var U = function(o) {
305
- return o.split(" ");
306
- };
307
- const P = A({}), $ = A({
308
- extra_keywords: U("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")
309
- });
310
- export {
311
- $ as cython,
312
- A as mkPython,
313
- P as python
314
- };
@@ -1,84 +0,0 @@
1
- import "./index.css";
2
- var c, p = x(["abs", "acos", "aj", "aj0", "all", "and", "any", "asc", "asin", "asof", "atan", "attr", "avg", "avgs", "bin", "by", "ceiling", "cols", "cor", "cos", "count", "cov", "cross", "csv", "cut", "delete", "deltas", "desc", "dev", "differ", "distinct", "div", "do", "each", "ej", "enlist", "eval", "except", "exec", "exit", "exp", "fby", "fills", "first", "fkeys", "flip", "floor", "from", "get", "getenv", "group", "gtime", "hclose", "hcount", "hdel", "hopen", "hsym", "iasc", "idesc", "if", "ij", "in", "insert", "inter", "inv", "key", "keys", "last", "like", "list", "lj", "load", "log", "lower", "lsq", "ltime", "ltrim", "mavg", "max", "maxs", "mcount", "md5", "mdev", "med", "meta", "min", "mins", "mmax", "mmin", "mmu", "mod", "msum", "neg", "next", "not", "null", "or", "over", "parse", "peach", "pj", "plist", "prd", "prds", "prev", "prior", "rand", "rank", "ratios", "raze", "read0", "read1", "reciprocal", "reverse", "rload", "rotate", "rsave", "rtrim", "save", "scan", "select", "set", "setenv", "show", "signum", "sin", "sqrt", "ss", "ssr", "string", "sublist", "sum", "sums", "sv", "system", "tables", "tan", "til", "trim", "txf", "type", "uj", "ungroup", "union", "update", "upper", "upsert", "value", "var", "view", "views", "vs", "wavg", "where", "where", "while", "within", "wj", "wj1", "wsum", "xasc", "xbar", "xcol", "xcols", "xdesc", "xexp", "xgroup", "xkey", "xlog", "xprev", "xrank"]), f = /[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;
3
- function x(n) {
4
- return new RegExp("^(" + n.join("|") + ")$");
5
- }
6
- function r(n, e) {
7
- var o = n.sol(), i = n.next();
8
- if (c = null, o) {
9
- if (i == "/")
10
- return (e.tokenize = s)(n, e);
11
- if (i == "\\")
12
- return n.eol() || /\s/.test(n.peek()) ? (n.skipToEnd(), /^\\\s*$/.test(n.current()) ? (e.tokenize = k)(n) : e.tokenize = r, "comment") : (e.tokenize = r, "builtin");
13
- }
14
- if (/\s/.test(i))
15
- return n.peek() == "/" ? (n.skipToEnd(), "comment") : "null";
16
- if (i == '"')
17
- return (e.tokenize = m)(n, e);
18
- if (i == "`")
19
- return n.eatWhile(/[A-Za-z\d_:\/.]/), "macroName";
20
- if (i == "." && /\d/.test(n.peek()) || /\d/.test(i)) {
21
- var t = null;
22
- return n.backUp(1), n.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) || n.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) || n.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) || n.match(/^\d+[ptuv]{1}/) ? t = "temporal" : (n.match(/^0[NwW]{1}/) || n.match(/^0x[\da-fA-F]*/) || n.match(/^[01]+[b]{1}/) || n.match(/^\d+[chijn]{1}/) || n.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) && (t = "number"), t && (!(i = n.peek()) || f.test(i)) ? t : (n.next(), "error");
23
- }
24
- return /[A-Za-z]|\./.test(i) ? (n.eatWhile(/[A-Za-z._\d]/), p.test(n.current()) ? "keyword" : "variable") : /[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(i) || /[{}\(\[\]\)]/.test(i) ? null : "error";
25
- }
26
- function s(n, e) {
27
- return n.skipToEnd(), /\/\s*$/.test(n.current()) ? (e.tokenize = v)(n, e) : e.tokenize = r, "comment";
28
- }
29
- function v(n, e) {
30
- var o = n.sol() && n.peek() == "\\";
31
- return n.skipToEnd(), o && /^\\\s*$/.test(n.current()) && (e.tokenize = r), "comment";
32
- }
33
- function k(n) {
34
- return n.skipToEnd(), "comment";
35
- }
36
- function m(n, e) {
37
- for (var o = !1, i, t = !1; i = n.next(); ) {
38
- if (i == '"' && !o) {
39
- t = !0;
40
- break;
41
- }
42
- o = !o && i == "\\";
43
- }
44
- return t && (e.tokenize = r), "string";
45
- }
46
- function l(n, e, o) {
47
- n.context = { prev: n.context, indent: n.indent, col: o, type: e };
48
- }
49
- function u(n) {
50
- n.indent = n.context.indent, n.context = n.context.prev;
51
- }
52
- const a = {
53
- name: "q",
54
- startState: function() {
55
- return {
56
- tokenize: r,
57
- context: null,
58
- indent: 0,
59
- col: 0
60
- };
61
- },
62
- token: function(n, e) {
63
- n.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = n.indentation());
64
- var o = e.tokenize(n, e);
65
- if (o != "comment" && e.context && e.context.align == null && e.context.type != "pattern" && (e.context.align = !0), c == "(") l(e, ")", n.column());
66
- else if (c == "[") l(e, "]", n.column());
67
- else if (c == "{") l(e, "}", n.column());
68
- else if (/[\]\}\)]/.test(c)) {
69
- for (; e.context && e.context.type == "pattern"; ) u(e);
70
- e.context && c == e.context.type && u(e);
71
- } else c == "." && e.context && e.context.type == "pattern" ? u(e) : /atom|string|variable/.test(o) && e.context && (/[\}\]]/.test(e.context.type) ? l(e, "pattern", n.column()) : e.context.type == "pattern" && !e.context.align && (e.context.align = !0, e.context.col = n.column()));
72
- return o;
73
- },
74
- indent: function(n, e, o) {
75
- var i = e && e.charAt(0), t = n.context;
76
- if (/[\]\}]/.test(i))
77
- for (; t && t.type == "pattern"; ) t = t.prev;
78
- var d = t && i == t.type;
79
- return t ? t.type == "pattern" ? t.col : t.align ? t.col + (d ? 0 : 1) : t.indent + (d ? 0 : o.unit) : 0;
80
- }
81
- };
82
- export {
83
- a as q
84
- };
@@ -1,105 +0,0 @@
1
- import "./index.css";
2
- function f(e) {
3
- for (var n = {}, r = 0; r < e.length; ++r) n[e[r]] = !0;
4
- return n;
5
- }
6
- var b = ["NULL", "NA", "Inf", "NaN", "NA_integer_", "NA_real_", "NA_complex_", "NA_character_", "TRUE", "FALSE"], g = ["list", "quote", "bquote", "eval", "return", "call", "parse", "deparse"], s = ["if", "else", "repeat", "while", "function", "for", "in", "next", "break"], y = ["if", "else", "repeat", "while", "function", "for"], h = f(b), m = f(g), N = f(s), A = f(y), k = /[+\-*\/^<>=!&|~$:]/, t;
7
- function p(e, n) {
8
- t = null;
9
- var r = e.next();
10
- if (r == "#")
11
- return e.skipToEnd(), "comment";
12
- if (r == "0" && e.eat("x"))
13
- return e.eatWhile(/[\da-f]/i), "number";
14
- if (r == "." && e.eat(/\d/))
15
- return e.match(/\d*(?:e[+\-]?\d+)?/), "number";
16
- if (/\d/.test(r))
17
- return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/), "number";
18
- if (r == "'" || r == '"')
19
- return n.tokenize = E(r), "string";
20
- if (r == "`")
21
- return e.match(/[^`]+`/), "string.special";
22
- if (r == "." && e.match(/.(?:[.]|\d+)/))
23
- return "keyword";
24
- if (/[a-zA-Z\.]/.test(r)) {
25
- e.eatWhile(/[\w\.]/);
26
- var i = e.current();
27
- return h.propertyIsEnumerable(i) ? "atom" : N.propertyIsEnumerable(i) ? (A.propertyIsEnumerable(i) && !e.match(/\s*if(\s+|$)/, !1) && (t = "block"), "keyword") : m.propertyIsEnumerable(i) ? "builtin" : "variable";
28
- } else return r == "%" ? (e.skipTo("%") && e.next(), "variableName.special") : r == "<" && e.eat("-") || r == "<" && e.match("<-") || r == "-" && e.match(/>>?/) || r == "=" && n.ctx.argList ? "operator" : k.test(r) ? (r == "$" || e.eatWhile(k), "operator") : /[\(\){}\[\];]/.test(r) ? (t = r, r == ";" ? "punctuation" : null) : null;
29
- }
30
- function E(e) {
31
- return function(n, r) {
32
- if (n.eat("\\")) {
33
- var i = n.next();
34
- return i == "x" ? n.match(/^[a-f0-9]{2}/i) : (i == "u" || i == "U") && n.eat("{") && n.skipTo("}") ? n.next() : i == "u" ? n.match(/^[a-f0-9]{4}/i) : i == "U" ? n.match(/^[a-f0-9]{8}/i) : /[0-7]/.test(i) && n.match(/^[0-7]{1,2}/), "string.special";
35
- } else {
36
- for (var l; (l = n.next()) != null; ) {
37
- if (l == e) {
38
- r.tokenize = p;
39
- break;
40
- }
41
- if (l == "\\") {
42
- n.backUp(1);
43
- break;
44
- }
45
- }
46
- return "string";
47
- }
48
- };
49
- }
50
- var v = 1, u = 2, c = 4;
51
- function o(e, n, r) {
52
- e.ctx = {
53
- type: n,
54
- indent: e.indent,
55
- flags: 0,
56
- column: r.column(),
57
- prev: e.ctx
58
- };
59
- }
60
- function x(e, n) {
61
- var r = e.ctx;
62
- e.ctx = {
63
- type: r.type,
64
- indent: r.indent,
65
- flags: r.flags | n,
66
- column: r.column,
67
- prev: r.prev
68
- };
69
- }
70
- function a(e) {
71
- e.indent = e.ctx.indent, e.ctx = e.ctx.prev;
72
- }
73
- const _ = {
74
- name: "r",
75
- startState: function(e) {
76
- return {
77
- tokenize: p,
78
- ctx: {
79
- type: "top",
80
- indent: -e,
81
- flags: u
82
- },
83
- indent: 0,
84
- afterIdent: !1
85
- };
86
- },
87
- token: function(e, n) {
88
- if (e.sol() && ((n.ctx.flags & 3) == 0 && (n.ctx.flags |= u), n.ctx.flags & c && a(n), n.indent = e.indentation()), e.eatSpace()) return null;
89
- var r = n.tokenize(e, n);
90
- return r != "comment" && (n.ctx.flags & u) == 0 && x(n, v), (t == ";" || t == "{" || t == "}") && n.ctx.type == "block" && a(n), t == "{" ? o(n, "}", e) : t == "(" ? (o(n, ")", e), n.afterIdent && (n.ctx.argList = !0)) : t == "[" ? o(n, "]", e) : t == "block" ? o(n, "block", e) : t == n.ctx.type ? a(n) : n.ctx.type == "block" && r != "comment" && x(n, c), n.afterIdent = r == "variable" || r == "keyword", r;
91
- },
92
- indent: function(e, n, r) {
93
- if (e.tokenize != p) return 0;
94
- var i = n && n.charAt(0), l = e.ctx, d = i == l.type;
95
- return l.flags & c && (l = l.prev), l.type == "block" ? l.indent + (i == "{" ? 0 : r.unit) : l.flags & v ? l.column + (d ? 0 : 1) : l.indent + (d ? 0 : r.unit);
96
- },
97
- languageData: {
98
- wordChars: ".",
99
- commentTokens: { line: "#" },
100
- autocomplete: b.concat(g, s)
101
- }
102
- };
103
- export {
104
- _ as r
105
- };
@@ -1,58 +0,0 @@
1
- import "./index.css";
2
- var o = /^-+$/, i = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /, a = /^[\w+.-]+@[\w.-]+/;
3
- const d = {
4
- name: "rpmchanges",
5
- token: function(r) {
6
- return r.sol() && (r.match(o) || r.match(i)) ? "tag" : r.match(a) ? "string" : (r.next(), null);
7
- }
8
- };
9
- var c = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/, t = /^[a-zA-Z0-9()]+:/, l = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/, p = /^%(ifnarch|ifarch|if)/, f = /^%(else|endif)/, u = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;
10
- const g = {
11
- name: "rpmspec",
12
- startState: function() {
13
- return {
14
- controlFlow: !1,
15
- macroParameters: !1,
16
- section: !1
17
- };
18
- },
19
- token: function(r, e) {
20
- var n = r.peek();
21
- if (n == "#")
22
- return r.skipToEnd(), "comment";
23
- if (r.sol()) {
24
- if (r.match(t))
25
- return "header";
26
- if (r.match(l))
27
- return "atom";
28
- }
29
- if (r.match(/^\$\w+/) || r.match(/^\$\{\w+\}/))
30
- return "def";
31
- if (r.match(f))
32
- return "keyword";
33
- if (r.match(p))
34
- return e.controlFlow = !0, "keyword";
35
- if (e.controlFlow) {
36
- if (r.match(u))
37
- return "operator";
38
- if (r.match(/^(\d+)/))
39
- return "number";
40
- r.eol() && (e.controlFlow = !1);
41
- }
42
- if (r.match(c))
43
- return r.eol() && (e.controlFlow = !1), "number";
44
- if (r.match(/^%[\w]+/))
45
- return r.match("(") && (e.macroParameters = !0), "keyword";
46
- if (e.macroParameters) {
47
- if (r.match(/^\d+/))
48
- return "number";
49
- if (r.match(")"))
50
- return e.macroParameters = !1, "keyword";
51
- }
52
- return r.match(/^%\{\??[\w \-\:\!]+\}/) ? (r.eol() && (e.controlFlow = !1), "def") : (r.next(), null);
53
- }
54
- };
55
- export {
56
- d as rpmChanges,
57
- g as rpmSpec
58
- };