@aiao/code-editor-react 0.0.8 → 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 +7 -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-BMiCCEB1-CFMNJD60.js +0 -305
  39. package/dist/index-BNuasEBW-DZ41gDvf.js +0 -94
  40. package/dist/index-Bg1KDWyt-C0dA4q7z.js +0 -290
  41. package/dist/index-BuVm7ZG6-CVgdIGdI.js +0 -1305
  42. package/dist/index-BvS1cnHq-CvzF_kJP.js +0 -613
  43. package/dist/index-C44L0DmY-y7wRzM46.js +0 -138
  44. package/dist/index-C71CZfUx-BtWSxfva.js +0 -247
  45. package/dist/index-CGKWrtgc.js +0 -29766
  46. package/dist/index-CQ6JWNwi-DowNkPcb.js +0 -566
  47. package/dist/index-CpRVx97--DylNh-Zi.js +0 -342
  48. package/dist/index-CqvQj6d--nBAN1vpF.js +0 -270
  49. package/dist/index-CrbQBmWq-DmiRVF9u.js +0 -157
  50. package/dist/index-CzovO10m-DDglzqnG.js +0 -301
  51. package/dist/index-D0BZOY-S-rNSlBO9l.js +0 -101
  52. package/dist/index-D0svJS59-f8ZA2hgC.js +0 -555
  53. package/dist/index-D93XVMi1-CZ_Q2QZM.js +0 -136
  54. package/dist/index-DEB5VK0f-iiwOciBu.js +0 -252
  55. package/dist/index-Dp8osI_J-DDFW8XvK.js +0 -960
  56. package/dist/index-Ds4AioqO-Cg_BlAEI.js +0 -1917
  57. package/dist/index-Dy-OpkyQ-DcLuBsQT.js +0 -76
  58. package/dist/index-Dyi9rNIT-B7p7Dpus.js +0 -391
  59. package/dist/index-ZJkjD9tT-DJQk0ayW.js +0 -74
  60. package/dist/index-qH2lMs0G-Co53S8h3.js +0 -944
  61. package/dist/index-srIksFxX-BLrX1cGK.js +0 -59
  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,241 +0,0 @@
