@aiao/code-editor-react 0.0.9 → 0.0.10

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 (121) hide show
  1. package/dist/index.js +118 -2
  2. package/package.json +4 -4
  3. package/dist/apl-B2DGVGxc-Dd6D39pP.js +0 -76
  4. package/dist/asciiarmor-2LVJmxlE-CAn4gnoC.js +0 -34
  5. package/dist/asn1-jKiBa2Ya-xsKwdyq9.js +0 -95
  6. package/dist/asterisk-DS281yxp-B5eTWk_B.js +0 -271
  7. package/dist/brainfuck-C_p9pTT8-DKVQ9poL.js +0 -34
  8. package/dist/clike-BMALKCNj-Ck7Gc35_.js +0 -620
  9. package/dist/clojure-CCKyeQKf-N9sg777Z.js +0 -800
  10. package/dist/cmake-CuaCgAKt-BbEgXraO.js +0 -28
  11. package/dist/cobol-BlTKFDRj-CHCoWafp.js +0 -72
  12. package/dist/coffeescript-BVCvwO8I-Z15ai5ac.js +0 -179
  13. package/dist/commonlisp-D_kxz07b-Ce7sn14o.js +0 -75
  14. package/dist/crystal-D309uH6_-DS6LrXoE.js +0 -217
  15. package/dist/css-BkF-NPzE-DiJu9Nkd.js +0 -1553
  16. package/dist/cypher-BMq4Fwjl-Ml-omWgp.js +0 -68
  17. package/dist/d-BZcgY6La-KCW6-bIm.js +0 -127
  18. package/dist/diff-Cg9d_RX2-C01qBVFc.js +0 -18
  19. package/dist/dockerfile-DFX8bq9N-BIbYUQV0.js +0 -194
  20. package/dist/dtd-CtLokQ-U-DCbNdeIA.js +0 -84
  21. package/dist/dylan-QYeExnWK-DIUVpsct.js +0 -234
  22. package/dist/ebnf-DUPDuY4r-7HIXKmWn.js +0 -78
  23. package/dist/ecl-CiXN-g_D-DOI-W0if.js +0 -121
  24. package/dist/eiffel-yQhjl4T1-DIX8Ceq1.js +0 -110
  25. package/dist/elm-CNT9vbN0-BcYlydpO.js +0 -108
  26. package/dist/erlang-CFOYdy9e-DULXsFZl.js +0 -487
  27. package/dist/factor-Clf6BoVk-DBb2EHMF.js +0 -65
  28. package/dist/fcl-CPC2WYrI-CuXG3fcK.js +0 -103
  29. package/dist/forth-BmxRyE9S-BcFwWpeL.js +0 -60
  30. package/dist/fortran-9bvPyrOW-CuLcq-Iu.js +0 -442
  31. package/dist/gas-cpmYfFX2-sZgGhMxB.js +0 -183
  32. package/dist/gherkin-CJuwpceU-BRrr8yjO.js +0 -34
  33. package/dist/groovy-DZeT_VM--CmF8wcSo.js +0 -146
  34. package/dist/haskell-CxiO_7JL-BuULsXvv.js +0 -375
  35. package/dist/haxe-70NVW1pR-CM27SfgM.js +0 -359
  36. package/dist/http-D9LttvKF-j9E8oQ7o.js +0 -44
  37. package/dist/idl-B6TRFYjl-B6TRFYjl.js +0 -947
  38. package/dist/index-4oLq9F9B-CiG9J_wS.js +0 -944
  39. package/dist/index-9NH8hlZ--ZzqmPLCF.js +0 -342
  40. package/dist/index-BFXNCCbG-LloeVRnr.js +0 -253
  41. package/dist/index-BLHYcXXK-BxaAXMNw.js +0 -101
  42. package/dist/index-BQU3Rb2C-DeyQP3x_.js +0 -290
  43. package/dist/index-Bg18ePld-Di0FNEJ4.js +0 -157
  44. package/dist/index-Bp5lqnbN-BM2h2Xfi.js +0 -555
  45. package/dist/index-Bqzq8A1N-Dn1yj5KO.js +0 -59
  46. package/dist/index-Bx-s4g99-QIFA9lMK.js +0 -76
  47. package/dist/index-BxX25QmV-Cnf0cb51.js +0 -248
  48. package/dist/index-CFCzgc33-MPwtm3eY.js +0 -1917
  49. package/dist/index-CL7JTU9M-Bl8j0-fU.js +0 -136
  50. package/dist/index-CgClvcTI.js +0 -35617
  51. package/dist/index-CipmEceX-D1vXXSTd.js +0 -74
  52. package/dist/index-Cv4vvpa2-B8Ojlo_m.js +0 -1305
  53. package/dist/index-D4hhdPbZ-DXEZQFco.js +0 -6152
  54. package/dist/index-DhNQ8g9I-CjBYiskZ.js +0 -270
  55. package/dist/index-Djp53tAP-DnPgUG4S.js +0 -94
  56. package/dist/index-KlsAFhIj-Dzil0Vr8.js +0 -566
  57. package/dist/index-OntZqtu6-DPgaaGGJ.js +0 -305
  58. package/dist/index-PGnZjMCR-BPDty4q0.js +0 -301
  59. package/dist/index-TyYoYgss-BIjAZ6j1.js +0 -613
  60. package/dist/index-oMSPmlXA-CoPtKzNe.js +0 -960
  61. package/dist/index-rQC6Gbk0-BZ6M0IzM.js +0 -138
  62. package/dist/javascript-DOuB9oqA-BxiygWgm.js +0 -691
  63. package/dist/julia-DpvXAuO6-Bk_IfD8X.js +0 -241
  64. package/dist/livescript-CanGTf8u-Cx6PrvS4.js +0 -272
  65. package/dist/lua-XplVlWi_-8f8obHzY.js +0 -217
  66. package/dist/mathematica-jaRHnSxC-B83gQsL2.js +0 -35
  67. package/dist/mbox-BctzC1hL-Hg5U2B4l.js +0 -76
  68. package/dist/mirc-CFBPAOaF-CfzSSk9W.js +0 -72
  69. package/dist/mllike-BSnXJBGA-Ao1NpT2u.js +0 -272
  70. package/dist/modelica-vUgVs--1-BObVpYBg.js +0 -93
  71. package/dist/mscgen-Cpl0NYLN-DqNArLGH.js +0 -104
  72. package/dist/mumps-CQoS1kWX-CkTUOQnt.js +0 -25
  73. package/dist/nginx-zDPm3Z74-DJk4KP7N.js +0 -87
  74. package/dist/nsis-BCLyjY7m-C2MffOQ3.js +0 -62
  75. package/dist/ntriples-CsNjv2QF-C4aZn3EO.js +0 -79
  76. package/dist/octave-C8PmmSRH-DM5vTWlU.js +0 -143
  77. package/dist/oz-Ce8aN8oE-BcJM4SVy.js +0 -151
  78. package/dist/pascal-De0D6mP7-D7DGFFKL.js +0 -77
  79. package/dist/perl-B4bSCe1C-6aIa2glS.js +0 -915
  80. package/dist/pig-D24Z8EXi-BD-qt5FU.js +0 -54
  81. package/dist/powershell-DkYVfTzP-Blt1Rodi.js +0 -249
  82. package/dist/properties-Dn9wna3M-EOOwnCnk.js +0 -26
  83. package/dist/protobuf-BPIjwpzm-DAButU8_.js +0 -49
  84. package/dist/pug-TGXr6c5j-C9HfQ86E.js +0 -248
  85. package/dist/puppet-nyd4dhjf-CGzH5dsa.js +0 -45
  86. package/dist/python-BkR3uSy8-CjDnyp3B.js +0 -313
  87. package/dist/q-DyHZGnqm-DGuqeH_T.js +0 -86
  88. package/dist/r-LKEuhEGI-BFQhJnTP.js +0 -104
  89. package/dist/rpm-IznJm2Xc-CbZqrWCM.js +0 -57
  90. package/dist/ruby-CcYfvIk6-DzPSfSGo.js +0 -228
  91. package/dist/sas-7E8yHoCW-D726Uzkw.js +0 -105
  92. package/dist/scheme-DjibxsNh-Bp5gVFkm.js +0 -124
  93. package/dist/shell-C0C2sNA_-BTeYg6ir.js +0 -182
  94. package/dist/sieve-Bwz7vjP5-Cw8iTBf7.js +0 -72
  95. package/dist/simple-mode-mNVtnu0l-BC8mf7KF.js +0 -89
  96. package/dist/smalltalk-Bhddl2pB-B7URiJSp.js +0 -48
  97. package/dist/solr-BNlsLglM-BM2OpfTI.js +0 -41
  98. package/dist/sparql-FarWu_Gb-FN_uQNd4.js +0 -197
  99. package/dist/spreadsheet-C-cy4P5N-5CSTwVYq.js +0 -49
  100. package/dist/sql-CfG5lQ3l-Bd4dgm_8.js +0 -278
  101. package/dist/stex-Du4h4KAU-QOov_zHj.js +0 -129
  102. package/dist/stylus-CAdqWld3-BcRBbBxD.js +0 -250
  103. package/dist/swift-DSxqR9R6-2Hz4NOoF.js +0 -230
  104. package/dist/tcl-xfoLljhY-DAZBRGQI.js +0 -81
  105. package/dist/textile-D1AWE-pc-DuiIfEnb.js +0 -295
  106. package/dist/tiddlywiki-5wqsXtSk-WuF_8VUv.js +0 -155
  107. package/dist/tiki-__Kn3CeS-CWcR9ib_.js +0 -181
  108. package/dist/toml-DWAmxCjl-CyJoDzs6.js +0 -56
  109. package/dist/troff-D2UO-fKf-DVoIzS-O.js +0 -35
  110. package/dist/ttcn-Bsa4sfRm-hoy08sYQ.js +0 -123
  111. package/dist/ttcn-cfg-Bac_acMi-DaC4kQpd.js +0 -88
  112. package/dist/turtle-xwJUxoPV-fs94wdNM.js +0 -80
  113. package/dist/vb-c2kQGd6--DU726qF0.js +0 -74
  114. package/dist/vbscript-1f_Dhg5H-DriA32xD.js +0 -324
  115. package/dist/velocity-DJd0pTTC-BG368IR6.js +0 -96
  116. package/dist/verilog-CiS1jyi5-giQA8J-e.js +0 -259
  117. package/dist/vhdl-T9HkrbI2-BJ8LEDog.js +0 -106
  118. package/dist/webidl-CjfDENEo-BM8KXKJ5.js +0 -155
  119. package/dist/xquery-Ct6lEb4B-C5KDc61l.js +0 -422
  120. package/dist/yacas-C0absKBh-B82QJ76F.js +0 -73
  121. package/dist/z80-Pki2zAjW-B0IQoIbR.js +0 -61
