zs_library 0.4.8 → 0.4.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 (116) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +10612 -6
  3. package/package.json +146 -146
  4. package/dist/apl-DzB7vleG.js +0 -77
  5. package/dist/asciiarmor-GBg_dTix.js +0 -35
  6. package/dist/asn1-C3znSLx9.js +0 -96
  7. package/dist/asterisk-DlqRFsge.js +0 -272
  8. package/dist/brainfuck-BRsrPeoO.js +0 -35
  9. package/dist/clike-BvRdj3ii.js +0 -621
  10. package/dist/clojure-DoHCnq3P.js +0 -801
  11. package/dist/cmake-lga2BQKc.js +0 -29
  12. package/dist/cobol-CoUZEClC.js +0 -73
  13. package/dist/coffeescript-DtzhVgPb.js +0 -180
  14. package/dist/commonlisp-Dczl5pgK.js +0 -76
  15. package/dist/crystal-CGcK8mnw.js +0 -218
  16. package/dist/css-BSROsPdq.js +0 -1561
  17. package/dist/cypher-DtSMl1Mv.js +0 -69
  18. package/dist/d-Dvhr70b-.js +0 -128
  19. package/dist/diff-CGwDp7kO.js +0 -19
  20. package/dist/dockerfile-comEO-T6.js +0 -195
  21. package/dist/dtd-CCHJ68ra.js +0 -85
  22. package/dist/dylan-DuvcMu5H.js +0 -235
  23. package/dist/ebnf-40BT7kIS.js +0 -79
  24. package/dist/ecl-D1uoNQJW.js +0 -122
  25. package/dist/eiffel-5pGo0kXa.js +0 -111
  26. package/dist/elm-BaiVOLJD.js +0 -109
  27. package/dist/erlang-CkzodiGe.js +0 -488
  28. package/dist/factor-BOXOAn_M.js +0 -66
  29. package/dist/fcl-BpnTn_eU.js +0 -104
  30. package/dist/forth-DErAeAEb.js +0 -61
  31. package/dist/fortran-D2-6KpzO.js +0 -443
  32. package/dist/gas-DyEPANLH.js +0 -184
  33. package/dist/gherkin-Drt_srgO.js +0 -35
  34. package/dist/groovy-BMVfw_nf.js +0 -147
  35. package/dist/haskell-hWhKnZO1.js +0 -376
  36. package/dist/haxe-B1MRfS0p.js +0 -360
  37. package/dist/http-DmgKxj-g.js +0 -45
  38. package/dist/idl-DqZ86h3r.js +0 -948
  39. package/dist/index-5dj8r7GK.js +0 -266
  40. package/dist/index-BTXiadLB.js +0 -309
  41. package/dist/index-BlC4-BmN.js +0 -72
  42. package/dist/index-BrFeP3fX.js +0 -244
  43. package/dist/index-Bto4OncH.js +0 -539
  44. package/dist/index-Bvv7YkGe.js +0 -136
  45. package/dist/index-Bx4MkRG_.js +0 -76
  46. package/dist/index-CVOhQMF3.js +0 -608
  47. package/dist/index-CecD8NGL.js +0 -228472
  48. package/dist/index-CmoZmAhh.js +0 -289
  49. package/dist/index-DE3hmKbB.js +0 -135
  50. package/dist/index-DF7XjAxV.js +0 -94
  51. package/dist/index-DcChItCb.js +0 -157
  52. package/dist/index-Dl5DpQ2k.js +0 -342
  53. package/dist/index-Dpbxeq5U.js +0 -59
  54. package/dist/index-gpJmCEdM.js +0 -99
  55. package/dist/index-udH8R_K0.js +0 -300
  56. package/dist/javascript-BvuVDFxD.js +0 -691
  57. package/dist/jinja2-sU0UaYnG.js +0 -155
  58. package/dist/julia-3_lRZPrK.js +0 -242
  59. package/dist/livescript-BeDiX_lv.js +0 -273
  60. package/dist/lua-DsgFLpii.js +0 -218
  61. package/dist/mathematica-1GSq-6KQ.js +0 -36
  62. package/dist/mbox-agttEgFX.js +0 -77
  63. package/dist/mirc-0mTi20sq.js +0 -73
  64. package/dist/mllike-Cn3QD1L6.js +0 -273
  65. package/dist/modelica-zXUsSMFb.js +0 -94
  66. package/dist/mscgen-CjqYDKLG.js +0 -105
  67. package/dist/mumps-o2cuacx9.js +0 -26
  68. package/dist/nginx-BwTpvSVN.js +0 -90
  69. package/dist/nsis-BuRdhAu4.js +0 -63
  70. package/dist/ntriples-DrgMTIhT.js +0 -80
  71. package/dist/octave-Cxdtf9mO.js +0 -144
  72. package/dist/oz-DFmTw-qE.js +0 -152
  73. package/dist/pascal-DXxn4Ogv.js +0 -78
  74. package/dist/perl-C73cx1ym.js +0 -916
  75. package/dist/pig-Bb8sMbk0.js +0 -55
  76. package/dist/powershell-DxmufwKU.js +0 -250
  77. package/dist/properties-C4fhBR7T.js +0 -27
  78. package/dist/protobuf-Eqae3kep.js +0 -50
  79. package/dist/pug-Cdoid33I.js +0 -249
  80. package/dist/puppet-BH84QZvC.js +0 -46
  81. package/dist/python-D32-_XsH.js +0 -314
  82. package/dist/q-CDvEpNHY.js +0 -84
  83. package/dist/r-D9TtEI-G.js +0 -105
  84. package/dist/rpm-Ckejt31K.js +0 -58
  85. package/dist/ruby-gRVA_lpr.js +0 -229
  86. package/dist/sas-Cetv6MtF.js +0 -106
  87. package/dist/scheme-BpAxUIwV.js +0 -125
  88. package/dist/shell-DmARhv5h.js +0 -183
  89. package/dist/sieve-DJENs6f1.js +0 -73
  90. package/dist/simple-mode-B0kVDhR7.js +0 -89
  91. package/dist/smalltalk-CtRR6guu.js +0 -49
  92. package/dist/solr-ZVIJNGhC.js +0 -42
  93. package/dist/sparql-Cg1WYQva.js +0 -198
  94. package/dist/spreadsheet-Bi94Lk_2.js +0 -50
  95. package/dist/sql-BLhvp4JJ.js +0 -283
  96. package/dist/stex-DuReG47O.js +0 -130
  97. package/dist/stylus-D5QpSSbb.js +0 -251
  98. package/dist/swift-CZplZXOW.js +0 -231
  99. package/dist/tcl-COiqjz-O.js +0 -82
  100. package/dist/textile-BIDpYsbD.js +0 -296
  101. package/dist/tiddlywiki-C4woD_uK.js +0 -156
  102. package/dist/tiki-Ddj0Z2aQ.js +0 -182
  103. package/dist/toml-Byr0PaXO.js +0 -50
  104. package/dist/troff-BEvN8lSw.js +0 -36
  105. package/dist/ttcn-CyeSpuPS.js +0 -124
  106. package/dist/ttcn-cfg-C4JBLVfg.js +0 -89
  107. package/dist/turtle-8qSCc9Tc.js +0 -81
  108. package/dist/vb-BOJI7cFm.js +0 -75
  109. package/dist/vbscript-Cu6iG9pw.js +0 -325
  110. package/dist/velocity-BEpFYT7L.js +0 -97
  111. package/dist/verilog-BBxq08Rh.js +0 -264
  112. package/dist/vhdl-B0tZHMGi.js +0 -107
  113. package/dist/webidl-CW91NtvY.js +0 -156
  114. package/dist/xquery-DzC9wL36.js +0 -423
  115. package/dist/yacas-lKwNB4DM.js +0 -74
  116. package/dist/z80-Bq0fiCqy.js +0 -62
