@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,241 @@
1
+ function o(e, n, i) {
2
+ return typeof i > "u" && (i = ""), typeof n > "u" && (n = "\\b"), new RegExp("^" + i + "((" + e.join(")|(") + "))" + n);
3
+ }
4
+ var v = "\\\\[0-7]{1,3}", k = "\\\\x[A-Fa-f0-9]{1,2}", F = `\\\\[abefnrtv0%?'"\\\\]`, g = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])", a = [
5
+ "[<>]:",
6
+ "[<>=]=",
7
+ "<<=?",
8
+ ">>>?=?",
9
+ "=>",
10
+ "--?>",
11
+ "<--[->]?",
12
+ "\\/\\/",
13
+ "\\.{2,3}",
14
+ "[\\.\\\\%*+\\-<>!\\/^|&]=?",
15
+ "\\?",
16
+ "\\$",
17
+ "~",
18
+ ":"
19
+ ], b = o([
20
+ "[<>]:",
21
+ "[<>=]=",
22
+ "[!=]==",
23
+ "<<=?",
24
+ ">>>?=?",
25
+ "=>?",
26
+ "--?>",
27
+ "<--[->]?",
28
+ "\\/\\/",
29
+ "[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?",
30
+ "\\?",
31
+ "\\$",
32
+ "~",
33
+ ":",
34
+ "\\u00D7",
35
+ "\\u2208",
36
+ "\\u2209",
37
+ "\\u220B",
38
+ "\\u220C",
39
+ "\\u2218",
40
+ "\\u221A",
41
+ "\\u221B",
42
+ "\\u2229",
43
+ "\\u222A",
44
+ "\\u2260",
45
+ "\\u2264",
46
+ "\\u2265",
47
+ "\\u2286",
48
+ "\\u2288",
49
+ "\\u228A",
50
+ "\\u22C5",
51
+ "\\b(in|isa)\\b(?!.?\\()"
52
+ ], ""), y = /^[;,()[\]{}]/, m = /^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/, x = o([v, k, F, g], "'"), z = [
53
+ "begin",
54
+ "function",
55
+ "type",
56
+ "struct",
57
+ "immutable",
58
+ "let",
59
+ "macro",
60
+ "for",
61
+ "while",
62
+ "quote",
63
+ "if",
64
+ "else",
65
+ "elseif",
66
+ "try",
67
+ "finally",
68
+ "catch",
69
+ "do"
70
+ ], A = ["end", "else", "elseif", "catch", "finally"], p = [
71
+ "if",
72
+ "else",
73
+ "elseif",
74
+ "while",
75
+ "for",
76
+ "begin",
77
+ "let",
78
+ "end",
79
+ "do",
80
+ "try",
81
+ "catch",
82
+ "finally",
83
+ "return",
84
+ "break",
85
+ "continue",
86
+ "global",
87
+ "local",
88
+ "const",
89
+ "export",
90
+ "import",
91
+ "importall",
92
+ "using",
93
+ "function",
94
+ "where",
95
+ "macro",
96
+ "module",
97
+ "baremodule",
98
+ "struct",
99
+ "type",
100
+ "mutable",
101
+ "immutable",
102
+ "quote",
103
+ "typealias",
104
+ "abstract",
105
+ "primitive",
106
+ "bitstype"
107
+ ], h = ["true", "false", "nothing", "NaN", "Inf"], E = o(z), C = o(A), _ = o(p), w = o(h), D = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, T = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, P = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/, B = o(a, "", "@"), G = o(a, "", ":");
108
+ function l(e) {
109
+ return e.nestedArrays > 0;
110
+ }
111
+ function S(e) {
112
+ return e.nestedGenerators > 0;
113
+ }
114
+ function t(e, n) {
115
+ return typeof n > "u" && (n = 0), e.scopes.length <= n ? null : e.scopes[e.scopes.length - (n + 1)];
116
+ }
117
+ function f(e, n) {
118
+ if (e.match("#=", !1))
119
+ return n.tokenize = I, n.tokenize(e, n);
120
+ var i = n.leavingExpr;
121
+ if (e.sol() && (i = !1), n.leavingExpr = !1, i && e.match(/^'+/))
122
+ return "operator";
123
+ if (e.match(/\.{4,}/))
124
+ return "error";
125
+ if (e.match(/\.{1,3}/))
126
+ return "operator";
127
+ if (e.eatSpace())
128
+ return null;
129
+ var r = e.peek();
130
+ if (r === "#")
131
+ return e.skipToEnd(), "comment";
132
+ if (r === "[" && (n.scopes.push("["), n.nestedArrays++), r === "(" && (n.scopes.push("("), n.nestedGenerators++), l(n) && r === "]") {
133
+ for (; n.scopes.length && t(n) !== "["; )
134
+ n.scopes.pop();
135
+ n.scopes.pop(), n.nestedArrays--, n.leavingExpr = !0;
136
+ }
137
+ if (S(n) && r === ")") {
138
+ for (; n.scopes.length && t(n) !== "("; )
139
+ n.scopes.pop();
140
+ n.scopes.pop(), n.nestedGenerators--, n.leavingExpr = !0;
141
+ }
142
+ if (l(n)) {
143
+ if (n.lastToken == "end" && e.match(":"))
144
+ return "operator";
145
+ if (e.match("end"))
146
+ return "number";
147
+ }
148
+ var u;
149
+ if ((u = e.match(E, !1)) && n.scopes.push(u[0]), e.match(C, !1) && n.scopes.pop(), e.match(/^::(?![:\$])/))
150
+ return n.tokenize = $, n.tokenize(e, n);
151
+ if (!i && (e.match(T) || e.match(G)))
152
+ return "builtin";
153
+ if (e.match(b))
154
+ return "operator";
155
+ if (e.match(/^\.?\d/, !1)) {
156
+ var s = RegExp(/^im\b/), c = !1;
157
+ if (e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i) && (c = !0), e.match(/^0x[0-9a-f_]+/i) && (c = !0), e.match(/^0b[01_]+/i) && (c = !0), e.match(/^0o[0-7_]+/i) && (c = !0), e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i) && (c = !0), e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i) && (c = !0), c)
158
+ return e.match(s), n.leavingExpr = !0, "number";
159
+ }
160
+ if (e.match("'"))
161
+ return n.tokenize = O, n.tokenize(e, n);
162
+ if (e.match(P))
163
+ return n.tokenize = Z(e.current()), n.tokenize(e, n);
164
+ if (e.match(D) || e.match(B))
165
+ return "meta";
166
+ if (e.match(y))
167
+ return null;
168
+ if (e.match(_))
169
+ return "keyword";
170
+ if (e.match(w))
171
+ return "builtin";
172
+ var d = n.isDefinition || n.lastToken == "function" || n.lastToken == "macro" || n.lastToken == "type" || n.lastToken == "struct" || n.lastToken == "immutable";
173
+ return e.match(m) ? d ? e.peek() === "." ? (n.isDefinition = !0, "variable") : (n.isDefinition = !1, "def") : (n.leavingExpr = !0, "variable") : (e.next(), "error");
174
+ }
175
+ function $(e, n) {
176
+ return e.match(/.*?(?=[,;{}()=\s]|$)/), e.match("{") ? n.nestedParameters++ : e.match("}") && n.nestedParameters > 0 && n.nestedParameters--, n.nestedParameters > 0 ? e.match(/.*?(?={|})/) || e.next() : n.nestedParameters == 0 && (n.tokenize = f), "builtin";
177
+ }
178
+ function I(e, n) {
179
+ return e.match("#=") && n.nestedComments++, e.match(/.*?(?=(#=|=#))/) || e.skipToEnd(), e.match("=#") && (n.nestedComments--, n.nestedComments == 0 && (n.tokenize = f)), "comment";
180
+ }
181
+ function O(e, n) {
182
+ var i = !1, r;
183
+ if (e.match(x))
184
+ i = !0;
185
+ else if (r = e.match(/\\u([a-f0-9]{1,4})(?=')/i)) {
186
+ var u = parseInt(r[1], 16);
187
+ (u <= 55295 || u >= 57344) && (i = !0, e.next());
188
+ } else if (r = e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)) {
189
+ var u = parseInt(r[1], 16);
190
+ u <= 1114111 && (i = !0, e.next());
191
+ }
192
+ return i ? (n.leavingExpr = !0, n.tokenize = f, "string") : (e.match(/^[^']+(?=')/) || e.skipToEnd(), e.match("'") && (n.tokenize = f), "error");
193
+ }
194
+ function Z(e) {
195
+ e.substr(-3) === '"""' ? e = '"""' : e.substr(-1) === '"' && (e = '"');
196
+ function n(i, r) {
197
+ if (i.eat("\\"))
198
+ i.next();
199
+ else {
200
+ if (i.match(e))
201
+ return r.tokenize = f, r.leavingExpr = !0, "string";
202
+ i.eat(/[`"]/);
203
+ }
204
+ return i.eatWhile(/[^\\`"]/), "string";
205
+ }
206
+ return n;
207
+ }
208
+ const j = {
209
+ name: "julia",
210
+ startState: function() {
211
+ return {
212
+ tokenize: f,
213
+ scopes: [],
214
+ lastToken: null,
215
+ leavingExpr: !1,
216
+ isDefinition: !1,
217
+ nestedArrays: 0,
218
+ nestedComments: 0,
219
+ nestedGenerators: 0,
220
+ nestedParameters: 0,
221
+ firstParenPos: -1
222
+ };
223
+ },
224
+ token: function(e, n) {
225
+ var i = n.tokenize(e, n), r = e.current();
226
+ return r && i && (n.lastToken = r), i;
227
+ },
228
+ indent: function(e, n, i) {
229
+ var r = 0;
230
+ return (n === "]" || n === ")" || /^end\b/.test(n) || /^else/.test(n) || /^catch\b/.test(n) || /^elseif\b/.test(n) || /^finally/.test(n)) && (r = -1), (e.scopes.length + r) * i.unit;
231
+ },
232
+ languageData: {
233
+ indentOnInput: /^\s*(end|else|catch|finally)\b$/,
234
+ commentTokens: { line: "#", block: { open: "#=", close: "=#" } },
235
+ closeBrackets: { brackets: ["(", "[", "{", '"'] },
236
+ autocomplete: p.concat(h)
237
+ }
238
+ };
239
+ export {
240
+ j as julia
241
+ };
@@ -0,0 +1,18 @@
1
+ import { LanguageDescription } from '@codemirror/language';
2
+ export declare const CSS: LanguageDescription;
3
+ export declare const SQLite: LanguageDescription;
4
+ export declare const SQL: LanguageDescription;
5
+ export declare const PostgreSQL: LanguageDescription;
6
+ export declare const JSON: LanguageDescription;
7
+ export declare const SCSS: LanguageDescription;
8
+ export declare const Sass: LanguageDescription;
9
+ export declare const TypeScript: LanguageDescription;
10
+ export declare const JavaScript: LanguageDescription;
11
+ export declare const JSX: LanguageDescription;
12
+ export declare const TSX: LanguageDescription;
13
+ export declare const HTML: LanguageDescription;
14
+ export declare const XML: LanguageDescription;
15
+ export declare const Python: LanguageDescription;
16
+ export declare const Markdown: LanguageDescription;
17
+ export declare const SUPPORT_LANGUAGES: LanguageDescription[];
18
+ //# sourceMappingURL=languages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../src/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAmB,MAAM,sBAAsB,CAAC;AAM5E,eAAO,MAAM,GAAG,qBAId,CAAC;AAEH,eAAO,MAAM,MAAM,qBAGjB,CAAC;AAEH,eAAO,MAAM,GAAG,qBAId,CAAC;AAEH,eAAO,MAAM,UAAU,qBAGrB,CAAC;AAEH,eAAO,MAAM,IAAI,qBAKf,CAAC;AAEH,eAAO,MAAM,IAAI,qBAIf,CAAC;AAEH,eAAO,MAAM,IAAI,qBAIf,CAAC;AAEH,eAAO,MAAM,UAAU,qBAMrB,CAAC;AAEH,eAAO,MAAM,UAAU,qBAKrB,CAAC;AAEH,eAAO,MAAM,GAAG,qBAId,CAAC;AAEH,eAAO,MAAM,GAAG,qBAOd,CAAC;AAEH,eAAO,MAAM,IAAI,qBAIf,CAAC;AAEH,eAAO,MAAM,GAAG,qBAId,CAAC;AAEH,eAAO,MAAM,MAAM,qBAKjB,CAAC;AAEH,eAAO,MAAM,QAAQ,qBAKnB,CAAC;AAGH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,EAiBzC,CAAC"}
@@ -0,0 +1,272 @@
1
+ var f = function(e, n) {
2
+ var g = n.next || "start";
3
+ {
4
+ n.next = n.next;
5
+ var k = x[g];
6
+ if (k.splice) {
7
+ for (var l = 0; l < k.length; ++l) {
8
+ var t = k[l];
9
+ if (t.regex && e.match(t.regex))
10
+ return n.next = t.next || n.next, t.token;
11
+ }
12
+ return e.next(), "error";
13
+ }
14
+ if (e.match(t = x[g]))
15
+ return t.regex && e.match(t.regex) ? (n.next = t.next, t.token) : (e.next(), "error");
16
+ }
17
+ return e.next(), "error";
18
+ }, s = "(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*", u = RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*" + s + ")?))\\s*$"), r = "(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))", o = {
19
+ token: "string",
20
+ regex: ".+"
21
+ }, x = {
22
+ start: [
23
+ {
24
+ token: "docComment",
25
+ regex: "/\\*",
26
+ next: "comment"
27
+ },
28
+ {
29
+ token: "comment",
30
+ regex: "#.*"
31
+ },
32
+ {
33
+ token: "keyword",
34
+ regex: "(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)" + r
35
+ },
36
+ {
37
+ token: "atom",
38
+ regex: "(?:true|false|yes|no|on|off|null|void|undefined)" + r
39
+ },
40
+ {
41
+ token: "invalid",
42
+ regex: "(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)" + r
43
+ },
44
+ {
45
+ token: "className.standard",
46
+ regex: "(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)" + r
47
+ },
48
+ {
49
+ token: "variableName.function.standard",
50
+ regex: "(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)" + r
51
+ },
52
+ {
53
+ token: "variableName.standard",
54
+ regex: "(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)" + r
55
+ },
56
+ {
57
+ token: "variableName",
58
+ regex: s + "\\s*:(?![:=])"
59
+ },
60
+ {
61
+ token: "variableName",
62
+ regex: s
63
+ },
64
+ {
65
+ token: "operatorKeyword",
66
+ regex: "(?:\\.{3}|\\s+\\?)"
67
+ },
68
+ {
69
+ token: "keyword",
70
+ regex: "(?:@+|::|\\.\\.)",
71
+ next: "key"
72
+ },
73
+ {
74
+ token: "operatorKeyword",
75
+ regex: "\\.\\s*",
76
+ next: "key"
77
+ },
78
+ {
79
+ token: "string",
80
+ regex: "\\\\\\S[^\\s,;)}\\]]*"
81
+ },
82
+ {
83
+ token: "docString",
84
+ regex: "'''",
85
+ next: "qdoc"
86
+ },
87
+ {
88
+ token: "docString",
89
+ regex: '"""',
90
+ next: "qqdoc"
91
+ },
92
+ {
93
+ token: "string",
94
+ regex: "'",
95
+ next: "qstring"
96
+ },
97
+ {
98
+ token: "string",
99
+ regex: '"',
100
+ next: "qqstring"
101
+ },
102
+ {
103
+ token: "string",
104
+ regex: "`",
105
+ next: "js"
106
+ },
107
+ {
108
+ token: "string",
109
+ regex: "<\\[",
110
+ next: "words"
111
+ },
112
+ {
113
+ token: "regexp",
114
+ regex: "//",
115
+ next: "heregex"
116
+ },
117
+ {
118
+ token: "regexp",
119
+ regex: "\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",
120
+ next: "key"
121
+ },
122
+ {
123
+ token: "number",
124
+ regex: "(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"
125
+ },
126
+ {
127
+ token: "paren",
128
+ regex: "[({[]"
129
+ },
130
+ {
131
+ token: "paren",
132
+ regex: "[)}\\]]",
133
+ next: "key"
134
+ },
135
+ {
136
+ token: "operatorKeyword",
137
+ regex: "\\S+"
138
+ },
139
+ {
140
+ token: "content",
141
+ regex: "\\s+"
142
+ }
143
+ ],
144
+ heregex: [
145
+ {
146
+ token: "regexp",
147
+ regex: ".*?//[gimy$?]{0,4}",
148
+ next: "start"
149
+ },
150
+ {
151
+ token: "regexp",
152
+ regex: "\\s*#{"
153
+ },
154
+ {
155
+ token: "comment",
156
+ regex: "\\s+(?:#.*)?"
157
+ },
158
+ {
159
+ token: "regexp",
160
+ regex: "\\S+"
161
+ }
162
+ ],
163
+ key: [
164
+ {
165
+ token: "operatorKeyword",
166
+ regex: "[.?@!]+"
167
+ },
168
+ {
169
+ token: "variableName",
170
+ regex: s,
171
+ next: "start"
172
+ },
173
+ {
174
+ token: "content",
175
+ regex: "",
176
+ next: "start"
177
+ }
178
+ ],
179
+ comment: [
180
+ {
181
+ token: "docComment",
182
+ regex: ".*?\\*/",
183
+ next: "start"
184
+ },
185
+ {
186
+ token: "docComment",
187
+ regex: ".+"
188
+ }
189
+ ],
190
+ qdoc: [
191
+ {
192
+ token: "string",
193
+ regex: ".*?'''",
194
+ next: "key"
195
+ },
196
+ o
197
+ ],
198
+ qqdoc: [
199
+ {
200
+ token: "string",
201
+ regex: '.*?"""',
202
+ next: "key"
203
+ },
204
+ o
205
+ ],
206
+ qstring: [
207
+ {
208
+ token: "string",
209
+ regex: "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
210
+ next: "key"
211
+ },
212
+ o
213
+ ],
214
+ qqstring: [
215
+ {
216
+ token: "string",
217
+ regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
218
+ next: "key"
219
+ },
220
+ o
221
+ ],
222
+ js: [
223
+ {
224
+ token: "string",
225
+ regex: "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
226
+ next: "key"
227
+ },
228
+ o
229
+ ],
230
+ words: [
231
+ {
232
+ token: "string",
233
+ regex: ".*?\\]>",
234
+ next: "key"
235
+ },
236
+ o
237
+ ]
238
+ };
239
+ for (var d in x) {
240
+ var a = x[d];
241
+ if (a.splice)
242
+ for (var i = 0, p = a.length; i < p; ++i) {
243
+ var c = a[i];
244
+ typeof c.regex == "string" && (x[d][i].regex = new RegExp("^" + c.regex));
245
+ }
246
+ else typeof c.regex == "string" && (x[d].regex = new RegExp("^" + a.regex));
247
+ }
248
+ const y = {
249
+ name: "livescript",
250
+ startState: function() {
251
+ return {
252
+ next: "start",
253
+ lastToken: { style: null, indent: 0, content: "" }
254
+ };
255
+ },
256
+ token: function(e, n) {
257
+ for (; e.pos == e.start; )
258
+ var g = f(e, n);
259
+ return n.lastToken = {
260
+ style: g,
261
+ indent: e.indentation(),
262
+ content: e.current()
263
+ }, g.replace(/\./g, " ");
264
+ },
265
+ indent: function(e) {
266
+ var n = e.lastToken.indent;
267
+ return e.lastToken.content.match(u) && (n += 2), n;
268
+ }
269
+ };
270
+ export {
271
+ y as liveScript
272
+ };