@@ -1,313 +0,0 @@
1
- function k(i) {
2
- return new RegExp("^((" + i.join(")|(") + "))\\b");
3
- }
4
- var R = k(["and", "or", "not", "is"]), T = [
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
- ], L = [
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 l(i) {
102
- return i.scopes[i.scopes.length - 1];
103
- }
104
- function E(i) {
105
- for (var u = "error", O = i.delimiters || i.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/, d = [
106
- i.singleOperators,
107
- i.doubleOperators,
108
- i.doubleDelimiters,
109
- i.tripleDelimiters,
110
- i.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/
111
- ], m = 0; m < d.length; m++) d[m] || d.splice(m--, 1);
112
- var g = i.hangingIndent, f = T, p = L;
113
- i.extra_keywords != null && (f = f.concat(i.extra_keywords)), i.extra_builtins != null && (p = p.concat(i.extra_builtins));
114
- var v = !(i.version && Number(i.version) < 3);
115
- if (v) {
116
- var h = i.identifiers || /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;
117
- f = f.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]), p = p.concat(["ascii", "bytes", "exec", "print"]);
118
- var x = new RegExp(`^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|"{3}|['"]))`, "i");
119
- } else {
120
- var h = i.identifiers || /^[_A-Za-z][_A-Za-z0-9]*/;
121
- f = f.concat(["exec", "print"]), p = p.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 x = new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`, "i");
140
- }
141
- var S = k(f), A = k(p);
142
- function z(e, t) {
143
- var n = e.sol() && t.lastToken != "\\";
144
- if (n && (t.indent = e.indentation()), n && l(t).type == "py") {
145
- var r = l(t).offset;
146
- if (e.eatSpace()) {
147
- var a = e.indentation();
148
- return a > r ? _(e, t) : a < r && w(e, t) && e.peek() != "#" && (t.errorToken = !0), null;
149
- } else {
150
- var s = y(e, t);
151
- return r > 0 && w(e, t) && (s += " " + u), s;
152
- }
153
- }
154
- return y(e, t);
155
- }
156
- function y(e, t, n) {
157
- if (e.eatSpace()) return null;
158
- if (!n && e.match(/^#.*/)) return "comment";
159
- if (e.match(/^[0-9\.]/, !1)) {
160
- var r = !1;
161
- if (e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i) && (r = !0), e.match(/^[\d_]+\.\d*/) && (r = !0), e.match(/^\.\d+/) && (r = !0), r)
162
- return e.eat(/J/i), "number";
163
- var a = !1;
164
- if (e.match(/^0x[0-9a-f_]+/i) && (a = !0), e.match(/^0b[01_]+/i) && (a = !0), e.match(/^0o[0-7_]+/i) && (a = !0), e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/) && (e.eat(/J/i), a = !0), e.match(/^0(?![\dx])/i) && (a = !0), a)
165
- return e.eat(/L/i), "number";
166
- }
167
- if (e.match(x)) {
168
- var s = e.current().toLowerCase().indexOf("f") !== -1;
169
- return s ? (t.tokenize = D(e.current(), t.tokenize), t.tokenize(e, t)) : (t.tokenize = I(e.current(), t.tokenize), t.tokenize(e, t));
170
- }
171
- for (var o = 0; o < d.length; o++)
172
- if (e.match(d[o])) return "operator";
173
- return e.match(O) ? "punctuation" : t.lastToken == "." && e.match(h) ? "property" : e.match(S) || e.match(R) ? "keyword" : e.match(A) ? "builtin" : e.match(/^(self|cls)\b/) ? "self" : e.match(h) ? t.lastToken == "def" || t.lastToken == "class" ? "def" : "variable" : (e.next(), n ? null : u);
174
- }
175
- function D(e, t) {
176
- for (; "rubf".indexOf(e.charAt(0).toLowerCase()) >= 0; )
177
- e = e.substr(1);
178
- var n = e.length == 1, r = "string";
179
- function a(o) {
180
- return function(c, b) {
181
- var F = y(c, b, !0);
182
- return F == "punctuation" && (c.current() == "{" ? b.tokenize = a(o + 1) : c.current() == "}" && (o > 1 ? b.tokenize = a(o - 1) : b.tokenize = s)), F;
183
- };
184
- }
185
- function s(o, c) {
186
- for (; !o.eol(); )
187
- if (o.eatWhile(/[^'"\{\}\\]/), o.eat("\\")) {
188
- if (o.next(), n && o.eol())
189
- return r;
190
- } else {
191
- if (o.match(e))
192
- return c.tokenize = t, r;
193
- if (o.match("{{"))
194
- return r;
195
- if (o.match("{", !1))
196
- return c.tokenize = a(0), o.current() ? r : c.tokenize(o, c);
197
- if (o.match("}}"))
198
- return r;
199
- if (o.match("}"))
200
- return u;
201
- o.eat(/['"]/);
202
- }
203
- if (n) {
204
- if (i.singleLineStringErrors)
205
- return u;
206
- c.tokenize = t;
207
- }
208
- return r;
209
- }
210
- return s.isString = !0, s;
211
- }
212
- function I(e, t) {
213
- for (; "rubf".indexOf(e.charAt(0).toLowerCase()) >= 0; )
214
- e = e.substr(1);
215
- var n = e.length == 1, r = "string";
216
- function a(s, o) {
217
- for (; !s.eol(); )
218
- if (s.eatWhile(/[^'"\\]/), s.eat("\\")) {
219
- if (s.next(), n && s.eol())
220
- return r;
221
- } else {
222
- if (s.match(e))
223
- return o.tokenize = t, r;
224
- s.eat(/['"]/);
225
- }
226
- if (n) {
227
- if (i.singleLineStringErrors)
228
- return u;
229
- o.tokenize = t;
230
- }
231
- return r;
232
- }
233
- return a.isString = !0, a;
234
- }
235
- function _(e, t) {
236
- for (; l(t).type != "py"; ) t.scopes.pop();
237
- t.scopes.push({
238
- offset: l(t).offset + e.indentUnit,
239
- type: "py",
240
- align: null
241
- });
242
- }
243
- function N(e, t, n) {
244
- var r = e.match(/^[\s\[\{\(]*(?:#|$)/, !1) ? null : e.column() + 1;
245
- t.scopes.push({
246
- offset: t.indent + (g || e.indentUnit),
247
- type: n,
248
- align: r
249
- });
250
- }
251
- function w(e, t) {
252
- for (var n = e.indentation(); t.scopes.length > 1 && l(t).offset > n; ) {
253
- if (l(t).type != "py") return !0;
254
- t.scopes.pop();
255
- }
256
- return l(t).offset != n;
257
- }
258
- function Z(e, t) {
259
- e.sol() && (t.beginningOfLine = !0, t.dedent = !1);
260
- var n = t.tokenize(e, t), r = e.current();
261
- if (t.beginningOfLine && r == "@")
262
- return e.match(h, !1) ? "meta" : v ? "operator" : u;
263
- if (/\S/.test(r) && (t.beginningOfLine = !1), (n == "variable" || n == "builtin") && t.lastToken == "meta" && (n = "meta"), (r == "pass" || r == "return") && (t.dedent = !0), r == "lambda" && (t.lambda = !0), r == ":" && !t.lambda && l(t).type == "py" && e.match(/^\s*(?:#|$)/, !1) && _(e, t), r.length == 1 && !/string|comment/.test(n)) {
264
- var a = "[({".indexOf(r);
265
- if (a != -1 && N(e, t, "])}".slice(a, a + 1)), a = "])}".indexOf(r), a != -1)
266
- if (l(t).type == r) t.indent = t.scopes.pop().offset - (g || e.indentUnit);
267
- else return u;
268
- }
269
- return t.dedent && e.eol() && l(t).type == "py" && t.scopes.length > 1 && t.scopes.pop(), n;
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(e, t) {
284
- var n = t.errorToken;
285
- n && (t.errorToken = !1);
286
- var r = Z(e, t);
287
- return r && r != "comment" && (t.lastToken = r == "keyword" || r == "punctuation" ? e.current() : r), r == "punctuation" && (r = null), e.eol() && t.lambda && (t.lambda = !1), n ? u : r;
288
- },
289
- indent: function(e, t, n) {
290
- if (e.tokenize != z)
291
- return e.tokenize.isString ? null : 0;
292
- var r = l(e), a = r.type == t.charAt(0) || r.type == "py" && !e.dedent && /^(else:|elif |except |finally:)/.test(t);
293
- return r.align != null ? r.align - (a ? 1 : 0) : r.offset - (a ? g || n.unit : 0);
294
- },
295
- languageData: {
296
- autocomplete: T.concat(L).concat(["exec", "print"]),
297
- indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/,
298
- commentTokens: { line: "#" },
299
- closeBrackets: { brackets: ["(", "[", "{", "'", '"', "'''", '"""'] }
300
- }
301
- };
302
- }
303
- var U = function(i) {
304
- return i.split(" ");
305
- };
306
- E({});
307
- const C = E({
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
- C as cython,
312
- E as mkPython
313
- };
@@ -1,86 +0,0 @@
1
- var i, u = d(["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"]), m = /[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;
2
- function d(t) {
3
- return new RegExp("^(" + t.join("|") + ")$");
4
- }
5
- function a(t, e) {
6
- var o = t.sol(), r = t.next();
7
- if (i = null, o) {
8
- if (r == "/")
9
- return (e.tokenize = p)(t, e);
10
- if (r == "\\")
11
- return t.eol() || /\s/.test(t.peek()) ? (t.skipToEnd(), /^\\\s*$/.test(t.current()) ? (e.tokenize = f)(t) : e.tokenize = a, "comment") : (e.tokenize = a, "builtin");
12
- }
13
- if (/\s/.test(r))
14
- return t.peek() == "/" ? (t.skipToEnd(), "comment") : "null";
15
- if (r == '"')
16
- return (e.tokenize = v)(t, e);
17
- if (r == "`")
18
- return t.eatWhile(/[A-Za-z\d_:\/.]/), "macroName";
19
- if (r == "." && /\d/.test(t.peek()) || /\d/.test(r)) {
20
- var n = null;
21
- return t.backUp(1), t.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) || t.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) || t.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) || t.match(/^\d+[ptuv]{1}/) ? n = "temporal" : (t.match(/^0[NwW]{1}/) || t.match(/^0x[\da-fA-F]*/) || t.match(/^[01]+[b]{1}/) || t.match(/^\d+[chijn]{1}/) || t.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) && (n = "number"), n && (!(r = t.peek()) || m.test(r)) ? n : (t.next(), "error");
22
- }
23
- return /[A-Za-z]|\./.test(r) ? (t.eatWhile(/[A-Za-z._\d]/), u.test(t.current()) ? "keyword" : "variable") : /[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(r) || /[{}\(\[\]\)]/.test(r) ? null : "error";
24
- }
25
- function p(t, e) {
26
- return t.skipToEnd(), /^\/\s*$/.test(t.current()) ? (e.tokenize = x)(t, e) : e.tokenize = a, "comment";
27
- }
28
- function x(t, e) {
29
- var o = t.sol() && t.peek() == "\\";
30
- return t.skipToEnd(), o && /^\\\s*$/.test(t.current()) && (e.tokenize = a), "comment";
31
- }
32
- function f(t) {
33
- return t.skipToEnd(), "comment";
34
- }
35
- function v(t, e) {
36
- for (var o = !1, r, n = !1; r = t.next(); ) {
37
- if (r == '"' && !o) {
38
- n = !0;
39
- break;
40
- }
41
- o = !o && r == "\\";
42
- }
43
- return n && (e.tokenize = a), "string";
44
- }
45
- function s(t, e, o) {
46
- t.context = { prev: t.context, indent: t.indent, col: o, type: e };
47
- }
48
- function c(t) {
49
- t.indent = t.context.indent, t.context = t.context.prev;
50
- }
51
- const k = {
52
- name: "q",
53
- startState: function() {
54
- return {
55
- tokenize: a,
56
- context: null,
57
- indent: 0,
58
- col: 0
59
- };
60
- },
61
- token: function(t, e) {
62
- t.sol() && (e.context && e.context.align == null && (e.context.align = !1), e.indent = t.indentation());
63
- var o = e.tokenize(t, e);
64
- if (o != "comment" && e.context && e.context.align == null && e.context.type != "pattern" && (e.context.align = !0), i == "(") s(e, ")", t.column());
65
- else if (i == "[") s(e, "]", t.column());
66
- else if (i == "{") s(e, "}", t.column());
67
- else if (/[\]\}\)]/.test(i)) {
68
- for (; e.context && e.context.type == "pattern"; ) c(e);
69
- e.context && i == e.context.type && c(e);
70
- } else i == "." && e.context && e.context.type == "pattern" ? c(e) : /atom|string|variable/.test(o) && e.context && (/[\}\]]/.test(e.context.type) ? s(e, "pattern", t.column()) : e.context.type == "pattern" && !e.context.align && (e.context.align = !0, e.context.col = t.column()));
71
- return o;
72
- },
73
- indent: function(t, e, o) {
74
- var r = e && e.charAt(0), n = t.context;
75
- if (/[\]\}]/.test(r))
76
- for (; n && n.type == "pattern"; ) n = n.prev;
77
- var l = n && r == n.type;
78
- return n ? n.type == "pattern" ? n.col : n.align ? n.col + (l ? 0 : 1) : n.indent + (l ? 0 : o.unit) : 0;
79
- },
80
- languageData: {
81
- commentTokens: { line: "/" }
82
- }
83
- };
84
- export {
85
- k as q
86
- };
@@ -1,104 +0,0 @@
1
- function o(t) {
2
- for (var e = {}, r = 0; r < t.length; ++r) e[t[r]] = !0;
3
- return e;
4
- }
5
- var k = ["NULL", "NA", "Inf", "NaN", "NA_integer_", "NA_real_", "NA_complex_", "NA_character_", "TRUE", "FALSE"], b = ["list", "quote", "bquote", "eval", "return", "call", "parse", "deparse"], g = ["if", "else", "repeat", "while", "function", "for", "in", "next", "break"], h = ["if", "else", "repeat", "while", "function", "for"], v = o(k), y = o(b), N = o(g), A = o(h), m = /[+\-*\/^<>=!&|~$:]/, c;
6
- function s(t, e) {
7
- c = null;
8
- var r = t.next();
9
- if (r == "#")
10
- return t.skipToEnd(), "comment";
11
- if (r == "0" && t.eat("x"))
12
- return t.eatWhile(/[\da-f]/i), "number";
13
- if (r == "." && t.eat(/\d/))
14
- return t.match(/\d*(?:e[+\-]?\d+)?/), "number";
15
- if (/\d/.test(r))
16
- return t.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/), "number";
17
- if (r == "'" || r == '"')
18
- return e.tokenize = I(r), "string";
19
- if (r == "`")
20
- return t.match(/[^`]+`/), "string.special";
21
- if (r == "." && t.match(/.(?:[.]|\d+)/))
22
- return "keyword";
23
- if (/[a-zA-Z\.]/.test(r)) {
24
- t.eatWhile(/[\w\.]/);
25
- var a = t.current();
26
- return v.propertyIsEnumerable(a) ? "atom" : N.propertyIsEnumerable(a) ? (A.propertyIsEnumerable(a) && !t.match(/\s*if(\s+|$)/, !1) && (c = "block"), "keyword") : y.propertyIsEnumerable(a) ? "builtin" : "variable";
27
- } else return r == "%" ? (t.skipTo("%") && t.next(), "variableName.special") : r == "<" && t.eat("-") || r == "<" && t.match("<-") || r == "-" && t.match(/>>?/) || r == "=" && e.ctx.argList ? "operator" : m.test(r) ? (r == "$" || t.eatWhile(m), "operator") : /[\(\){}\[\];]/.test(r) ? (c = r, r == ";" ? "punctuation" : null) : null;
28
- }
29
- function I(t) {
30
- return function(e, r) {
31
- if (e.eat("\\")) {
32
- var a = e.next();
33
- return a == "x" ? e.match(/^[a-f0-9]{2}/i) : (a == "u" || a == "U") && e.eat("{") && e.skipTo("}") ? e.next() : a == "u" ? e.match(/^[a-f0-9]{4}/i) : a == "U" ? e.match(/^[a-f0-9]{8}/i) : /[0-7]/.test(a) && e.match(/^[0-7]{1,2}/), "string.special";
34
- } else {
35
- for (var n; (n = e.next()) != null; ) {
36
- if (n == t) {
37
- r.tokenize = s;
38
- break;
39
- }
40
- if (n == "\\") {
41
- e.backUp(1);
42
- break;
43
- }
44
- }
45
- return "string";
46
- }
47
- };
48
- }
49
- var d = 1, l = 2, u = 4;
50
- function i(t, e, r) {
51
- t.ctx = {
52
- type: e,
53
- indent: t.indent,
54
- flags: 0,
55
- column: r.column(),
56
- prev: t.ctx
57
- };
58
- }
59
- function x(t, e) {
60
- var r = t.ctx;
61
- t.ctx = {
62
- type: r.type,
63
- indent: r.indent,
64
- flags: r.flags | e,
65
- column: r.column,
66
- prev: r.prev
67
- };
68
- }
69
- function f(t) {
70
- t.indent = t.ctx.indent, t.ctx = t.ctx.prev;
71
- }
72
- const E = {
73
- name: "r",
74
- startState: function(t) {
75
- return {
76
- tokenize: s,
77
- ctx: {
78
- type: "top",
79
- indent: -t,
80
- flags: l
81
- },
82
- indent: 0,
83
- afterIdent: !1
84
- };
85
- },
86
- token: function(t, e) {
87
- if (t.sol() && ((e.ctx.flags & 3) == 0 && (e.ctx.flags |= l), e.ctx.flags & u && f(e), e.indent = t.indentation()), t.eatSpace()) return null;
88
- var r = e.tokenize(t, e);
89
- return r != "comment" && (e.ctx.flags & l) == 0 && x(e, d), (c == ";" || c == "{" || c == "}") && e.ctx.type == "block" && f(e), c == "{" ? i(e, "}", t) : c == "(" ? (i(e, ")", t), e.afterIdent && (e.ctx.argList = !0)) : c == "[" ? i(e, "]", t) : c == "block" ? i(e, "block", t) : c == e.ctx.type ? f(e) : e.ctx.type == "block" && r != "comment" && x(e, u), e.afterIdent = r == "variable" || r == "keyword", r;
90
- },
91
- indent: function(t, e, r) {
92
- if (t.tokenize != s) return 0;
93
- var a = e && e.charAt(0), n = t.ctx, p = a == n.type;
94
- return n.flags & u && (n = n.prev), n.type == "block" ? n.indent + (a == "{" ? 0 : r.unit) : n.flags & d ? n.column + (p ? 0 : 1) : n.indent + (p ? 0 : r.unit);
95
- },
96
- languageData: {
97
- wordChars: ".",
98
- commentTokens: { line: "#" },
99
- autocomplete: k.concat(b, g)
100
- }
101
- };
102
- export {
103
- E as r
104
- };
@@ -1,57 +0,0 @@
1
- var r = /^-+$/, n = /^(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 u = {
3
- name: "rpmchanges",
4
- token: function(e) {
5
- return e.sol() && (e.match(r) || e.match(n)) ? "tag" : e.match(c) ? "string" : (e.next(), null);
6
- }
7
- };
8
- var o = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/, i = /^[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)/, s = /^%(ifnarch|ifarch|if)/, p = /^%(else|endif)/, m = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;
9
- const f = {
10
- name: "rpmspec",
11
- startState: function() {
12
- return {
13
- controlFlow: !1,
14
- macroParameters: !1,
15
- section: !1
16
- };
17
- },
18
- token: function(e, t) {
19
- var a = e.peek();
20
- if (a == "#")
21
- return e.skipToEnd(), "comment";
22
- if (e.sol()) {
23
- if (e.match(i))
24
- return "header";
25
- if (e.match(l))
26
- return "atom";
27
- }
28
- if (e.match(/^\$\w+/) || e.match(/^\$\{\w+\}/))
29
- return "def";
30
- if (e.match(p))
31
- return "keyword";
32
- if (e.match(s))
33
- return t.controlFlow = !0, "keyword";
34
- if (t.controlFlow) {
35
- if (e.match(m))
36
- return "operator";
37
- if (e.match(/^(\d+)/))
38
- return "number";
39
- e.eol() && (t.controlFlow = !1);
40
- }
41
- if (e.match(o))
42
- return e.eol() && (t.controlFlow = !1), "number";
43
- if (e.match(/^%[\w]+/))
44
- return e.match("(") && (t.macroParameters = !0), "keyword";
45
- if (t.macroParameters) {
46
- if (e.match(/^\d+/))
47
- return "number";
48
- if (e.match(")"))
49
- return t.macroParameters = !1, "keyword";
50
- }
51
- return e.match(/^%\{\??[\w \-\:\!]+\}/) ? (e.eol() && (t.controlFlow = !1), "def") : (e.next(), null);
52
- }
53
- };
54
- export {
55
- u as rpmChanges,
56
- f as rpmSpec
57
- };