@@ -1,36 +0,0 @@
1
- import "./index.css";
2
- var h = {};
3
- function u(n) {
4
- if (n.eatSpace()) return null;
5
- var t = n.sol(), c = n.next();
6
- if (c === "\\")
7
- return n.match("fB") || n.match("fR") || n.match("fI") || n.match("u") || n.match("d") || n.match("%") || n.match("&") ? "string" : n.match("m[") ? (n.skipTo("]"), n.next(), "string") : n.match("s+") || n.match("s-") ? (n.eatWhile(/[\d-]/), "string") : ((n.match("(") || n.match("*(")) && n.eatWhile(/[\w-]/), "string");
8
- if (t && (c === "." || c === "'") && n.eat("\\") && n.eat('"'))
9
- return n.skipToEnd(), "comment";
10
- if (t && c === ".") {
11
- if (n.match("B ") || n.match("I ") || n.match("R "))
12
- return "attribute";
13
- if (n.match("TH ") || n.match("SH ") || n.match("SS ") || n.match("HP "))
14
- return n.skipToEnd(), "quote";
15
- if (n.match(/[A-Z]/) && n.match(/[A-Z]/) || n.match(/[a-z]/) && n.match(/[a-z]/))
16
- return "attribute";
17
- }
18
- n.eatWhile(/[\w-]/);
19
- var i = n.current();
20
- return h.hasOwnProperty(i) ? h[i] : null;
21
- }
22
- function f(n, t) {
23
- return (t.tokens[0] || u)(n, t);
24
- }
25
- const r = {
26
- name: "troff",
27
- startState: function() {
28
- return { tokens: [] };
29
- },
30
- token: function(n, t) {
31
- return f(n, t);
32
- }
33
- };
34
- export {
35
- r as troff
36
- };
@@ -1,124 +0,0 @@
1
- import "./index.css";
2
- function o(e) {
3
- for (var t = {}, n = e.split(" "), r = 0; r < n.length; ++r) t[n[r]] = !0;
4
- return t;
5
- }
6
- const i = {
7
- keywords: o("activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b"),
8
- builtin: o("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int"),
9
- types: o("anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer"),
10
- timerOps: o("read running start stop timeout"),
11
- portOps: o("call catch check clear getcall getreply halt raise receive reply send trigger"),
12
- configOps: o("create connect disconnect done kill killed map unmap"),
13
- verdictOps: o("getverdict setverdict"),
14
- sutOps: o("action"),
15
- functionOps: o("apply derefers refers"),
16
- verdictConsts: o("error fail inconc none pass"),
17
- booleanConsts: o("true false"),
18
- otherConsts: o("null NULL omit"),
19
- visibilityModifiers: o("private public friend"),
20
- templateMatch: o("complement ifpresent subset superset permutation")
21
- };
22
- var h = [];
23
- function p(e) {
24
- if (e) for (var t in e) e.hasOwnProperty(t) && h.push(t);
25
- }
26
- p(i.keywords);
27
- p(i.builtin);
28
- p(i.timerOps);
29
- p(i.portOps);
30
- var y = i.keywords || {}, v = i.builtin || {}, x = i.timerOps || {}, g = i.portOps || {}, k = i.configOps || {}, O = i.verdictOps || {}, w = i.sutOps || {}, E = i.functionOps || {}, C = i.verdictConsts || {}, I = i.booleanConsts || {}, z = i.otherConsts || {}, L = i.types || {}, M = i.visibilityModifiers || {}, S = i.templateMatch || {}, W = i.indentStatements !== !1, d = /[+\-*&@=<>!\/]/, l;
31
- function T(e, t) {
32
- var n = e.next();
33
- if (n == '"' || n == "'")
34
- return t.tokenize = N(n), t.tokenize(e, t);
35
- if (/[\[\]{}\(\),;\\:\?\.]/.test(n))
36
- return l = n, "punctuation";
37
- if (n == "#")
38
- return e.skipToEnd(), "atom";
39
- if (n == "%")
40
- return e.eatWhile(/\b/), "atom";
41
- if (/\d/.test(n))
42
- return e.eatWhile(/[\w\.]/), "number";
43
- if (n == "/") {
44
- if (e.eat("*"))
45
- return t.tokenize = m, m(e, t);
46
- if (e.eat("/"))
47
- return e.skipToEnd(), "comment";
48
- }
49
- if (d.test(n))
50
- return n == "@" && (e.match("try") || e.match("catch") || e.match("lazy")) ? "keyword" : (e.eatWhile(d), "operator");
51
- e.eatWhile(/[\w\$_\xa1-\uffff]/);
52
- var r = e.current();
53
- return y.propertyIsEnumerable(r) ? "keyword" : v.propertyIsEnumerable(r) ? "builtin" : x.propertyIsEnumerable(r) || k.propertyIsEnumerable(r) || O.propertyIsEnumerable(r) || g.propertyIsEnumerable(r) || w.propertyIsEnumerable(r) || E.propertyIsEnumerable(r) ? "def" : C.propertyIsEnumerable(r) || I.propertyIsEnumerable(r) || z.propertyIsEnumerable(r) ? "string" : L.propertyIsEnumerable(r) ? "typeName.standard" : M.propertyIsEnumerable(r) ? "modifier" : S.propertyIsEnumerable(r) ? "atom" : "variable";
54
- }
55
- function N(e) {
56
- return function(t, n) {
57
- for (var r = !1, c, f = !1; (c = t.next()) != null; ) {
58
- if (c == e && !r) {
59
- var s = t.peek();
60
- s && (s = s.toLowerCase(), (s == "b" || s == "h" || s == "o") && t.next()), f = !0;
61
- break;
62
- }
63
- r = !r && c == "\\";
64
- }
65
- return f && (n.tokenize = null), "string";
66
- };
67
- }
68
- function m(e, t) {
69
- for (var n = !1, r; r = e.next(); ) {
70
- if (r == "/" && n) {
71
- t.tokenize = null;
72
- break;
73
- }
74
- n = r == "*";
75
- }
76
- return "comment";
77
- }
78
- function b(e, t, n, r, c) {
79
- this.indented = e, this.column = t, this.type = n, this.align = r, this.prev = c;
80
- }
81
- function a(e, t, n) {
82
- var r = e.indented;
83
- return e.context && e.context.type == "statement" && (r = e.context.indented), e.context = new b(r, t, n, null, e.context);
84
- }
85
- function u(e) {
86
- var t = e.context.type;
87
- return (t == ")" || t == "]" || t == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
88
- }
89
- const $ = {
90
- name: "ttcn",
91
- startState: function() {
92
- return {
93
- tokenize: null,
94
- context: new b(0, 0, "top", !1),
95
- indented: 0,
96
- startOfLine: !0
97
- };
98
- },
99
- token: function(e, t) {
100
- var n = t.context;
101
- if (e.sol() && (n.align == null && (n.align = !1), t.indented = e.indentation(), t.startOfLine = !0), e.eatSpace()) return null;
102
- l = null;
103
- var r = (t.tokenize || T)(e, t);
104
- if (r == "comment") return r;
105
- if (n.align == null && (n.align = !0), (l == ";" || l == ":" || l == ",") && n.type == "statement")
106
- u(t);
107
- else if (l == "{") a(t, e.column(), "}");
108
- else if (l == "[") a(t, e.column(), "]");
109
- else if (l == "(") a(t, e.column(), ")");
110
- else if (l == "}") {
111
- for (; n.type == "statement"; ) n = u(t);
112
- for (n.type == "}" && (n = u(t)); n.type == "statement"; ) n = u(t);
113
- } else l == n.type ? u(t) : W && ((n.type == "}" || n.type == "top") && l != ";" || n.type == "statement" && l == "newstatement") && a(t, e.column(), "statement");
114
- return t.startOfLine = !1, r;
115
- },
116
- languageData: {
117
- indentOnInput: /^\s*[{}]$/,
118
- commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
119
- autocomplete: h
120
- }
121
- };
122
- export {
123
- $ as ttcn
124
- };
@@ -1,89 +0,0 @@
1
- import "./index.css";
2
- function I(e) {
3
- for (var n = {}, T = e.split(" "), E = 0; E < T.length; ++E)
4
- n[T[E]] = !0;
5
- return n;
6
- }
7
- const r = {
8
- keywords: I("Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress"),
9
- fileNCtrlMaskOptions: I("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"),
10
- externalCommands: I("BeginControlPart EndControlPart BeginTestCase EndTestCase")
11
- };
12
- var A = r.keywords, U = r.fileNCtrlMaskOptions, R = r.externalCommands, S = r.indentStatements !== !1, O = /[\|]/, t;
13
- function u(e, n) {
14
- var T = e.next();
15
- if (T == '"' || T == "'")
16
- return n.tokenize = P(T), n.tokenize(e, n);
17
- if (/[:=]/.test(T))
18
- return t = T, "punctuation";
19
- if (T == "#")
20
- return e.skipToEnd(), "comment";
21
- if (/\d/.test(T))
22
- return e.eatWhile(/[\w\.]/), "number";
23
- if (O.test(T))
24
- return e.eatWhile(O), "operator";
25
- if (T == "[")
26
- return e.eatWhile(/[\w_\]]/), "number";
27
- e.eatWhile(/[\w\$_]/);
28
- var E = e.current();
29
- return A.propertyIsEnumerable(E) ? "keyword" : U.propertyIsEnumerable(E) ? "atom" : R.propertyIsEnumerable(E) ? "deleted" : "variable";
30
- }
31
- function P(e) {
32
- return function(n, T) {
33
- for (var E = !1, i, l = !1; (i = n.next()) != null; ) {
34
- if (i == e && !E) {
35
- var C = n.peek();
36
- C && (C = C.toLowerCase(), (C == "b" || C == "h" || C == "o") && n.next()), l = !0;
37
- break;
38
- }
39
- E = !E && i == "\\";
40
- }
41
- return l && (T.tokenize = null), "string";
42
- };
43
- }
44
- function _(e, n, T, E, i) {
45
- this.indented = e, this.column = n, this.type = T, this.align = E, this.prev = i;
46
- }
47
- function N(e, n, T) {
48
- var E = e.indented;
49
- return e.context && e.context.type == "statement" && (E = e.context.indented), e.context = new _(E, n, T, null, e.context);
50
- }
51
- function o(e) {
52
- var n = e.context.type;
53
- return (n == ")" || n == "]" || n == "}") && (e.indented = e.context.indented), e.context = e.context.prev;
54
- }
55
- const D = {
56
- name: "ttcn",
57
- startState: function() {
58
- return {
59
- tokenize: null,
60
- context: new _(0, 0, "top", !1),
61
- indented: 0,
62
- startOfLine: !0
63
- };
64
- },
65
- token: function(e, n) {
66
- var T = n.context;
67
- if (e.sol() && (T.align == null && (T.align = !1), n.indented = e.indentation(), n.startOfLine = !0), e.eatSpace()) return null;
68
- t = null;
69
- var E = (n.tokenize || u)(e, n);
70
- if (E == "comment") return E;
71
- if (T.align == null && (T.align = !0), (t == ";" || t == ":" || t == ",") && T.type == "statement")
72
- o(n);
73
- else if (t == "{") N(n, e.column(), "}");
74
- else if (t == "[") N(n, e.column(), "]");
75
- else if (t == "(") N(n, e.column(), ")");
76
- else if (t == "}") {
77
- for (; T.type == "statement"; ) T = o(n);
78
- for (T.type == "}" && (T = o(n)); T.type == "statement"; ) T = o(n);
79
- } else t == T.type ? o(n) : S && ((T.type == "}" || T.type == "top") && t != ";" || T.type == "statement" && t == "newstatement") && N(n, e.column(), "statement");
80
- return n.startOfLine = !1, E;
81
- },
82
- languageData: {
83
- indentOnInput: /^\s*[{}]$/,
84
- commentTokens: { line: "#" }
85
- }
86
- };
87
- export {
88
- D as ttcnCfg
89
- };
@@ -1,81 +0,0 @@
1
- import "./index.css";
2
- var r;
3
- function p(e) {
4
- return new RegExp("^(?:" + e.join("|") + ")$", "i");
5
- }
6
- p([]);
7
- var d = p(["@prefix", "@base", "a"]), f = /[*+\-<>=&|]/;
8
- function x(e, n) {
9
- var t = e.next();
10
- if (r = null, t == "<" && !e.match(/^[\s\u00a0=]/, !1))
11
- return e.match(/^[^\s\u00a0>]*>?/), "atom";
12
- if (t == '"' || t == "'")
13
- return n.tokenize = v(t), n.tokenize(e, n);
14
- if (/[{}\(\),\.;\[\]]/.test(t))
15
- return r = t, null;
16
- if (t == "#")
17
- return e.skipToEnd(), "comment";
18
- if (f.test(t))
19
- return e.eatWhile(f), null;
20
- if (t == ":")
21
- return "operator";
22
- if (e.eatWhile(/[_\w\d]/), e.peek() == ":")
23
- return "variableName.special";
24
- var i = e.current();
25
- return d.test(i) ? "meta" : t >= "A" && t <= "Z" ? "comment" : "keyword";
26
- var i = e.current();
27
- }
28
- function v(e) {
29
- return function(n, t) {
30
- for (var i = !1, o; (o = n.next()) != null; ) {
31
- if (o == e && !i) {
32
- t.tokenize = x;
33
- break;
34
- }
35
- i = !i && o == "\\";
36
- }
37
- return "string";
38
- };
39
- }
40
- function l(e, n, t) {
41
- e.context = { prev: e.context, indent: e.indent, col: t, type: n };
42
- }
43
- function c(e) {
44
- e.indent = e.context.indent, e.context = e.context.prev;
45
- }
46
- const k = {
47
- name: "turtle",
48
- startState: function() {
49
- return {
50
- tokenize: x,
51
- context: null,
52
- indent: 0,
53
- col: 0
54
- };
55
- },
56
- token: function(e, n) {
57
- if (e.sol() && (n.context && n.context.align == null && (n.context.align = !1), n.indent = e.indentation()), e.eatSpace()) return null;
58
- var t = n.tokenize(e, n);
59
- if (t != "comment" && n.context && n.context.align == null && n.context.type != "pattern" && (n.context.align = !0), r == "(") l(n, ")", e.column());
60
- else if (r == "[") l(n, "]", e.column());
61
- else if (r == "{") l(n, "}", e.column());
62
- else if (/[\]\}\)]/.test(r)) {
63
- for (; n.context && n.context.type == "pattern"; ) c(n);
64
- n.context && r == n.context.type && c(n);
65
- } else r == "." && n.context && n.context.type == "pattern" ? c(n) : /atom|string|variable/.test(t) && n.context && (/[\}\]]/.test(n.context.type) ? l(n, "pattern", e.column()) : n.context.type == "pattern" && !n.context.align && (n.context.align = !0, n.context.col = e.column()));
66
- return t;
67
- },
68
- indent: function(e, n, t) {
69
- var i = n && n.charAt(0), o = e.context;
70
- if (/[\]\}]/.test(i))
71
- for (; o && o.type == "pattern"; ) o = o.prev;
72
- var u = o && i == o.type;
73
- return o ? o.type == "pattern" ? o.col : o.align ? o.col + (u ? 0 : 1) : o.indent + (u ? 0 : t.unit) : 0;
74
- },
75
- languageData: {
76
- commentTokens: { line: "#" }
77
- }
78
- };
79
- export {
80
- k as turtle
81
- };
@@ -1,75 +0,0 @@
1
- import "./index.css";
2
- var u = "error";
3
- function o(e) {
4
- return new RegExp("^((" + e.join(")|(") + "))\\b", "i");
5
- }
6
- var b = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"), k = new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"), m = new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"), x = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"), I = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"), R = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"), a = ["class", "module", "sub", "enum", "select", "while", "if", "function", "get", "set", "property", "try", "structure", "synclock", "using", "with"], f = ["else", "elseif", "case", "catch", "finally"], h = ["next", "loop"], p = ["and", "andalso", "or", "orelse", "xor", "in", "not", "is", "isnot", "like"], O = o(p), s = ["#const", "#else", "#elseif", "#end", "#if", "#region", "addhandler", "addressof", "alias", "as", "byref", "byval", "cbool", "cbyte", "cchar", "cdate", "cdbl", "cdec", "cint", "clng", "cobj", "compare", "const", "continue", "csbyte", "cshort", "csng", "cstr", "cuint", "culng", "cushort", "declare", "default", "delegate", "dim", "directcast", "each", "erase", "error", "event", "exit", "explicit", "false", "for", "friend", "gettype", "goto", "handles", "implements", "imports", "infer", "inherits", "interface", "isfalse", "istrue", "lib", "me", "mod", "mustinherit", "mustoverride", "my", "mybase", "myclass", "namespace", "narrowing", "new", "nothing", "notinheritable", "notoverridable", "of", "off", "on", "operator", "option", "optional", "out", "overloads", "overridable", "overrides", "paramarray", "partial", "private", "protected", "public", "raiseevent", "readonly", "redim", "removehandler", "resume", "return", "shadows", "shared", "static", "step", "stop", "strict", "then", "throw", "to", "true", "trycast", "typeof", "until", "until", "when", "widening", "withevents", "writeonly"], v = ["object", "boolean", "char", "string", "byte", "sbyte", "short", "ushort", "int16", "uint16", "integer", "uinteger", "int32", "uint32", "long", "ulong", "int64", "uint64", "decimal", "single", "double", "float", "date", "datetime", "intptr", "uintptr"], z = o(s), E = o(v), C = '"', S = o(a), g = o(f), y = o(h), w = o(["end"]), T = o(["do"]);
7
- function l(e, n) {
8
- n.currentIndent++;
9
- }
10
- function c(e, n) {
11
- n.currentIndent--;
12
- }
13
- function d(e, n) {
14
- if (e.eatSpace())
15
- return null;
16
- var i = e.peek();
17
- if (i === "'")
18
- return e.skipToEnd(), "comment";
19
- if (e.match(/^((&H)|(&O))?[0-9\.a-f]/i, !1)) {
20
- var r = !1;
21
- if ((e.match(/^\d*\.\d+F?/i) || e.match(/^\d+\.\d*F?/) || e.match(/^\.\d+F?/)) && (r = !0), r)
22
- return e.eat(/J/i), "number";
23
- var t = !1;
24
- if (e.match(/^&H[0-9a-f]+/i) || e.match(/^&O[0-7]+/i) ? t = !0 : e.match(/^[1-9]\d*F?/) ? (e.eat(/J/i), t = !0) : e.match(/^0(?![\dx])/i) && (t = !0), t)
25
- return e.eat(/L/i), "number";
26
- }
27
- return e.match(C) ? (n.tokenize = F(e.current()), n.tokenize(e, n)) : e.match(I) || e.match(x) ? null : e.match(m) || e.match(b) || e.match(O) ? "operator" : e.match(k) ? null : e.match(T) ? (l(e, n), n.doInCurrentLine = !0, "keyword") : e.match(S) ? (n.doInCurrentLine ? n.doInCurrentLine = !1 : l(e, n), "keyword") : e.match(g) ? "keyword" : e.match(w) ? (c(e, n), c(e, n), "keyword") : e.match(y) ? (c(e, n), "keyword") : e.match(E) || e.match(z) ? "keyword" : e.match(R) ? "variable" : (e.next(), u);
28
- }
29
- function F(e) {
30
- var n = e.length == 1, i = "string";
31
- return function(r, t) {
32
- for (; !r.eol(); ) {
33
- if (r.eatWhile(/[^'"]/), r.match(e))
34
- return t.tokenize = d, i;
35
- r.eat(/['"]/);
36
- }
37
- return n && (t.tokenize = d), i;
38
- };
39
- }
40
- function K(e, n) {
41
- var i = n.tokenize(e, n), r = e.current();
42
- if (r === ".")
43
- return i = n.tokenize(e, n), i === "variable" ? "variable" : u;
44
- var t = "[({".indexOf(r);
45
- return t !== -1 && l(e, n), t = "])}".indexOf(r), t !== -1 && c(e, n) ? u : i;
46
- }
47
- const _ = {
48
- name: "vb",
49
- startState: function() {
50
- return {
51
- tokenize: d,
52
- lastToken: null,
53
- currentIndent: 0,
54
- nextLineIndent: 0,
55
- doInCurrentLine: !1
56
- };
57
- },
58
- token: function(e, n) {
59
- e.sol() && (n.currentIndent += n.nextLineIndent, n.nextLineIndent = 0, n.doInCurrentLine = 0);
60
- var i = K(e, n);
61
- return n.lastToken = { style: i, content: e.current() }, i;
62
- },
63
- indent: function(e, n, i) {
64
- var r = n.replace(/^\s+|\s+$/g, "");
65
- return r.match(y) || r.match(w) || r.match(g) ? i.unit * (e.currentIndent - 1) : e.currentIndent < 0 ? 0 : e.currentIndent * i.unit;
66
- },
67
- languageData: {
68
- closeBrackets: { brackets: ["(", "[", "{", '"'] },
69
- commentTokens: { line: "'" },
70
- autocomplete: a.concat(f).concat(h).concat(p).concat(s).concat(v)
71
- }
72
- };
73
- export {
74
- _ as vb
75
- };