@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,324 +0,0 @@
1
- function p(f) {
2
- var u = "error";
3
- function a(e) {
4
- return new RegExp("^((" + e.join(")|(") + "))\\b", "i");
5
- }
6
- var h = new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"), y = new RegExp("^((<>)|(<=)|(>=))"), g = new RegExp("^[\\.,]"), x = new RegExp("^[\\(\\)]"), k = new RegExp("^[A-Za-z][_A-Za-z0-9]*"), w = ["class", "sub", "select", "while", "if", "function", "property", "with", "for"], I = ["else", "elseif", "case"], C = ["next", "loop", "wend"], L = a(["and", "or", "not", "xor", "is", "mod", "eqv", "imp"]), S = [
7
- "dim",
8
- "redim",
9
- "then",
10
- "until",
11
- "randomize",
12
- "byval",
13
- "byref",
14
- "new",
15
- "property",
16
- "exit",
17
- "in",
18
- "const",
19
- "private",
20
- "public",
21
- "get",
22
- "set",
23
- "let",
24
- "stop",
25
- "on error resume next",
26
- "on error goto 0",
27
- "option explicit",
28
- "call",
29
- "me"
30
- ], D = ["true", "false", "nothing", "empty", "null"], E = [
31
- "abs",
32
- "array",
33
- "asc",
34
- "atn",
35
- "cbool",
36
- "cbyte",
37
- "ccur",
38
- "cdate",
39
- "cdbl",
40
- "chr",
41
- "cint",
42
- "clng",
43
- "cos",
44
- "csng",
45
- "cstr",
46
- "date",
47
- "dateadd",
48
- "datediff",
49
- "datepart",
50
- "dateserial",
51
- "datevalue",
52
- "day",
53
- "escape",
54
- "eval",
55
- "execute",
56
- "exp",
57
- "filter",
58
- "formatcurrency",
59
- "formatdatetime",
60
- "formatnumber",
61
- "formatpercent",
62
- "getlocale",
63
- "getobject",
64
- "getref",
65
- "hex",
66
- "hour",
67
- "inputbox",
68
- "instr",
69
- "instrrev",
70
- "int",
71
- "fix",
72
- "isarray",
73
- "isdate",
74
- "isempty",
75
- "isnull",
76
- "isnumeric",
77
- "isobject",
78
- "join",
79
- "lbound",
80
- "lcase",
81
- "left",
82
- "len",
83
- "loadpicture",
84
- "log",
85
- "ltrim",
86
- "rtrim",
87
- "trim",
88
- "maths",
89
- "mid",
90
- "minute",
91
- "month",
92
- "monthname",
93
- "msgbox",
94
- "now",
95
- "oct",
96
- "replace",
97
- "rgb",
98
- "right",
99
- "rnd",
100
- "round",
101
- "scriptengine",
102
- "scriptenginebuildversion",
103
- "scriptenginemajorversion",
104
- "scriptengineminorversion",
105
- "second",
106
- "setlocale",
107
- "sgn",
108
- "sin",
109
- "space",
110
- "split",
111
- "sqr",
112
- "strcomp",
113
- "string",
114
- "strreverse",
115
- "tan",
116
- "time",
117
- "timer",
118
- "timeserial",
119
- "timevalue",
120
- "typename",
121
- "ubound",
122
- "ucase",
123
- "unescape",
124
- "vartype",
125
- "weekday",
126
- "weekdayname",
127
- "year"
128
- ], O = [
129
- "vbBlack",
130
- "vbRed",
131
- "vbGreen",
132
- "vbYellow",
133
- "vbBlue",
134
- "vbMagenta",
135
- "vbCyan",
136
- "vbWhite",
137
- "vbBinaryCompare",
138
- "vbTextCompare",
139
- "vbSunday",
140
- "vbMonday",
141
- "vbTuesday",
142
- "vbWednesday",
143
- "vbThursday",
144
- "vbFriday",
145
- "vbSaturday",
146
- "vbUseSystemDayOfWeek",
147
- "vbFirstJan1",
148
- "vbFirstFourDays",
149
- "vbFirstFullWeek",
150
- "vbGeneralDate",
151
- "vbLongDate",
152
- "vbShortDate",
153
- "vbLongTime",
154
- "vbShortTime",
155
- "vbObjectError",
156
- "vbOKOnly",
157
- "vbOKCancel",
158
- "vbAbortRetryIgnore",
159
- "vbYesNoCancel",
160
- "vbYesNo",
161
- "vbRetryCancel",
162
- "vbCritical",
163
- "vbQuestion",
164
- "vbExclamation",
165
- "vbInformation",
166
- "vbDefaultButton1",
167
- "vbDefaultButton2",
168
- "vbDefaultButton3",
169
- "vbDefaultButton4",
170
- "vbApplicationModal",
171
- "vbSystemModal",
172
- "vbOK",
173
- "vbCancel",
174
- "vbAbort",
175
- "vbRetry",
176
- "vbIgnore",
177
- "vbYes",
178
- "vbNo",
179
- "vbCr",
180
- "VbCrLf",
181
- "vbFormFeed",
182
- "vbLf",
183
- "vbNewLine",
184
- "vbNullChar",
185
- "vbNullString",
186
- "vbTab",
187
- "vbVerticalTab",
188
- "vbUseDefault",
189
- "vbTrue",
190
- "vbFalse",
191
- "vbEmpty",
192
- "vbNull",
193
- "vbInteger",
194
- "vbLong",
195
- "vbSingle",
196
- "vbDouble",
197
- "vbCurrency",
198
- "vbDate",
199
- "vbString",
200
- "vbObject",
201
- "vbError",
202
- "vbBoolean",
203
- "vbVariant",
204
- "vbDataObject",
205
- "vbDecimal",
206
- "vbByte",
207
- "vbArray"
208
- ], o = ["WScript", "err", "debug", "RegExp"], z = ["description", "firstindex", "global", "helpcontext", "helpfile", "ignorecase", "length", "number", "pattern", "source", "value", "count"], R = ["clear", "execute", "raise", "replace", "test", "write", "writeline", "close", "open", "state", "eof", "update", "addnew", "end", "createobject", "quit"], T = ["server", "response", "request", "session", "application"], j = [
209
- "buffer",
210
- "cachecontrol",
211
- "charset",
212
- "contenttype",
213
- "expires",
214
- "expiresabsolute",
215
- "isclientconnected",
216
- "pics",
217
- "status",
218
- //response
219
- "clientcertificate",
220
- "cookies",
221
- "form",
222
- "querystring",
223
- "servervariables",
224
- "totalbytes",
225
- //request
226
- "contents",
227
- "staticobjects",
228
- //application
229
- "codepage",
230
- "lcid",
231
- "sessionid",
232
- "timeout",
233
- //session
234
- "scripttimeout"
235
- ], F = [
236
- "addheader",
237
- "appendtolog",
238
- "binarywrite",
239
- "end",
240
- "flush",
241
- "redirect",
242
- //response
243
- "binaryread",
244
- //request
245
- "remove",
246
- "removeall",
247
- "lock",
248
- "unlock",
249
- //application
250
- "abandon",
251
- //session
252
- "getlasterror",
253
- "htmlencode",
254
- "mappath",
255
- "transfer",
256
- "urlencode"
257
- ], c = R.concat(z);
258
- o = o.concat(O), f.isASP && (o = o.concat(T), c = c.concat(F, j));
259
- var B = a(S), A = a(D), N = a(E), W = a(o), q = a(c), K = '"', M = a(w), b = a(I), v = a(C), d = a(["end"]), Y = a(["do"]), H = a(["on error resume next", "exit"]), J = a(["rem"]);
260
- function m(e, t) {
261
- t.currentIndent++;
262
- }
263
- function l(e, t) {
264
- t.currentIndent--;
265
- }
266
- function s(e, t) {
267
- if (e.eatSpace())
268
- return null;
269
- var r = e.peek();
270
- if (r === "'" || e.match(J))
271
- return e.skipToEnd(), "comment";
272
- if (e.match(/^((&H)|(&O))?[0-9\.]/i, !1) && !e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i, !1)) {
273
- var n = !1;
274
- if ((e.match(/^\d*\.\d+/i) || e.match(/^\d+\.\d*/) || e.match(/^\.\d+/)) && (n = !0), n)
275
- return e.eat(/J/i), "number";
276
- var i = !1;
277
- if (e.match(/^&H[0-9a-f]+/i) || e.match(/^&O[0-7]+/i) ? i = !0 : e.match(/^[1-9]\d*F?/) ? (e.eat(/J/i), i = !0) : e.match(/^0(?![\dx])/i) && (i = !0), i)
278
- return e.eat(/L/i), "number";
279
- }
280
- return e.match(K) ? (t.tokenize = V(e.current()), t.tokenize(e, t)) : e.match(y) || e.match(h) || e.match(L) ? "operator" : e.match(g) ? null : e.match(x) ? "bracket" : e.match(H) ? (t.doInCurrentLine = !0, "keyword") : e.match(Y) ? (m(e, t), t.doInCurrentLine = !0, "keyword") : e.match(M) ? (t.doInCurrentLine ? t.doInCurrentLine = !1 : m(e, t), "keyword") : e.match(b) ? "keyword" : e.match(d) ? (l(e, t), l(e, t), "keyword") : e.match(v) ? (t.doInCurrentLine ? t.doInCurrentLine = !1 : l(e, t), "keyword") : e.match(B) ? "keyword" : e.match(A) ? "atom" : e.match(q) ? "variableName.special" : e.match(N) || e.match(W) ? "builtin" : e.match(k) ? "variable" : (e.next(), u);
281
- }
282
- function V(e) {
283
- var t = e.length == 1, r = "string";
284
- return function(n, i) {
285
- for (; !n.eol(); ) {
286
- if (n.eatWhile(/[^'"]/), n.match(e))
287
- return i.tokenize = s, r;
288
- n.eat(/['"]/);
289
- }
290
- return t && (i.tokenize = s), r;
291
- };
292
- }
293
- function P(e, t) {
294
- var r = t.tokenize(e, t), n = e.current();
295
- return n === "." ? (r = t.tokenize(e, t), n = e.current(), r && (r.substr(0, 8) === "variable" || r === "builtin" || r === "keyword") ? ((r === "builtin" || r === "keyword") && (r = "variable"), c.indexOf(n.substr(1)) > -1 && (r = "keyword"), r) : u) : r;
296
- }
297
- return {
298
- name: "vbscript",
299
- startState: function() {
300
- return {
301
- tokenize: s,
302
- lastToken: null,
303
- currentIndent: 0,
304
- nextLineIndent: 0,
305
- doInCurrentLine: !1,
306
- ignoreKeyword: !1
307
- };
308
- },
309
- token: function(e, t) {
310
- e.sol() && (t.currentIndent += t.nextLineIndent, t.nextLineIndent = 0, t.doInCurrentLine = 0);
311
- var r = P(e, t);
312
- return t.lastToken = { style: r, content: e.current() }, r === null && (r = null), r;
313
- },
314
- indent: function(e, t, r) {
315
- var n = t.replace(/^\s+|\s+$/g, "");
316
- return n.match(v) || n.match(d) || n.match(b) ? r.unit * (e.currentIndent - 1) : e.currentIndent < 0 ? 0 : e.currentIndent * r.unit;
317
- }
318
- };
319
- }
320
- const _ = p({});
321
- p({ isASP: !0 });
322
- export {
323
- _ as vbScript
324
- };
@@ -1,96 +0,0 @@
1
- function u(t) {
2
- for (var e = {}, r = t.split(" "), a = 0; a < r.length; ++a) e[r[a]] = !0;
3
- return e;
4
- }
5
- var f = u("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"), i = u("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"), c = u("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"), k = /[+\-*&%=<>!?:\/|]/;
6
- function s(t, e, r) {
7
- return e.tokenize = r, r(t, e);
8
- }
9
- function o(t, e) {
10
- var r = e.beforeParams;
11
- e.beforeParams = !1;
12
- var a = t.next();
13
- if (a == "'" && !e.inString && e.inParams)
14
- return e.lastTokenWasBuiltin = !1, s(t, e, p(a));
15
- if (a == '"') {
16
- if (e.lastTokenWasBuiltin = !1, e.inString)
17
- return e.inString = !1, "string";
18
- if (e.inParams)
19
- return s(t, e, p(a));
20
- } else {
21
- if (/[\[\]{}\(\),;\.]/.test(a))
22
- return a == "(" && r ? e.inParams = !0 : a == ")" && (e.inParams = !1, e.lastTokenWasBuiltin = !0), null;
23
- if (/\d/.test(a))
24
- return e.lastTokenWasBuiltin = !1, t.eatWhile(/[\w\.]/), "number";
25
- if (a == "#" && t.eat("*"))
26
- return e.lastTokenWasBuiltin = !1, s(t, e, m);
27
- if (a == "#" && t.match(/ *\[ *\[/))
28
- return e.lastTokenWasBuiltin = !1, s(t, e, h);
29
- if (a == "#" && t.eat("#"))
30
- return e.lastTokenWasBuiltin = !1, t.skipToEnd(), "comment";
31
- if (a == "$")
32
- return t.eat("!"), t.eatWhile(/[\w\d\$_\.{}-]/), c && c.propertyIsEnumerable(t.current()) ? "keyword" : (e.lastTokenWasBuiltin = !0, e.beforeParams = !0, "builtin");
33
- if (k.test(a))
34
- return e.lastTokenWasBuiltin = !1, t.eatWhile(k), "operator";
35
- t.eatWhile(/[\w\$_{}@]/);
36
- var n = t.current();
37
- return f && f.propertyIsEnumerable(n) ? "keyword" : i && i.propertyIsEnumerable(n) || t.current().match(/^#@?[a-z0-9_]+ *$/i) && t.peek() == "(" && !(i && i.propertyIsEnumerable(n.toLowerCase())) ? (e.beforeParams = !0, e.lastTokenWasBuiltin = !1, "keyword") : e.inString ? (e.lastTokenWasBuiltin = !1, "string") : t.pos > n.length && t.string.charAt(t.pos - n.length - 1) == "." && e.lastTokenWasBuiltin ? "builtin" : (e.lastTokenWasBuiltin = !1, null);
38
- }
39
- }
40
- function p(t) {
41
- return function(e, r) {
42
- for (var a = !1, n, l = !1; (n = e.next()) != null; ) {
43
- if (n == t && !a) {
44
- l = !0;
45
- break;
46
- }
47
- if (t == '"' && e.peek() == "$" && !a) {
48
- r.inString = !0, l = !0;
49
- break;
50
- }
51
- a = !a && n == "\\";
52
- }
53
- return l && (r.tokenize = o), "string";
54
- };
55
- }
56
- function m(t, e) {
57
- for (var r = !1, a; a = t.next(); ) {
58
- if (a == "#" && r) {
59
- e.tokenize = o;
60
- break;
61
- }
62
- r = a == "*";
63
- }
64
- return "comment";
65
- }
66
- function h(t, e) {
67
- for (var r = 0, a; a = t.next(); ) {
68
- if (a == "#" && r == 2) {
69
- e.tokenize = o;
70
- break;
71
- }
72
- a == "]" ? r++ : a != " " && (r = 0);
73
- }
74
- return "meta";
75
- }
76
- const b = {
77
- name: "velocity",
78
- startState: function() {
79
- return {
80
- tokenize: o,
81
- beforeParams: !1,
82
- inParams: !1,
83
- inString: !1,
84
- lastTokenWasBuiltin: !1
85
- };
86
- },
87
- token: function(t, e) {
88
- return t.eatSpace() ? null : e.tokenize(t, e);
89
- },
90
- languageData: {
91
- commentTokens: { line: "##", block: { open: "#*", close: "*#" } }
92
- }
93
- };
94
- export {
95
- b as velocity
96
- };
@@ -1,259 +0,0 @@
1
- function T(r) {
2
- var l = r.statementIndentUnit, c = r.dontAlignCalls, s = r.noIndentKeywords || [], f = r.multiLineStrings, o = r.hooks || {};
3
- function v(e) {
4
- for (var t = {}, n = e.split(" "), a = 0; a < n.length; ++a) t[n[a]] = !0;
5
- return t;
6
- }
7
- var g = v(
8
- "accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"
9
- ), w = /[\+\-\*\/!~&|^%=?:]/, h = /[\[\]{}()]/, b = /\d[0-9_]*/, z = /\d*\s*'s?d\s*\d[0-9_]*/i, L = /\d*\s*'s?b\s*[xz01][xz01_]*/i, O = /\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i, W = /\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i, j = /(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i, U = /^((\w+)|[)}\]])/, M = /[)}\]]/, d, p, D = v(
10
- "case checker class clocking config function generate interface module package primitive program property specify sequence table task"
11
- ), u = {};
12
- for (var k in D)
13
- u[k] = "end" + k;
14
- u.begin = "end", u.casex = "endcase", u.casez = "endcase", u.do = "while", u.fork = "join;join_any;join_none", u.covergroup = "endgroup";
15
- for (var K in s) {
16
- var k = s[K];
17
- u[k] && (u[k] = void 0);
18
- }
19
- var P = v("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while");
20
- function _(e, t) {
21
- var n = e.peek(), a;
22
- if (o[n] && (a = o[n](e, t)) != !1 || o.tokenBase && (a = o.tokenBase(e, t)) != !1)
23
- return a;
24
- if (/[,;:\.]/.test(n))
25
- return d = e.next(), null;
26
- if (h.test(n))
27
- return d = e.next(), "bracket";
28
- if (n == "`")
29
- return e.next(), e.eatWhile(/[\w\$_]/) ? "def" : null;
30
- if (n == "$")
31
- return e.next(), e.eatWhile(/[\w\$_]/) ? "meta" : null;
32
- if (n == "#")
33
- return e.next(), e.eatWhile(/[\d_.]/), "def";
34
- if (n == '"')
35
- return e.next(), t.tokenize = R(n), t.tokenize(e, t);
36
- if (n == "/") {
37
- if (e.next(), e.eat("*"))
38
- return t.tokenize = N, N(e, t);
39
- if (e.eat("/"))
40
- return e.skipToEnd(), "comment";
41
- e.backUp(1);
42
- }
43
- if (e.match(j) || e.match(z) || e.match(L) || e.match(O) || e.match(W) || e.match(b) || e.match(j))
44
- return "number";
45
- if (e.eatWhile(w))
46
- return "meta";
47
- if (e.eatWhile(/[\w\$_]/)) {
48
- var i = e.current();
49
- return g[i] ? (u[i] && (d = "newblock"), P[i] && (d = "newstatement"), p = i, "keyword") : "variable";
50
- }
51
- return e.next(), null;
52
- }
53
- function R(e) {
54
- return function(t, n) {
55
- for (var a = !1, i, y = !1; (i = t.next()) != null; ) {
56
- if (i == e && !a) {
57
- y = !0;
58
- break;
59
- }
60
- a = !a && i == "\\";
61
- }
62
- return (y || !(a || f)) && (n.tokenize = _), "string";
63
- };
64
- }
65
- function N(e, t) {
66
- for (var n = !1, a; a = e.next(); ) {
67
- if (a == "/" && n) {
68
- t.tokenize = _;
69
- break;
70
- }
71
- n = a == "*";
72
- }
73
- return "comment";
74
- }
75
- function $(e, t, n, a, i) {
76
- this.indented = e, this.column = t, this.type = n, this.align = a, this.prev = i;
77
- }
78
- function m(e, t, n) {
79
- var a = e.indented, i = new $(a, t, n, null, e.context);
80
- return e.context = i;
81
- }
82
- function I(e) {
83
- var t = e.context.type;
84
- return (t == ")" || t == "]" || t == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
85
- }
86
- function q(e, t) {
87
- if (e == t)
88
- return !0;
89
- var n = t.split(";");
90
- for (var a in n)
91
- if (e == n[a])
92
- return !0;
93
- return !1;
94
- }
95
- function V() {
96
- var e = [];
97
- for (var t in u)
98
- if (u[t]) {
99
- var n = u[t].split(";");
100
- for (var a in n)
101
- e.push(n[a]);
102
- }
103
- var i = new RegExp("[{}()\\[\\]]|(" + e.join("|") + ")$");
104
- return i;
105
- }
106
- return {
107
- name: "verilog",
108
- startState: function(e) {
109
- var t = {
110
- tokenize: null,
111
- context: new $(-e, 0, "top", !1),
112
- indented: 0,
113
- startOfLine: !0
114
- };
115
- return o.startState && o.startState(t), t;
116
- },
117
- token: function(e, t) {
118
- var n = t.context;
119
- if (e.sol() && (n.align == null && (n.align = !1), t.indented = e.indentation(), t.startOfLine = !0), o.token) {
120
- var a = o.token(e, t);
121
- if (a !== void 0)
122
- return a;
123
- }
124
- if (e.eatSpace()) return null;
125
- d = null, p = null;
126
- var a = (t.tokenize || _)(e, t);
127
- if (a == "comment" || a == "meta" || a == "variable") return a;
128
- if (n.align == null && (n.align = !0), d == n.type)
129
- I(t);
130
- else if (d == ";" && n.type == "statement" || n.type && q(p, n.type))
131
- for (n = I(t); n && n.type == "statement"; ) n = I(t);
132
- else if (d == "{")
133
- m(t, e.column(), "}");
134
- else if (d == "[")
135
- m(t, e.column(), "]");
136
- else if (d == "(")
137
- m(t, e.column(), ")");
138
- else if (n && n.type == "endcase" && d == ":")
139
- m(t, e.column(), "statement");
140
- else if (d == "newstatement")
141
- m(t, e.column(), "statement");
142
- else if (d == "newblock" && !(p == "function" && n && (n.type == "statement" || n.type == "endgroup")) && !(p == "task" && n && n.type == "statement")) {
143
- var i = u[p];
144
- m(t, e.column(), i);
145
- }
146
- return t.startOfLine = !1, a;
147
- },
148
- indent: function(e, t, n) {
149
- if (e.tokenize != _ && e.tokenize != null) return null;
150
- if (o.indent) {
151
- var a = o.indent(e);
152
- if (a >= 0) return a;
153
- }
154
- var i = e.context, y = t && t.charAt(0);
155
- i.type == "statement" && y == "}" && (i = i.prev);
156
- var x = !1, A = t.match(U);
157
- return A && (x = q(A[0], i.type)), i.type == "statement" ? i.indented + (y == "{" ? 0 : l || n.unit) : M.test(i.type) && i.align && !c ? i.column + (x ? 0 : 1) : i.type == ")" && !x ? i.indented + (l || n.unit) : i.indented + (x ? 0 : n.unit);
158
- },
159
- languageData: {
160
- indentOnInput: V(),
161
- commentTokens: { line: "//", block: { open: "/*", close: "*/" } }
162
- }
163
- };
164
- }
165
- const J = T({});
166
- var C = {
167
- "|": "link",
168
- ">": "property",
169
- // Should condition this off for > TLV 1c.
170
- $: "variable",
171
- $$: "variable",
172
- "?$": "qualifier",
173
- "?*": "qualifier",
174
- "-": "contentSeparator",
175
- "/": "property",
176
- "/-": "property",
177
- "@": "variableName.special",
178
- "@-": "variableName.special",
179
- "@++": "variableName.special",
180
- "@+=": "variableName.special",
181
- "@+=-": "variableName.special",
182
- "@--": "variableName.special",
183
- "@-=": "variableName.special",
184
- "%+": "tag",
185
- "%-": "tag",
186
- "%": "tag",
187
- ">>": "tag",
188
- "<<": "tag",
189
- "<>": "tag",
190
- "#": "tag",
191
- // Need to choose a style for this.
192
- "^": "attribute",
193
- "^^": "attribute",
194
- "^!": "attribute",
195
- "*": "variable",
196
- "**": "variable",
197
- "\\": "keyword",
198
- '"': "comment"
199
- }, B = {
200
- "/": "beh-hier",
201
- ">": "beh-hier",
202
- "-": "phys-hier",
203
- "|": "pipe",
204
- "?": "when",
205
- "@": "stage",
206
- "\\": "keyword"
207
- }, S = 3, E = /^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/, F = /^[! ] */, G = /^\/[\/\*]/;
208
- T({
209
- hooks: {
210
- electricInput: !1,
211
- // Return undefined for verilog tokenizing, or style for TLV token (null not used).
212
- // Standard CM styles are used for most formatting, but some TL-Verilog-specific highlighting
213
- // can be enabled with the definition of cm-tlv-* styles, including highlighting for:
214
- // - M4 tokens
215
- // - TLV scope indentation
216
- // - Statement delimitation (enabled by tlvTrackStatements)
217
- token: function(r, l) {
218
- var c = void 0, s;
219
- if (r.sol() && !l.tlvInBlockComment) {
220
- r.peek() == "\\" && (c = "def", r.skipToEnd(), r.string.match(/\\SV/) ? l.tlvCodeActive = !1 : r.string.match(/\\TLV/) && (l.tlvCodeActive = !0)), l.tlvCodeActive && r.pos == 0 && l.indented == 0 && (s = r.match(F, !1)) && (l.indented = s[0].length);
221
- var f = l.indented, o = f / S;
222
- if (o <= l.tlvIndentationStyle.length) {
223
- var v = r.string.length == f, g = o * S;
224
- if (g < r.string.length) {
225
- var w = r.string.slice(g), h = w[0];
226
- B[h] && (s = w.match(E)) && C[s[1]] && (f += S, h == "\\" && g > 0 || (l.tlvIndentationStyle[o] = B[h], o++));
227
- }
228
- if (!v)
229
- for (; l.tlvIndentationStyle.length > o; )
230
- l.tlvIndentationStyle.pop();
231
- }
232
- l.tlvNextIndent = f;
233
- }
234
- if (l.tlvCodeActive) {
235
- var s;
236
- if (c === void 0) if (l.tlvInBlockComment)
237
- r.match(/^.*?\*\//) ? l.tlvInBlockComment = !1 : r.skipToEnd(), c = "comment";
238
- else if ((s = r.match(G)) && !l.tlvInBlockComment)
239
- s[0] == "//" ? r.skipToEnd() : l.tlvInBlockComment = !0, c = "comment";
240
- else if (s = r.match(E)) {
241
- var b = s[1], z = s[2];
242
- C.hasOwnProperty(b) && // has mnemonic or we're at the end of the line (maybe it hasn't been typed yet)
243
- (z.length > 0 || r.eol()) ? c = C[b] : r.backUp(r.current().length - 1);
244
- } else r.match(/^\t+/) ? c = "invalid" : r.match(/^[\[\]{}\(\);\:]+/) ? c = "meta" : (s = r.match(/^[mM]4([\+_])?[\w\d_]*/)) ? c = s[1] == "+" ? "keyword.special" : "keyword" : r.match(/^ +/) ? r.eol() && (c = "error") : r.match(/^[\w\d_]+/) ? c = "number" : r.next();
245
- } else
246
- r.match(/^[mM]4([\w\d_]*)/) && (c = "keyword");
247
- return c;
248
- },
249
- indent: function(r) {
250
- return r.tlvCodeActive == !0 ? r.tlvNextIndent : -1;
251
- },
252
- startState: function(r) {
253
- r.tlvIndentationStyle = [], r.tlvCodeActive = !0, r.tlvNextIndent = -1, r.tlvInBlockComment = !1;
254
- }
255
- }
256
- });
257
- export {
258
- J as verilog
259
- };