@aiao/code-editor 0.0.7 → 0.0.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 (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-BMiCCEB1.js +309 -0
  37. package/dist/index-BNuasEBW.js +94 -0
  38. package/dist/index-Bg1KDWyt.js +290 -0
  39. package/dist/index-BuVm7ZG6.js +1305 -0
  40. package/dist/index-BvS1cnHq.js +613 -0
  41. package/dist/index-C44L0DmY.js +138 -0
  42. package/dist/index-C71CZfUx.js +247 -0
  43. package/dist/index-CQ6JWNwi.js +566 -0
  44. package/dist/index-CpRVx97-.js +342 -0
  45. package/dist/index-CqvQj6d-.js +270 -0
  46. package/dist/index-CrbQBmWq.js +157 -0
  47. package/dist/index-CzovO10m.js +302 -0
  48. package/dist/index-D0BZOY-S.js +101 -0
  49. package/dist/index-D0svJS59.js +555 -0
  50. package/dist/index-D93XVMi1.js +136 -0
  51. package/dist/index-DEB5VK0f.js +252 -0
  52. package/dist/index-DIaXGPFp.js +12936 -0
  53. package/dist/index-Dp8osI_J.js +960 -0
  54. package/dist/index-Ds4AioqO.js +1918 -0
  55. package/dist/index-Dy-OpkyQ.js +76 -0
  56. package/dist/index-Dyi9rNIT.js +391 -0
  57. package/dist/index-ZJkjD9tT.js +74 -0
  58. package/dist/index-qH2lMs0G.js +945 -0
  59. package/dist/index-srIksFxX.js +59 -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 +14 -8
@@ -0,0 +1,487 @@
1
+ var S = [
2
+ "-type",
3
+ "-spec",
4
+ "-export_type",
5
+ "-opaque"
6
+ ], x = [
7
+ "after",
8
+ "begin",
9
+ "catch",
10
+ "case",
11
+ "cond",
12
+ "end",
13
+ "fun",
14
+ "if",
15
+ "let",
16
+ "of",
17
+ "query",
18
+ "receive",
19
+ "try",
20
+ "when"
21
+ ], z = /[\->,;]/, E = [
22
+ "->",
23
+ ";",
24
+ ","
25
+ ], T = [
26
+ "and",
27
+ "andalso",
28
+ "band",
29
+ "bnot",
30
+ "bor",
31
+ "bsl",
32
+ "bsr",
33
+ "bxor",
34
+ "div",
35
+ "not",
36
+ "or",
37
+ "orelse",
38
+ "rem",
39
+ "xor"
40
+ ], R = /[\+\-\*\/<>=\|:!]/, A = [
41
+ "=",
42
+ "+",
43
+ "-",
44
+ "*",
45
+ "/",
46
+ ">",
47
+ ">=",
48
+ "<",
49
+ "=<",
50
+ "=:=",
51
+ "==",
52
+ "=/=",
53
+ "/=",
54
+ "||",
55
+ "<-",
56
+ "!"
57
+ ], U = /[<\(\[\{]/, b = [
58
+ "<<",
59
+ "(",
60
+ "[",
61
+ "{"
62
+ ], Z = /[>\)\]\}]/, y = [
63
+ "}",
64
+ "]",
65
+ ")",
66
+ ">>"
67
+ ], m = [
68
+ "is_atom",
69
+ "is_binary",
70
+ "is_bitstring",
71
+ "is_boolean",
72
+ "is_float",
73
+ "is_function",
74
+ "is_integer",
75
+ "is_list",
76
+ "is_number",
77
+ "is_pid",
78
+ "is_port",
79
+ "is_record",
80
+ "is_reference",
81
+ "is_tuple",
82
+ "atom",
83
+ "binary",
84
+ "bitstring",
85
+ "boolean",
86
+ "function",
87
+ "integer",
88
+ "list",
89
+ "number",
90
+ "pid",
91
+ "port",
92
+ "record",
93
+ "reference",
94
+ "tuple"
95
+ ], P = [
96
+ "abs",
97
+ "adler32",
98
+ "adler32_combine",
99
+ "alive",
100
+ "apply",
101
+ "atom_to_binary",
102
+ "atom_to_list",
103
+ "binary_to_atom",
104
+ "binary_to_existing_atom",
105
+ "binary_to_list",
106
+ "binary_to_term",
107
+ "bit_size",
108
+ "bitstring_to_list",
109
+ "byte_size",
110
+ "check_process_code",
111
+ "contact_binary",
112
+ "crc32",
113
+ "crc32_combine",
114
+ "date",
115
+ "decode_packet",
116
+ "delete_module",
117
+ "disconnect_node",
118
+ "element",
119
+ "erase",
120
+ "exit",
121
+ "float",
122
+ "float_to_list",
123
+ "garbage_collect",
124
+ "get",
125
+ "get_keys",
126
+ "group_leader",
127
+ "halt",
128
+ "hd",
129
+ "integer_to_list",
130
+ "internal_bif",
131
+ "iolist_size",
132
+ "iolist_to_binary",
133
+ "is_alive",
134
+ "is_atom",
135
+ "is_binary",
136
+ "is_bitstring",
137
+ "is_boolean",
138
+ "is_float",
139
+ "is_function",
140
+ "is_integer",
141
+ "is_list",
142
+ "is_number",
143
+ "is_pid",
144
+ "is_port",
145
+ "is_process_alive",
146
+ "is_record",
147
+ "is_reference",
148
+ "is_tuple",
149
+ "length",
150
+ "link",
151
+ "list_to_atom",
152
+ "list_to_binary",
153
+ "list_to_bitstring",
154
+ "list_to_existing_atom",
155
+ "list_to_float",
156
+ "list_to_integer",
157
+ "list_to_pid",
158
+ "list_to_tuple",
159
+ "load_module",
160
+ "make_ref",
161
+ "module_loaded",
162
+ "monitor_node",
163
+ "node",
164
+ "node_link",
165
+ "node_unlink",
166
+ "nodes",
167
+ "notalive",
168
+ "now",
169
+ "open_port",
170
+ "pid_to_list",
171
+ "port_close",
172
+ "port_command",
173
+ "port_connect",
174
+ "port_control",
175
+ "pre_loaded",
176
+ "process_flag",
177
+ "process_info",
178
+ "processes",
179
+ "purge_module",
180
+ "put",
181
+ "register",
182
+ "registered",
183
+ "round",
184
+ "self",
185
+ "setelement",
186
+ "size",
187
+ "spawn",
188
+ "spawn_link",
189
+ "spawn_monitor",
190
+ "spawn_opt",
191
+ "split_binary",
192
+ "statistics",
193
+ "term_to_binary",
194
+ "time",
195
+ "throw",
196
+ "tl",
197
+ "trunc",
198
+ "tuple_size",
199
+ "tuple_to_list",
200
+ "unlink",
201
+ "unregister",
202
+ "whereis"
203
+ ], p = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/, q = /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;
204
+ function j(e, n) {
205
+ if (n.in_string)
206
+ return n.in_string = !v(e), t(n, e, "string");
207
+ if (n.in_atom)
208
+ return n.in_atom = !h(e), t(n, e, "atom");
209
+ if (e.eatSpace())
210
+ return t(n, e, "whitespace");
211
+ if (!_(n) && e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/))
212
+ return u(e.current(), S) ? t(n, e, "type") : t(n, e, "attribute");
213
+ var r = e.next();
214
+ if (r == "%")
215
+ return e.skipToEnd(), t(n, e, "comment");
216
+ if (r == ":")
217
+ return t(n, e, "colon");
218
+ if (r == "?")
219
+ return e.eatSpace(), e.eatWhile(p), t(n, e, "macro");
220
+ if (r == "#")
221
+ return e.eatSpace(), e.eatWhile(p), t(n, e, "record");
222
+ if (r == "$")
223
+ return e.next() == "\\" && !e.match(q) ? t(n, e, "error") : t(n, e, "number");
224
+ if (r == ".")
225
+ return t(n, e, "dot");
226
+ if (r == "'") {
227
+ if (!(n.in_atom = !h(e))) {
228
+ if (e.match(/\s*\/\s*[0-9]/, !1))
229
+ return e.match(/\s*\/\s*[0-9]/, !0), t(n, e, "fun");
230
+ if (e.match(/\s*\(/, !1) || e.match(/\s*:/, !1))
231
+ return t(n, e, "function");
232
+ }
233
+ return t(n, e, "atom");
234
+ }
235
+ if (r == '"')
236
+ return n.in_string = !v(e), t(n, e, "string");
237
+ if (/[A-Z_Ø-ÞÀ-Ö]/.test(r))
238
+ return e.eatWhile(p), t(n, e, "variable");
239
+ if (/[a-z_ß-öø-ÿ]/.test(r)) {
240
+ if (e.eatWhile(p), e.match(/\s*\/\s*[0-9]/, !1))
241
+ return e.match(/\s*\/\s*[0-9]/, !0), t(n, e, "fun");
242
+ var i = e.current();
243
+ return u(i, x) ? t(n, e, "keyword") : u(i, T) ? t(n, e, "operator") : e.match(/\s*\(/, !1) ? u(i, P) && (_(n).token != ":" || _(n, 2).token == "erlang") ? t(n, e, "builtin") : u(i, m) ? t(n, e, "guard") : t(n, e, "function") : Q(e) == ":" ? i == "erlang" ? t(n, e, "builtin") : t(n, e, "function") : u(i, ["true", "false"]) ? t(n, e, "boolean") : t(n, e, "atom");
244
+ }
245
+ var l = /[0-9]/, o = /[0-9a-zA-Z]/;
246
+ return l.test(r) ? (e.eatWhile(l), e.eat("#") ? e.eatWhile(o) || e.backUp(1) : e.eat(".") && (e.eatWhile(l) ? e.eat(/[eE]/) && (e.eat(/[-+]/) ? e.eatWhile(l) || e.backUp(2) : e.eatWhile(l) || e.backUp(1)) : e.backUp(1)), t(n, e, "number")) : g(e, U, b) ? t(n, e, "open_paren") : g(e, Z, y) ? t(n, e, "close_paren") : k(e, z, E) ? t(n, e, "separator") : k(e, R, A) ? t(n, e, "operator") : t(n, e, null);
247
+ }
248
+ function g(e, n, r) {
249
+ if (e.current().length == 1 && n.test(e.current())) {
250
+ for (e.backUp(1); n.test(e.peek()); )
251
+ if (e.next(), u(e.current(), r))
252
+ return !0;
253
+ e.backUp(e.current().length - 1);
254
+ }
255
+ return !1;
256
+ }
257
+ function k(e, n, r) {
258
+ if (e.current().length == 1 && n.test(e.current())) {
259
+ for (; n.test(e.peek()); )
260
+ e.next();
261
+ for (; 0 < e.current().length; ) {
262
+ if (u(e.current(), r))
263
+ return !0;
264
+ e.backUp(1);
265
+ }
266
+ e.next();
267
+ }
268
+ return !1;
269
+ }
270
+ function v(e) {
271
+ return w(e, '"', "\\");
272
+ }
273
+ function h(e) {
274
+ return w(e, "'", "\\");
275
+ }
276
+ function w(e, n, r) {
277
+ for (; !e.eol(); ) {
278
+ var i = e.next();
279
+ if (i == n)
280
+ return !0;
281
+ i == r && e.next();
282
+ }
283
+ return !1;
284
+ }
285
+ function Q(e) {
286
+ var n = e.match(/^\s*([^\s%])/, !1);
287
+ return n ? n[1] : "";
288
+ }
289
+ function u(e, n) {
290
+ return -1 < n.indexOf(e);
291
+ }
292
+ function t(e, n, r) {
293
+ switch (N(e, D(r, n)), r) {
294
+ case "atom":
295
+ return "atom";
296
+ case "attribute":
297
+ return "attribute";
298
+ case "boolean":
299
+ return "atom";
300
+ case "builtin":
301
+ return "builtin";
302
+ case "close_paren":
303
+ return null;
304
+ case "colon":
305
+ return null;
306
+ case "comment":
307
+ return "comment";
308
+ case "dot":
309
+ return null;
310
+ case "error":
311
+ return "error";
312
+ case "fun":
313
+ return "meta";
314
+ case "function":
315
+ return "tag";
316
+ case "guard":
317
+ return "property";
318
+ case "keyword":
319
+ return "keyword";
320
+ case "macro":
321
+ return "macroName";
322
+ case "number":
323
+ return "number";
324
+ case "open_paren":
325
+ return null;
326
+ case "operator":
327
+ return "operator";
328
+ case "record":
329
+ return "bracket";
330
+ case "separator":
331
+ return null;
332
+ case "string":
333
+ return "string";
334
+ case "type":
335
+ return "def";
336
+ case "variable":
337
+ return "variable";
338
+ default:
339
+ return null;
340
+ }
341
+ }
342
+ function W(e, n, r, i) {
343
+ return {
344
+ token: e,
345
+ column: n,
346
+ indent: r,
347
+ type: i
348
+ };
349
+ }
350
+ function D(e, n) {
351
+ return W(
352
+ n.current(),
353
+ n.column(),
354
+ n.indentation(),
355
+ e
356
+ );
357
+ }
358
+ function I(e) {
359
+ return W(e, 0, 0, e);
360
+ }
361
+ function _(e, n) {
362
+ var r = e.tokenStack.length, i = n || 1;
363
+ return r < i ? !1 : e.tokenStack[r - i];
364
+ }
365
+ function N(e, n) {
366
+ n.type == "comment" || n.type == "whitespace" || (e.tokenStack = O(e.tokenStack, n), e.tokenStack = $(e.tokenStack));
367
+ }
368
+ function O(e, n) {
369
+ var r = e.length - 1;
370
+ return 0 < r && e[r].type === "record" && n.type === "dot" ? e.pop() : (0 < r && e[r].type === "group" && e.pop(), e.push(n)), e;
371
+ }
372
+ function $(e) {
373
+ if (!e.length) return e;
374
+ var n = e.length - 1;
375
+ if (e[n].type === "dot")
376
+ return [];
377
+ if (n > 1 && e[n].type === "fun" && e[n - 1].token === "fun")
378
+ return e.slice(0, n - 1);
379
+ switch (e[n].token) {
380
+ case "}":
381
+ return a(e, { g: ["{"] });
382
+ case "]":
383
+ return a(e, { i: ["["] });
384
+ case ")":
385
+ return a(e, { i: ["("] });
386
+ case ">>":
387
+ return a(e, { i: ["<<"] });
388
+ case "end":
389
+ return a(e, { i: ["begin", "case", "fun", "if", "receive", "try"] });
390
+ case ",":
391
+ return a(e, { e: [
392
+ "begin",
393
+ "try",
394
+ "when",
395
+ "->",
396
+ ",",
397
+ "(",
398
+ "[",
399
+ "{",
400
+ "<<"
401
+ ] });
402
+ case "->":
403
+ return a(e, {
404
+ r: ["when"],
405
+ m: ["try", "if", "case", "receive"]
406
+ });
407
+ case ";":
408
+ return a(e, { E: ["case", "fun", "if", "receive", "try", "when"] });
409
+ case "catch":
410
+ return a(e, { e: ["try"] });
411
+ case "of":
412
+ return a(e, { e: ["case"] });
413
+ case "after":
414
+ return a(e, { e: ["receive", "try"] });
415
+ default:
416
+ return e;
417
+ }
418
+ }
419
+ function a(e, n) {
420
+ for (var r in n)
421
+ for (var i = e.length - 1, l = n[r], o = i - 1; -1 < o; o--)
422
+ if (u(e[o].token, l)) {
423
+ var c = e.slice(0, o);
424
+ switch (r) {
425
+ case "m":
426
+ return c.concat(e[o]).concat(e[i]);
427
+ case "r":
428
+ return c.concat(e[i]);
429
+ case "i":
430
+ return c;
431
+ case "g":
432
+ return c.concat(I("group"));
433
+ case "E":
434
+ return c.concat(e[o]);
435
+ case "e":
436
+ return c.concat(e[o]);
437
+ }
438
+ }
439
+ return r == "E" ? [] : e;
440
+ }
441
+ function B(e, n, r) {
442
+ var i, l = C(n), o = _(e, 1), c = _(e, 2);
443
+ return e.in_string || e.in_atom ? null : c ? o.token == "when" ? o.column + r.unit : l === "when" && c.type === "function" ? c.indent + r.unit : l === "(" && o.token === "fun" ? o.column + 3 : l === "catch" && (i = s(e, ["try"])) ? i.column : u(l, ["end", "after", "of"]) ? (i = s(e, ["begin", "case", "fun", "if", "receive", "try"]), i ? i.column : null) : u(l, y) ? (i = s(e, b), i ? i.column : null) : u(o.token, [",", "|", "||"]) || u(l, [",", "|", "||"]) ? (i = F(e), i ? i.column + i.token.length : r.unit) : o.token == "->" ? u(c.token, ["receive", "case", "if", "try"]) ? c.column + r.unit + r.unit : c.column + r.unit : u(o.token, b) ? o.column + o.token.length : (i = G(e), f(i) ? i.column + r.unit : 0) : 0;
444
+ }
445
+ function C(e) {
446
+ var n = e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);
447
+ return f(n) && n.index === 0 ? n[0] : "";
448
+ }
449
+ function F(e) {
450
+ var n = e.tokenStack.slice(0, -1), r = d(n, "type", ["open_paren"]);
451
+ return f(n[r]) ? n[r] : !1;
452
+ }
453
+ function G(e) {
454
+ var n = e.tokenStack, r = d(n, "type", ["open_paren", "separator", "keyword"]), i = d(n, "type", ["operator"]);
455
+ return f(r) && f(i) && r < i ? n[r + 1] : f(r) ? n[r] : !1;
456
+ }
457
+ function s(e, n) {
458
+ var r = e.tokenStack, i = d(r, "token", n);
459
+ return f(r[i]) ? r[i] : !1;
460
+ }
461
+ function d(e, n, r) {
462
+ for (var i = e.length - 1; -1 < i; i--)
463
+ if (u(e[i][n], r))
464
+ return i;
465
+ return !1;
466
+ }
467
+ function f(e) {
468
+ return e !== !1 && e != null;
469
+ }
470
+ const H = {
471
+ name: "erlang",
472
+ startState() {
473
+ return {
474
+ tokenStack: [],
475
+ in_string: !1,
476
+ in_atom: !1
477
+ };
478
+ },
479
+ token: j,
480
+ indent: B,
481
+ languageData: {
482
+ commentTokens: { line: "%" }
483
+ }
484
+ };
485
+ export {
486
+ H as erlang
487
+ };
@@ -0,0 +1,65 @@
1
+ import { s as e } from "./simple-mode-mNVtnu0l.js";
2
+ const n = e({
3
+ start: [
4
+ // comments
5
+ { regex: /#?!.*/, token: "comment" },
6
+ // strings """, multiline --> state
7
+ { regex: /"""/, token: "string", next: "string3" },
8
+ { regex: /(STRING:)(\s)/, token: ["keyword", null], next: "string2" },
9
+ { regex: /\S*?"/, token: "string", next: "string" },
10
+ // numbers: dec, hex, unicode, bin, fractional, complex
11
+ { regex: /(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/, token: "number" },
12
+ //{regex: /[+-]?/} //fractional
13
+ // definition: defining word, defined word, etc
14
+ { regex: /((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/, token: ["keyword", null, "def", null, "bracket"], next: "stack" },
15
+ // method definition: defining word, type, defined word, etc
16
+ { regex: /(M\:)(\s+)(\S+)(\s+)(\S+)/, token: ["keyword", null, "def", null, "tag"] },
17
+ // vocabulary using --> state
18
+ { regex: /USING\:/, token: "keyword", next: "vocabulary" },
19
+ // vocabulary definition/use
20
+ { regex: /(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "tag"] },
21
+ // definition: a defining word, defined word
22
+ { regex: /(\S+\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "def"] },
23
+ // "keywords", incl. ; t f . [ ] { } defining words
24
+ { regex: /(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>|<PRIVATE|\.|\S*\[|\]|\S*\{|\})(?=\s|$)/, token: "keyword" },
25
+ // <constructors> and the like
26
+ { regex: /\S+[\)>\.\*\?]+(?=\s|$)/, token: "builtin" },
27
+ { regex: /[\)><]+\S+(?=\s|$)/, token: "builtin" },
28
+ // operators
29
+ { regex: /(?:[\+\-\=\/\*<>])(?=\s|$)/, token: "keyword" },
30
+ // any id (?)
31
+ { regex: /\S+/, token: "variable" },
32
+ { regex: /\s+|./, token: null }
33
+ ],
34
+ vocabulary: [
35
+ { regex: /;/, token: "keyword", next: "start" },
36
+ { regex: /\S+/, token: "tag" },
37
+ { regex: /\s+|./, token: null }
38
+ ],
39
+ string: [
40
+ { regex: /(?:[^\\]|\\.)*?"/, token: "string", next: "start" },
41
+ { regex: /.*/, token: "string" }
42
+ ],
43
+ string2: [
44
+ { regex: /^;/, token: "keyword", next: "start" },
45
+ { regex: /.*/, token: "string" }
46
+ ],
47
+ string3: [
48
+ { regex: /(?:[^\\]|\\.)*?"""/, token: "string", next: "start" },
49
+ { regex: /.*/, token: "string" }
50
+ ],
51
+ stack: [
52
+ { regex: /\)/, token: "bracket", next: "start" },
53
+ { regex: /--/, token: "bracket" },
54
+ { regex: /\S+/, token: "meta" },
55
+ { regex: /\s+|./, token: null }
56
+ ],
57
+ languageData: {
58
+ name: "factor",
59
+ dontIndentStates: ["start", "vocabulary", "string", "string3", "stack"],
60
+ commentTokens: { line: "!" }
61
+ }
62
+ });
63
+ export {
64
+ n as factor
65
+ };
@@ -0,0 +1,103 @@
1
+ var d = {
2
+ term: !0,
3
+ method: !0,
4
+ accu: !0,
5
+ rule: !0,
6
+ then: !0,
7
+ is: !0,
8
+ and: !0,
9
+ or: !0,
10
+ if: !0,
11
+ default: !0
12
+ }, f = {
13
+ var_input: !0,
14
+ var_output: !0,
15
+ fuzzify: !0,
16
+ defuzzify: !0,
17
+ function_block: !0,
18
+ ruleblock: !0
19
+ }, o = {
20
+ end_ruleblock: !0,
21
+ end_defuzzify: !0,
22
+ end_function_block: !0,
23
+ end_fuzzify: !0,
24
+ end_var: !0
25
+ }, p = {
26
+ true: !0,
27
+ false: !0,
28
+ nan: !0,
29
+ real: !0,
30
+ min: !0,
31
+ max: !0,
32
+ cog: !0,
33
+ cogs: !0
34
+ }, l = /[+\-*&^%:=<>!|\/]/;
35
+ function i(e, n) {
36
+ var t = e.next();
37
+ if (/[\d\.]/.test(t))
38
+ return t == "." ? e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/) : t == "0" ? e.match(/^[xX][0-9a-fA-F]+/) || e.match(/^0[0-7]+/) : e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/), "number";
39
+ if (t == "/" || t == "(") {
40
+ if (e.eat("*"))
41
+ return n.tokenize = c, c(e, n);
42
+ if (e.eat("/"))
43
+ return e.skipToEnd(), "comment";
44
+ }
45
+ if (l.test(t))
46
+ return e.eatWhile(l), "operator";
47
+ e.eatWhile(/[\w\$_\xa1-\uffff]/);
48
+ var r = e.current().toLowerCase();
49
+ return d.propertyIsEnumerable(r) || f.propertyIsEnumerable(r) || o.propertyIsEnumerable(r) ? "keyword" : p.propertyIsEnumerable(r) ? "atom" : "variable";
50
+ }
51
+ function c(e, n) {
52
+ for (var t = !1, r; r = e.next(); ) {
53
+ if ((r == "/" || r == ")") && t) {
54
+ n.tokenize = i;
55
+ break;
56
+ }
57
+ t = r == "*";
58
+ }
59
+ return "comment";
60
+ }
61
+ function a(e, n, t, r, u) {
62
+ this.indented = e, this.column = n, this.type = t, this.align = r, this.prev = u;
63
+ }
64
+ function k(e, n, t) {
65
+ return e.context = new a(e.indented, n, t, null, e.context);
66
+ }
67
+ function v(e) {
68
+ if (e.context.prev) {
69
+ var n = e.context.type;
70
+ return n == "end_block" && (e.indented = e.context.indented), e.context = e.context.prev;
71
+ }
72
+ }
73
+ const x = {
74
+ name: "fcl",
75
+ startState: function(e) {
76
+ return {
77
+ tokenize: null,
78
+ context: new a(-e, 0, "top", !1),
79
+ indented: 0,
80
+ startOfLine: !0
81
+ };
82
+ },
83
+ token: function(e, n) {
84
+ var t = n.context;
85
+ if (e.sol() && (t.align == null && (t.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace()) return null;
86
+ var r = (n.tokenize || i)(e, n);
87
+ if (r == "comment") return r;
88
+ t.align == null && (t.align = !0);
89
+ var u = e.current().toLowerCase();
90
+ return f.propertyIsEnumerable(u) ? k(n, e.column(), "end_block") : o.propertyIsEnumerable(u) && v(n), n.startOfLine = !1, r;
91
+ },
92
+ indent: function(e, n, t) {
93
+ if (e.tokenize != i && e.tokenize != null) return 0;
94
+ var r = e.context, u = o.propertyIsEnumerable(n);
95
+ return r.align ? r.column + (u ? 0 : 1) : r.indented + (u ? 0 : t.unit);
96
+ },
97
+ languageData: {
98
+ commentTokens: { line: "//", block: { open: "(*", close: "*)" } }
99
+ }
100
+ };
101
+ export {
102
+ x as fcl
103
+ };