1
- function u(e, t, r) {
2
- return typeof r > "u" && (r = ""), typeof t > "u" && (t = "\\b"), new RegExp("^" + r + "((" + e.join(")|(") + "))" + t);
3
- }
4
- var d = "\\\\[0-7]{1,3}", F = "\\\\x[A-Fa-f0-9]{1,2}", k = `\\\\[abefnrtv0%?'"\\\\]`, b = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])", l = [
5
- "[<>]:",
6
- "[<>=]=",
7
- "<<=?",
8
- ">>>?=?",
9
- "=>",
10
- "--?>",
11
- "<--[->]?",
12
- "\\/\\/",
13
- "\\.{2,3}",
14
- "[\\.\\\\%*+\\-<>!\\/^|&]=?",
15
- "\\?",
16
- "\\$",
17
- "~",
18
- ":"
19
- ], g = u([
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
- ], ""), v = /^[;,()[\]{}]/, x = /^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/, y = u([d, F, k, b], "'"), A = [
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
- ], z = ["end", "else", "elseif", "catch", "finally"], f = [
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
- ], m = ["true", "false", "nothing", "NaN", "Inf"], E = u(A), _ = u(z), D = u(f), T = u(m), w = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, C = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/, P = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/, B = u(l, "", "@"), $ = u(l, "", ":");
108
- function o(e) {
109
- return e.nestedArrays > 0;
110
- }
111
- function G(e) {
112
- return e.nestedGenerators > 0;
113
- }
114
- function c(e, t) {
115
- return typeof t > "u" && (t = 0), e.scopes.length <= t ? null : e.scopes[e.scopes.length - (t + 1)];
116
- }
117
- function n(e, t) {
118
- if (e.match("#=", !1))
119
- return t.tokenize = Z, t.tokenize(e, t);
120
- var r = t.leavingExpr;
121
- if (e.sol() && (r = !1), t.leavingExpr = !1, r && 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 a = e.peek();
130
- if (a === "#")
131
- return e.skipToEnd(), "comment";
132
- if (a === "[" && (t.scopes.push("["), t.nestedArrays++), a === "(" && (t.scopes.push("("), t.nestedGenerators++), o(t) && a === "]") {
133
- for (; t.scopes.length && c(t) !== "["; )
134
- t.scopes.pop();
135
- t.scopes.pop(), t.nestedArrays--, t.leavingExpr = !0;
136
- }
137
- if (G(t) && a === ")") {
138
- for (; t.scopes.length && c(t) !== "("; )
139
- t.scopes.pop();
140
- t.scopes.pop(), t.nestedGenerators--, t.leavingExpr = !0;
141
- }
142
- if (o(t)) {
143
- if (t.lastToken == "end" && e.match(":"))
144
- return "operator";
145
- if (e.match("end"))
146
- return "number";
147
- }
148
- var s;
149
- if ((s = e.match(E, !1)) && t.scopes.push(s[0]), e.match(_, !1) && t.scopes.pop(), e.match(/^::(?![:\$])/))
150
- return t.tokenize = I, t.tokenize(e, t);
151
- if (!r && (e.match(C) || e.match($)))
152
- return "builtin";
153
- if (e.match(g))
154
- return "operator";
155
- if (e.match(/^\.?\d/, !1)) {
156
- var p = RegExp(/^im\b/), i = !1;
157
- if (e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i) && (i = !0), e.match(/^0x[0-9a-f_]+/i) && (i = !0), e.match(/^0b[01_]+/i) && (i = !0), e.match(/^0o[0-7_]+/i) && (i = !0), e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i) && (i = !0), e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i) && (i = !0), i)
158
- return e.match(p), t.leavingExpr = !0, "number";
159
- }
160
- if (e.match("'"))
161
- return t.tokenize = j, t.tokenize(e, t);
162
- if (e.match(P))
163
- return t.tokenize = S(e.current()), t.tokenize(e, t);
164
- if (e.match(w) || e.match(B))
165
- return "meta";
166
- if (e.match(v))
167
- return null;
168
- if (e.match(D))
169
- return "keyword";
170
- if (e.match(T))
171
- return "builtin";
172
- var h = t.isDefinition || t.lastToken == "function" || t.lastToken == "macro" || t.lastToken == "type" || t.lastToken == "struct" || t.lastToken == "immutable";
173
- return e.match(x) ? h ? e.peek() === "." ? (t.isDefinition = !0, "variable") : (t.isDefinition = !1, "def") : (t.leavingExpr = !0, "variable") : (e.next(), "error");
174
- }
175
- function I(e, t) {
176
- return e.match(/.*?(?=[,;{}()=\s]|$)/), e.match("{") ? t.nestedParameters++ : e.match("}") && t.nestedParameters > 0 && t.nestedParameters--, t.nestedParameters > 0 ? e.match(/.*?(?={|})/) || e.next() : t.nestedParameters == 0 && (t.tokenize = n), "builtin";
177
- }
178
- function Z(e, t) {
179
- return e.match("#=") && t.nestedComments++, e.match(/.*?(?=(#=|=#))/) || e.skipToEnd(), e.match("=#") && (t.nestedComments--, t.nestedComments == 0 && (t.tokenize = n)), "comment";
180
- }
181
- function j(e, t) {
182
- var r = !1, a;
183
- if (e.match(y))
184
- r = !0;
185
- else if (a = e.match(/\\u([a-f0-9]{1,4})(?=')/i)) {
186
- var s = parseInt(a[1], 16);
187
- (s <= 55295 || s >= 57344) && (r = !0, e.next());
188
- } else if (a = e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)) {
189
- var s = parseInt(a[1], 16);
190
- s <= 1114111 && (r = !0, e.next());
191
- }
192
- return r ? (t.leavingExpr = !0, t.tokenize = n, "string") : (e.match(/^[^']+(?=')/) || e.skipToEnd(), e.match("'") && (t.tokenize = n), "error");
193
- }
194
- function S(e) {
195
- e.substr(-3) === '"""' ? e = '"""' : e.substr(-1) === '"' && (e = '"');
196
- function t(r, a) {
197
- if (r.eat("\\"))
198
- r.next();
199
- else {
200
- if (r.match(e))
201
- return a.tokenize = n, a.leavingExpr = !0, "string";
202
- r.eat(/[`"]/);
203
- }
204
- return r.eatWhile(/[^\\`"]/), "string";
205
- }
206
- return t;
207
- }
208
- const q = {
209
- name: "julia",
210
- startState: function() {
211
- return {
212
- tokenize: n,
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, t) {
225
- var r = t.tokenize(e, t), a = e.current();
226
- return a && r && (t.lastToken = a), r;
227
- },
228
- indent: function(e, t, r) {
229
- var a = 0;
230
- return (t === "]" || t === ")" || /^end\b/.test(t) || /^else/.test(t) || /^catch\b/.test(t) || /^elseif\b/.test(t) || /^finally/.test(t)) && (a = -1), (e.scopes.length + a) * r.unit;
231
- },
232
- languageData: {
233
- indentOnInput: /^\s*(end|else|catch|finally)\b$/,
234
- commentTokens: { line: "#", block: { open: "#=", close: "=#" } },
235
- closeBrackets: { brackets: ["(", "[", "{", '"'] },
236
- autocomplete: f.concat(m)
237
- }
238
- };
239
- export {
240
- q as julia
241
- };
@@ -1,272 +0,0 @@
1
- var m = function(e, t) {
2
- var a = t.next || "start";
3
- {
4
- t.next = t.next;
5
- var k = x[a];
6
- if (k.splice) {
7
- for (var l = 0; l < k.length; ++l) {
8
- var r = k[l];
9
- if (r.regex && e.match(r.regex))
10
- return t.next = r.next || t.next, r.token;
11
- }
12
- return e.next(), "error";
13
- }
14
- if (e.match(r = x[a]))
15
- return r.regex && e.match(r.regex) ? (t.next = r.next, r.token) : (e.next(), "error");
16
- }
17
- return e.next(), "error";
18
- }, i = "(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*", p = RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*" + i + ")?))\\s*$"), n = "(?![$\\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)" + n
35
- },
36
- {
37
- token: "atom",
38
- regex: "(?:true|false|yes|no|on|off|null|void|undefined)" + n
39
- },
40
- {
41
- token: "invalid",
42
- regex: "(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)" + n
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)" + n
47
- },
48
- {
49
- token: "variableName.function.standard",
50
- regex: "(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)" + n
51
- },
52
- {
53
- token: "variableName.standard",
54
- regex: "(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)" + n
55
- },
56
- {
57
- token: "variableName",
58
- regex: i + "\\s*:(?![:=])"
59
- },
60
- {
61
- token: "variableName",
62
- regex: i
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: i,
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 g = x[d];
241
- if (g.splice)
242
- for (var s = 0, u = g.length; s < u; ++s) {
243
- var c = g[s];
244
- typeof c.regex == "string" && (x[d][s].regex = new RegExp("^" + c.regex));
245
- }
246
- else typeof c.regex == "string" && (x[d].regex = new RegExp("^" + g.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, t) {
257
- for (; e.pos == e.start; )
258
- var a = m(e, t);
259
- return t.lastToken = {
260
- style: a,
261
- indent: e.indentation(),
262
- content: e.current()
263
- }, a.replace(/\./g, " ");
264
- },
265
- indent: function(e) {
266
- var t = e.lastToken.indent;
267
- return e.lastToken.content.match(p) && (t += 2), t;
268
- }
269
- };
270
- export {
271
- y as liveScript
272
- };