@aiao/code-editor 0.0.7 → 0.0.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 (125) hide show
  1. package/dist/apl-B2DGVGxc.js +76 -0
  2. package/dist/asciiarmor-2LVJmxlE.js +34 -0
  3. package/dist/asn1-jKiBa2Ya.js +95 -0
  4. package/dist/asterisk-DS281yxp.js +271 -0
  5. package/dist/brainfuck-C_p9pTT8.js +34 -0
  6. package/dist/clike-BMALKCNj.js +620 -0
  7. package/dist/clojure-CCKyeQKf.js +800 -0
  8. package/dist/cmake-CuaCgAKt.js +28 -0
  9. package/dist/cobol-BlTKFDRj.js +72 -0
  10. package/dist/coffeescript-BVCvwO8I.js +179 -0
  11. package/dist/commonlisp-D_kxz07b.js +75 -0
  12. package/dist/crystal-D309uH6_.js +217 -0
  13. package/dist/css-BkF-NPzE.js +1553 -0
  14. package/dist/cypher-BMq4Fwjl.js +68 -0
  15. package/dist/d-BZcgY6La.js +127 -0
  16. package/dist/diff-Cg9d_RX2.js +18 -0
  17. package/dist/dockerfile-DFX8bq9N.js +194 -0
  18. package/dist/dtd-CtLokQ-U.js +84 -0
  19. package/dist/dylan-QYeExnWK.js +234 -0
  20. package/dist/ebnf-DUPDuY4r.js +78 -0
  21. package/dist/ecl-CiXN-g_D.js +121 -0
  22. package/dist/eiffel-yQhjl4T1.js +110 -0
  23. package/dist/elm-CNT9vbN0.js +108 -0
  24. package/dist/erlang-CFOYdy9e.js +487 -0
  25. package/dist/factor-Clf6BoVk.js +65 -0
  26. package/dist/fcl-CPC2WYrI.js +103 -0
  27. package/dist/forth-BmxRyE9S.js +60 -0
  28. package/dist/fortran-9bvPyrOW.js +442 -0
  29. package/dist/gas-cpmYfFX2.js +183 -0
  30. package/dist/gherkin-CJuwpceU.js +34 -0
  31. package/dist/groovy-DZeT_VM-.js +146 -0
  32. package/dist/haskell-CxiO_7JL.js +375 -0
  33. package/dist/haxe-70NVW1pR.js +359 -0
  34. package/dist/http-D9LttvKF.js +44 -0
  35. package/dist/idl-B6TRFYjl.js +947 -0
  36. package/dist/index-4oLq9F9B.js +945 -0
  37. package/dist/index-9NH8hlZ-.js +342 -0
  38. package/dist/index-BFXNCCbG.js +253 -0
  39. package/dist/index-BLHYcXXK.js +101 -0
  40. package/dist/index-BQU3Rb2C.js +290 -0
  41. package/dist/index-Bg18ePld.js +157 -0
  42. package/dist/index-Bp5lqnbN.js +555 -0
  43. package/dist/index-Bqzq8A1N.js +59 -0
  44. package/dist/index-Bx-s4g99.js +76 -0
  45. package/dist/index-BxX25QmV.js +248 -0
  46. package/dist/index-CFCzgc33.js +1918 -0
  47. package/dist/index-CL7JTU9M.js +136 -0
  48. package/dist/index-CZGsg2Zk.js +12945 -0
  49. package/dist/index-CipmEceX.js +74 -0
  50. package/dist/index-Cv4vvpa2.js +1305 -0
  51. package/dist/index-D4hhdPbZ.js +6153 -0
  52. package/dist/index-DhNQ8g9I.js +270 -0
  53. package/dist/index-Djp53tAP.js +94 -0
  54. package/dist/index-KlsAFhIj.js +566 -0
  55. package/dist/index-OntZqtu6.js +309 -0
  56. package/dist/index-PGnZjMCR.js +302 -0
  57. package/dist/index-TyYoYgss.js +613 -0
  58. package/dist/index-oMSPmlXA.js +960 -0
  59. package/dist/index-rQC6Gbk0.js +138 -0
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +19 -1
  63. package/dist/javascript-DOuB9oqA.js +691 -0
  64. package/dist/julia-DpvXAuO6.js +241 -0
  65. package/dist/languages.d.ts +18 -0
  66. package/dist/languages.d.ts.map +1 -0
  67. package/dist/livescript-CanGTf8u.js +272 -0
  68. package/dist/lua-XplVlWi_.js +217 -0
  69. package/dist/mathematica-jaRHnSxC.js +35 -0
  70. package/dist/mbox-BctzC1hL.js +76 -0
  71. package/dist/mirc-CFBPAOaF.js +72 -0
  72. package/dist/mllike-BSnXJBGA.js +272 -0
  73. package/dist/modelica-vUgVs--1.js +93 -0
  74. package/dist/mscgen-Cpl0NYLN.js +104 -0
  75. package/dist/mumps-CQoS1kWX.js +25 -0
  76. package/dist/nginx-zDPm3Z74.js +89 -0
  77. package/dist/nsis-BCLyjY7m.js +62 -0
  78. package/dist/ntriples-CsNjv2QF.js +79 -0
  79. package/dist/octave-C8PmmSRH.js +143 -0
  80. package/dist/oz-Ce8aN8oE.js +151 -0
  81. package/dist/pascal-De0D6mP7.js +77 -0
  82. package/dist/perl-B4bSCe1C.js +915 -0
  83. package/dist/pig-D24Z8EXi.js +54 -0
  84. package/dist/powershell-DkYVfTzP.js +249 -0
  85. package/dist/properties-Dn9wna3M.js +26 -0
  86. package/dist/protobuf-BPIjwpzm.js +49 -0
  87. package/dist/pug-TGXr6c5j.js +248 -0
  88. package/dist/puppet-nyd4dhjf.js +45 -0
  89. package/dist/python-BkR3uSy8.js +313 -0
  90. package/dist/q-DyHZGnqm.js +86 -0
  91. package/dist/r-LKEuhEGI.js +104 -0
  92. package/dist/rpm-IznJm2Xc.js +57 -0
  93. package/dist/ruby-CcYfvIk6.js +228 -0
  94. package/dist/sas-7E8yHoCW.js +105 -0
  95. package/dist/scheme-DjibxsNh.js +124 -0
  96. package/dist/shell-C0C2sNA_.js +182 -0
  97. package/dist/sieve-Bwz7vjP5.js +72 -0
  98. package/dist/simple-mode-mNVtnu0l.js +89 -0
  99. package/dist/smalltalk-Bhddl2pB.js +48 -0
  100. package/dist/solr-BNlsLglM.js +41 -0
  101. package/dist/sparql-FarWu_Gb.js +197 -0
  102. package/dist/spreadsheet-C-cy4P5N.js +49 -0
  103. package/dist/sql-CfG5lQ3l.js +282 -0
  104. package/dist/stex-Du4h4KAU.js +129 -0
  105. package/dist/stylus-CAdqWld3.js +250 -0
  106. package/dist/swift-DSxqR9R6.js +230 -0
  107. package/dist/tcl-xfoLljhY.js +81 -0
  108. package/dist/textile-D1AWE-pc.js +295 -0
  109. package/dist/tiddlywiki-5wqsXtSk.js +155 -0
  110. package/dist/tiki-__Kn3CeS.js +181 -0
  111. package/dist/toml-DWAmxCjl.js +58 -0
  112. package/dist/troff-D2UO-fKf.js +35 -0
  113. package/dist/ttcn-Bsa4sfRm.js +123 -0
  114. package/dist/ttcn-cfg-Bac_acMi.js +88 -0
  115. package/dist/turtle-xwJUxoPV.js +80 -0
  116. package/dist/vb-c2kQGd6-.js +74 -0
  117. package/dist/vbscript-1f_Dhg5H.js +324 -0
  118. package/dist/velocity-DJd0pTTC.js +96 -0
  119. package/dist/verilog-CiS1jyi5.js +262 -0
  120. package/dist/vhdl-T9HkrbI2.js +106 -0
  121. package/dist/webidl-CjfDENEo.js +155 -0
  122. package/dist/xquery-Ct6lEb4B.js +422 -0
  123. package/dist/yacas-C0absKBh.js +73 -0
  124. package/dist/z80-Pki2zAjW.js +61 -0
  125. package/package.json +16 -7
@@ -0,0 +1,313 @@
1
+ function s(o) {
2
+ return new RegExp("^((" + o.join(")|(") + "))\\b");
3
+ }
4
+ var N = s(["and", "or", "not", "is"]), E = [
5
+ "as",
6
+ "assert",
7
+ "break",
8
+ "class",
9
+ "continue",
10
+ "def",
11
+ "del",
12
+ "elif",
13
+ "else",
14
+ "except",
15
+ "finally",
16
+ "for",
17
+ "from",
18
+ "global",
19
+ "if",
20
+ "import",
21
+ "lambda",
22
+ "pass",
23
+ "raise",
24
+ "return",
25
+ "try",
26
+ "while",
27
+ "with",
28
+ "yield",
29
+ "in",
30
+ "False",
31
+ "True"
32
+ ], F = [
33
+ "abs",
34
+ "all",
35
+ "any",
36
+ "bin",
37
+ "bool",
38
+ "bytearray",
39
+ "callable",
40
+ "chr",
41
+ "classmethod",
42
+ "compile",
43
+ "complex",
44
+ "delattr",
45
+ "dict",
46
+ "dir",
47
+ "divmod",
48
+ "enumerate",
49
+ "eval",
50
+ "filter",
51
+ "float",
52
+ "format",
53
+ "frozenset",
54
+ "getattr",
55
+ "globals",
56
+ "hasattr",
57
+ "hash",
58
+ "help",
59
+ "hex",
60
+ "id",
61
+ "input",
62
+ "int",
63
+ "isinstance",
64
+ "issubclass",
65
+ "iter",
66
+ "len",
67
+ "list",
68
+ "locals",
69
+ "map",
70
+ "max",
71
+ "memoryview",
72
+ "min",
73
+ "next",
74
+ "object",
75
+ "oct",
76
+ "open",
77
+ "ord",
78
+ "pow",
79
+ "property",
80
+ "range",
81
+ "repr",
82
+ "reversed",
83
+ "round",
84
+ "set",
85
+ "setattr",
86
+ "slice",
87
+ "sorted",
88
+ "staticmethod",
89
+ "str",
90
+ "sum",
91
+ "super",
92
+ "tuple",
93
+ "type",
94
+ "vars",
95
+ "zip",
96
+ "__import__",
97
+ "NotImplemented",
98
+ "Ellipsis",
99
+ "__debug__"
100
+ ];
101
+ function c(o) {
102
+ return o.scopes[o.scopes.length - 1];
103
+ }
104
+ function A(o) {
105
+ for (var p = "error", O = o.delimiters || o.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/, h = [
106
+ o.singleOperators,
107
+ o.doubleOperators,
108
+ o.doubleDelimiters,
109
+ o.tripleDelimiters,
110
+ o.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/
111
+ ], g = 0; g < h.length; g++) h[g] || h.splice(g--, 1);
112
+ var k = o.hangingIndent, d = E, a = F;
113
+ o.extra_keywords != null && (d = d.concat(o.extra_keywords)), o.extra_builtins != null && (a = a.concat(o.extra_builtins));
114
+ var x = !(o.version && Number(o.version) < 3);
115
+ if (x) {
116
+ var y = o.identifiers || /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
117
+ d = d.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]), a = a.concat(["ascii", "bytes", "exec", "print"]);
118
+ var w = new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`, "i");
119
+ } else {
120
+ var y = o.identifiers || /^[_A-Za-z][_A-Za-z0-9]*/;
121
+ d = d.concat(["exec", "print"]), a = a.concat([
122
+ "apply",
123
+ "basestring",
124
+ "buffer",
125
+ "cmp",
126
+ "coerce",
127
+ "execfile",
128
+ "file",
129
+ "intern",
130
+ "long",
131
+ "raw_input",
132
+ "reduce",
133
+ "reload",
134
+ "unichr",
135
+ "unicode",
136
+ "xrange",
137
+ "None"
138
+ ]);
139
+ var w = new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`, "i");
140
+ }
141
+ var I = s(d), L = s(a);
142
+ function z(n, e) {
143
+ var r = n.sol() && e.lastToken != "\\";
144
+ if (r && (e.indent = n.indentation()), r && c(e).type == "py") {
145
+ var i = c(e).offset;
146
+ if (n.eatSpace()) {
147
+ var l = n.indentation();
148
+ return l > i ? S(n, e) : l < i && _(n, e) && n.peek() != "#" && (e.errorToken = !0), null;
149
+ } else {
150
+ var t = v(n, e);
151
+ return i > 0 && _(n, e) && (t += " " + p), t;
152
+ }
153
+ }
154
+ return v(n, e);
155
+ }
156
+ function v(n, e, r) {
157
+ if (n.eatSpace()) return null;
158
+ if (!r && n.match(/^#.*/)) return "comment";
159
+ if (n.match(/^[0-9\.]/, !1)) {
160
+ var i = !1;
161
+ if (n.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i) && (i = !0), n.match(/^[\d_]+\.\d*/) && (i = !0), n.match(/^\.\d+/) && (i = !0), i)
162
+ return n.eat(/J/i), "number";
163
+ var l = !1;
164
+ 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)
165
+ return n.eat(/L/i), "number";
166
+ }
167
+ if (n.match(w)) {
168
+ var t = n.current().toLowerCase().indexOf("f") !== -1;
169
+ return t ? (e.tokenize = R(n.current(), e.tokenize), e.tokenize(n, e)) : (e.tokenize = B(n.current(), e.tokenize), e.tokenize(n, e));
170
+ }
171
+ for (var u = 0; u < h.length; u++)
172
+ if (n.match(h[u])) return "operator";
173
+ 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);
174
+ }
175
+ function R(n, e) {
176
+ for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
177
+ n = n.substr(1);
178
+ var r = n.length == 1, i = "string";
179
+ function l(u) {
180
+ return function(f, b) {
181
+ var T = v(f, b, !0);
182
+ return T == "punctuation" && (f.current() == "{" ? b.tokenize = l(u + 1) : f.current() == "}" && (u > 1 ? b.tokenize = l(u - 1) : b.tokenize = t)), T;
183
+ };
184
+ }
185
+ function t(u, f) {
186
+ for (; !u.eol(); )
187
+ if (u.eatWhile(/[^'"\{\}\\]/), u.eat("\\")) {
188
+ if (u.next(), r && u.eol())
189
+ return i;
190
+ } else {
191
+ if (u.match(n))
192
+ return f.tokenize = e, i;
193
+ if (u.match("{{"))
194
+ return i;
195
+ if (u.match("{", !1))
196
+ return f.tokenize = l(0), u.current() ? i : f.tokenize(u, f);
197
+ if (u.match("}}"))
198
+ return i;
199
+ if (u.match("}"))
200
+ return p;
201
+ u.eat(/['"]/);
202
+ }
203
+ if (r) {
204
+ if (o.singleLineStringErrors)
205
+ return p;
206
+ f.tokenize = e;
207
+ }
208
+ return i;
209
+ }
210
+ return t.isString = !0, t;
211
+ }
212
+ function B(n, e) {
213
+ for (; "rubf".indexOf(n.charAt(0).toLowerCase()) >= 0; )
214
+ n = n.substr(1);
215
+ var r = n.length == 1, i = "string";
216
+ function l(t, u) {
217
+ for (; !t.eol(); )
218
+ if (t.eatWhile(/[^'"\\]/), t.eat("\\")) {
219
+ if (t.next(), r && t.eol())
220
+ return i;
221
+ } else {
222
+ if (t.match(n))
223
+ return u.tokenize = e, i;
224
+ t.eat(/['"]/);
225
+ }
226
+ if (r) {
227
+ if (o.singleLineStringErrors)
228
+ return p;
229
+ u.tokenize = e;
230
+ }
231
+ return i;
232
+ }
233
+ return l.isString = !0, l;
234
+ }
235
+ function S(n, e) {
236
+ for (; c(e).type != "py"; ) e.scopes.pop();
237
+ e.scopes.push({
238
+ offset: c(e).offset + n.indentUnit,
239
+ type: "py",
240
+ align: null
241
+ });
242
+ }
243
+ function m(n, e, r) {
244
+ var i = n.match(/^[\s\[\{\(]*(?:#|$)/, !1) ? null : n.column() + 1;
245
+ e.scopes.push({
246
+ offset: e.indent + (k || n.indentUnit),
247
+ type: r,
248
+ align: i
249
+ });
250
+ }
251
+ function _(n, e) {
252
+ for (var r = n.indentation(); e.scopes.length > 1 && c(e).offset > r; ) {
253
+ if (c(e).type != "py") return !0;
254
+ e.scopes.pop();
255
+ }
256
+ return c(e).offset != r;
257
+ }
258
+ function D(n, e) {
259
+ n.sol() && (e.beginningOfLine = !0, e.dedent = !1);
260
+ var r = e.tokenize(n, e), i = n.current();
261
+ if (e.beginningOfLine && i == "@")
262
+ return n.match(y, !1) ? "meta" : x ? "operator" : p;
263
+ 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)) {
264
+ var l = "[({".indexOf(i);
265
+ if (l != -1 && m(n, e, "])}".slice(l, l + 1)), l = "])}".indexOf(i), l != -1)
266
+ if (c(e).type == i) e.indent = e.scopes.pop().offset - (k || n.indentUnit);
267
+ else return p;
268
+ }
269
+ return e.dedent && n.eol() && c(e).type == "py" && e.scopes.length > 1 && e.scopes.pop(), r;
270
+ }
271
+ return {
272
+ name: "python",
273
+ startState: function() {
274
+ return {
275
+ tokenize: z,
276
+ scopes: [{ offset: 0, type: "py", align: null }],
277
+ indent: 0,
278
+ lastToken: null,
279
+ lambda: !1,
280
+ dedent: 0
281
+ };
282
+ },
283
+ token: function(n, e) {
284
+ var r = e.errorToken;
285
+ r && (e.errorToken = !1);
286
+ var i = D(n, e);
287
+ 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;
288
+ },
289
+ indent: function(n, e, r) {
290
+ if (n.tokenize != z)
291
+ return n.tokenize.isString ? null : 0;
292
+ var i = c(n), l = i.type == e.charAt(0) || i.type == "py" && !n.dedent && /^(else:|elif |except |finally:)/.test(e);
293
+ return i.align != null ? i.align - (l ? 1 : 0) : i.offset - (l ? k || r.unit : 0);
294
+ },
295
+ languageData: {
296
+ autocomplete: E.concat(F).concat(["exec", "print"]),
297
+ indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
298
+ commentTokens: { line: "#" },
299
+ closeBrackets: { brackets: ["(", "[", "{", "'", '"', "'''", '"""'] }
300
+ }
301
+ };
302
+ }
303
+ var U = function(o) {
304
+ return o.split(" ");
305
+ };
306
+ A({});
307
+ const Z = 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
+ Z as cython,
312
+ A as mkPython
313
+ };
@@ -0,0 +1,86 @@
1
+ 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{}]/;
2
+ function x(n) {
3
+ return new RegExp("^(" + n.join("|") + ")$");
4
+ }
5
+ function r(n, e) {
6
+ var o = n.sol(), i = n.next();
7
+ if (c = null, o) {
8
+ if (i == "/")
9
+ return (e.tokenize = s)(n, e);
10
+ if (i == "\\")
11
+ return n.eol() || /\s/.test(n.peek()) ? (n.skipToEnd(), /^\\\s*$/.test(n.current()) ? (e.tokenize = v)(n) : e.tokenize = r, "comment") : (e.tokenize = r, "builtin");
12
+ }
13
+ if (/\s/.test(i))
14
+ return n.peek() == "/" ? (n.skipToEnd(), "comment") : "null";
15
+ if (i == '"')
16
+ return (e.tokenize = m)(n, e);
17
+ if (i == "`")
18
+ return n.eatWhile(/[A-Za-z\d_:\/.]/), "macroName";
19
+ if (i == "." && /\d/.test(n.peek()) || /\d/.test(i)) {
20
+ var t = null;
21
+ 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");
22
+ }
23
+ return /[A-Za-z]|\./.test(i) ? (n.eatWhile(/[A-Za-z._\d]/), p.test(n.current()) ? "keyword" : "variable") : /[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(i) || /[{}\(\[\]\)]/.test(i) ? null : "error";
24
+ }
25
+ function s(n, e) {
26
+ return n.skipToEnd(), /^\/\s*$/.test(n.current()) ? (e.tokenize = k)(n, e) : e.tokenize = r, "comment";
27
+ }
28
+ function k(n, e) {
29
+ var o = n.sol() && n.peek() == "\\";
30
+ return n.skipToEnd(), o && /^\\\s*$/.test(n.current()) && (e.tokenize = r), "comment";
31
+ }
32
+ function v(n) {
33
+ return n.skipToEnd(), "comment";
34
+ }
35
+ function m(n, e) {
36
+ for (var o = !1, i, t = !1; i = n.next(); ) {
37
+ if (i == '"' && !o) {
38
+ t = !0;
39
+ break;
40
+ }
41
+ o = !o && i == "\\";
42
+ }
43
+ return t && (e.tokenize = r), "string";
44
+ }
45
+ function l(n, e, o) {
46
+ n.context = { prev: n.context, indent: n.indent, col: o, type: e };
47
+ }
48
+ function u(n) {
49
+ n.indent = n.context.indent, n.context = n.context.prev;
50
+ }
51
+ const a = {
52
+ name: "q",
53
+ startState: function() {
54
+ return {
55
+ tokenize: r,
56
+ context: null,
57
+ indent: 0,
58
+ col: 0
59
+ };
60
+ },
61
+ token: function(n, e) {
62
+ n.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = n.indentation());
63
+ var o = e.tokenize(n, e);
64
+ if (o != "comment" && e.context && e.context.align == null && e.context.type != "pattern" && (e.context.align = !0), c == "(") l(e, ")", n.column());
65
+ else if (c == "[") l(e, "]", n.column());
66
+ else if (c == "{") l(e, "}", n.column());
67
+ else if (/[\]\}\)]/.test(c)) {
68
+ for (; e.context && e.context.type == "pattern"; ) u(e);
69
+ e.context && c == e.context.type && u(e);
70
+ } 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()));
71
+ return o;
72
+ },
73
+ indent: function(n, e, o) {
74
+ var i = e && e.charAt(0), t = n.context;
75
+ if (/[\]\}]/.test(i))
76
+ for (; t && t.type == "pattern"; ) t = t.prev;
77
+ var d = t && i == t.type;
78
+ return t ? t.type == "pattern" ? t.col : t.align ? t.col + (d ? 0 : 1) : t.indent + (d ? 0 : o.unit) : 0;
79
+ },
80
+ languageData: {
81
+ commentTokens: { line: "/" }
82
+ }
83
+ };
84
+ export {
85
+ a as q
86
+ };
@@ -0,0 +1,104 @@
1
+ function f(e) {
2
+ for (var n = {}, r = 0; r < e.length; ++r) n[e[r]] = !0;
3
+ return n;
4
+ }
5
+ 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;
6
+ function p(e, n) {
7
+ t = null;
8
+ var r = e.next();
9
+ if (r == "#")
10
+ return e.skipToEnd(), "comment";
11
+ if (r == "0" && e.eat("x"))
12
+ return e.eatWhile(/[\da-f]/i), "number";
13
+ if (r == "." && e.eat(/\d/))
14
+ return e.match(/\d*(?:e[+\-]?\d+)?/), "number";
15
+ if (/\d/.test(r))
16
+ return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/), "number";
17
+ if (r == "'" || r == '"')
18
+ return n.tokenize = E(r), "string";
19
+ if (r == "`")
20
+ return e.match(/[^`]+`/), "string.special";
21
+ if (r == "." && e.match(/.(?:[.]|\d+)/))
22
+ return "keyword";
23
+ if (/[a-zA-Z\.]/.test(r)) {
24
+ e.eatWhile(/[\w\.]/);
25
+ var i = e.current();
26
+ 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";
27
+ } 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;
28
+ }
29
+ function E(e) {
30
+ return function(n, r) {
31
+ if (n.eat("\\")) {
32
+ var i = n.next();
33
+ 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";
34
+ } else {
35
+ for (var l; (l = n.next()) != null; ) {
36
+ if (l == e) {
37
+ r.tokenize = p;
38
+ break;
39
+ }
40
+ if (l == "\\") {
41
+ n.backUp(1);
42
+ break;
43
+ }
44
+ }
45
+ return "string";
46
+ }
47
+ };
48
+ }
49
+ var v = 1, u = 2, c = 4;
50
+ function o(e, n, r) {
51
+ e.ctx = {
52
+ type: n,
53
+ indent: e.indent,
54
+ flags: 0,
55
+ column: r.column(),
56
+ prev: e.ctx
57
+ };
58
+ }
59
+ function x(e, n) {
60
+ var r = e.ctx;
61
+ e.ctx = {
62
+ type: r.type,
63
+ indent: r.indent,
64
+ flags: r.flags | n,
65
+ column: r.column,
66
+ prev: r.prev
67
+ };
68
+ }
69
+ function a(e) {
70
+ e.indent = e.ctx.indent, e.ctx = e.ctx.prev;
71
+ }
72
+ const I = {
73
+ name: "r",
74
+ startState: function(e) {
75
+ return {
76
+ tokenize: p,
77
+ ctx: {
78
+ type: "top",
79
+ indent: -e,
80
+ flags: u
81
+ },
82
+ indent: 0,
83
+ afterIdent: !1
84
+ };
85
+ },
86
+ token: function(e, n) {
87
+ 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;
88
+ var r = n.tokenize(e, n);
89
+ 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;
90
+ },
91
+ indent: function(e, n, r) {
92
+ if (e.tokenize != p) return 0;
93
+ var i = n && n.charAt(0), l = e.ctx, d = i == l.type;
94
+ 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);
95
+ },
96
+ languageData: {
97
+ wordChars: ".",
98
+ commentTokens: { line: "#" },
99
+ autocomplete: b.concat(g, s)
100
+ }
101
+ };
102
+ export {
103
+ I as r
104
+ };
@@ -0,0 +1,57 @@
1
+ var o = /^-+$/, a = /^(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} - /, c = /^[\w+.-]+@[\w.-]+/;
2
+ const h = {
3
+ name: "rpmchanges",
4
+ token: function(r) {
5
+ return r.sol() && (r.match(o) || r.match(a)) ? "tag" : r.match(c) ? "string" : (r.next(), null);
6
+ }
7
+ };
8
+ var i = /^(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 = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;
9
+ const d = {
10
+ name: "rpmspec",
11
+ startState: function() {
12
+ return {
13
+ controlFlow: !1,
14
+ macroParameters: !1,
15
+ section: !1
16
+ };
17
+ },
18
+ token: function(r, e) {
19
+ var n = r.peek();
20
+ if (n == "#")
21
+ return r.skipToEnd(), "comment";
22
+ if (r.sol()) {
23
+ if (r.match(t))
24
+ return "header";
25
+ if (r.match(l))
26
+ return "atom";
27
+ }
28
+ if (r.match(/^\$\w+/) || r.match(/^\$\{\w+\}/))
29
+ return "def";
30
+ if (r.match(f))
31
+ return "keyword";
32
+ if (r.match(p))
33
+ return e.controlFlow = !0, "keyword";
34
+ if (e.controlFlow) {
35
+ if (r.match(u))
36
+ return "operator";
37
+ if (r.match(/^(\d+)/))
38
+ return "number";
39
+ r.eol() && (e.controlFlow = !1);
40
+ }
41
+ if (r.match(i))
42
+ return r.eol() && (e.controlFlow = !1), "number";
43
+ if (r.match(/^%[\w]+/))
44
+ return r.match("(") && (e.macroParameters = !0), "keyword";
45
+ if (e.macroParameters) {
46
+ if (r.match(/^\d+/))
47
+ return "number";
48
+ if (r.match(")"))
49
+ return e.macroParameters = !1, "keyword";
50
+ }
51
+ return r.match(/^%\{\??[\w \-\:\!]+\}/) ? (r.eol() && (e.controlFlow = !1), "def") : (r.next(), null);
52
+ }
53
+ };
54
+ export {
55
+ h as rpmChanges,
56
+ d as rpmSpec
57
+ };