@sheetxl/sdk 0.6.6 → 0.6.7
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.
- package/browser/cjs/{DqVdtdMPltxoaSoj.cjs → B1ayxODktwnUMFBC.cjs} +1 -1
- package/browser/cjs/B8keb-2RLdorZhoO.cjs +7 -0
- package/browser/cjs/{CbZlSSKXhdRftp7-.cjs → B8puumo3jyG_Kjf8.cjs} +1 -1
- package/browser/cjs/{BXbJ3tSi9hx1njTO.cjs → BHxMVsH_4O231uhJ.cjs} +1 -1
- package/browser/cjs/{BbNxoKfNh8rtHZ05.cjs → BM_1D4HLOg_EW6Wa.cjs} +1 -1
- package/browser/cjs/{DxbHdnrkzuYrOXA2.cjs → BMqcqI3WQfyq66jA.cjs} +3 -3
- package/browser/cjs/BQLOEqUTaStrh3PF.cjs +54 -0
- package/browser/cjs/BXS2RW3mnqWOUKpW.cjs +124 -0
- package/browser/cjs/{C-OtpB1ONiISz1Pv.cjs → BkJ1y2dRScYQcQ5G.cjs} +1 -1
- package/browser/cjs/{DO4t5ZG4ceD0uMnn.cjs → Bltcyefci0ecaO5n.cjs} +1 -1
- package/browser/cjs/{VuwSI2r6dYoA8eL_.cjs → BpD_KdcfSCQGec7S.cjs} +1 -1
- package/browser/cjs/{DsvaCB4HUlLoYqNT.cjs → CFYIsMu8xxPDpDVp.cjs} +1 -1
- package/browser/cjs/{Cdd7AjTjtRRO-TLn.cjs → CJkZ_0Q2bN-WjtJw.cjs} +1 -1
- package/browser/cjs/{omqRPtZXWxrc3xX8.cjs → CKAFapZwCWRkxaQ8.cjs} +1 -1
- package/browser/cjs/{CCnLYfIY5FmqXsft.cjs → CSQnlsAXfMAS6ZLj.cjs} +1 -1
- package/browser/cjs/{BhpUbwlRnsoFjUh-.cjs → CV_HRKeb86TvhDil.cjs} +1 -1
- package/browser/cjs/{BIE_Zy1l-0G2a1Bd.cjs → Cc01p6tmJvG7SLzy.cjs} +1 -1
- package/browser/cjs/{BSrCI40wa5Cuf_7j.cjs → CxoZgnrPmjVvCgae.cjs} +1 -1
- package/browser/cjs/{CKRM9Ol-4U4KS0RL.cjs → DY8_VoO9kgRISK7u.cjs} +1 -1
- package/browser/cjs/{FpTBNfEo51QkEK-X.cjs → D_n7IjyekPafY558.cjs} +1 -1
- package/browser/cjs/{DZV__ngw7U-9-YYS.cjs → Difi5xEsD76OucGs.cjs} +1 -1
- package/browser/cjs/{DPyEaAuam8YsoSqb.cjs → DqPG8lZP7OjVeCM6.cjs} +1 -1
- package/browser/cjs/{NtON2hc6wNJhpcht.cjs → EFswV_PZDSjF9xhv.cjs} +1 -1
- package/browser/cjs/{CBiWbQ6x7YB0i9Pj.cjs → JJWDO0nDM9puhamP.cjs} +1 -1
- package/browser/cjs/{DiVG2v2ZDzgKwaRx.cjs → Ra_UMDM4oKBgU81z.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BtIluyJ2B2fjoVxV.cjs → na0m_TtC1gCe38Kd.cjs} +1 -1
- package/browser/cjs/{Bs8MO69xr_tUFTWb.cjs → xbLmOwSide13vKQF.cjs} +1 -1
- package/browser/esm/{Dy1MPXX1hnDkr53Q.mjs → 6HCVzxpqbh15xSiN.mjs} +1 -1
- package/browser/esm/{BRgoMSpXo7fDOSWt.mjs → AfWwLpjsZK3Xnefl.mjs} +1 -1
- package/browser/esm/{CnmS1R-8lJ_sRiZr.mjs → B3--elLaGJoBEY_L.mjs} +1 -1
- package/browser/esm/{Bton8MoXcrdh3-iQ.mjs → BB2HQdoK-g7snVnO.mjs} +1 -1
- package/browser/esm/{BNJ3M4LVn1rfr1_R.mjs → BQZ_QYQtTNMGNXwR.mjs} +1 -1
- package/browser/esm/{paGhkNtzUuyqCkUg.mjs → BXszYvdrxd8oAzeU.mjs} +4 -4
- package/browser/esm/{DUKsZR10tZVr7WZd.mjs → BvMY1tAbpkjZ5iy-.mjs} +1 -1
- package/browser/esm/{Dd0x4mEePbYX45B3.mjs → C-Hqvf7rGCWcO977.mjs} +1 -1
- package/{node/esm/OjUVs9yHJQbHq8OD.mjs → browser/esm/CQQW2XjAcQLLG0t0.mjs} +1 -1
- package/{node/esm/BhAg6FTDoDkRcf9D.mjs → browser/esm/CR08yQcZqzfdqNsS.mjs} +1 -1
- package/{node/esm/sxtuUs9-MAibjEWc.mjs → browser/esm/CRS6izrcfqnISEm9.mjs} +1 -1
- package/browser/esm/{B6SR0BPXF3_HR9Gp.mjs → CWW_ZzclfqtbaF0y.mjs} +158 -158
- package/browser/esm/{D6QeD-EYnM6w98fy.mjs → Cu-dFGbN6BqrD9vF.mjs} +1 -1
- package/{node/esm/B7BEc4Msi2XlEIER.mjs → browser/esm/Cyy8L1eyERo8ybk-.mjs} +1 -1
- package/browser/esm/{cN12k06S_qMOUBeq.mjs → D38QRdiFDwf2Q7vd.mjs} +1 -1
- package/{node/esm/DmMIV1-nZOvaA844.mjs → browser/esm/DmQt7hSOmsK8So0R.mjs} +1 -1
- package/{node/esm/Dt_a2ot6PKKgpQ0r.mjs → browser/esm/DprfVGZfh-nH6Oep.mjs} +1 -1
- package/browser/esm/{BuabryqTvHfqYpLE.mjs → Nq7i1YKRWpP-JAJJ.mjs} +612 -569
- package/browser/esm/{CgcyircyUQrbljuy.mjs → O4dySiWWqDoIKeeY.mjs} +1 -1
- package/{node/esm/r6HjIuEn_D7VNa-4.mjs → browser/esm/R5Xr0d0EgMhe-uWK.mjs} +1 -1
- package/{node/esm/DsnUFEhJGCZ5o3I_.mjs → browser/esm/Rmuy-GhgJIZ92NYI.mjs} +1 -1
- package/browser/esm/{BljblkcMNgdoxdQg.mjs → UKDkYapuHOfa-hQG.mjs} +4871 -4843
- package/browser/esm/{BDbtwbWXXdqWLyPT.mjs → V4iwvDP7NcKwlrBx.mjs} +1 -1
- package/browser/esm/{B6VAiNb4zaeT9il5.mjs → YFQpy5F5V1eQw0Kt.mjs} +1 -1
- package/browser/esm/{NFVDFXIiRDXJlhKx.mjs → Z8Nn-EsR2ghgWe-o.mjs} +1 -1
- package/{node/esm/DjCgtM-GF-W0YS-p.mjs → browser/esm/gfO13QKh0RD_4pY6.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{CNkRKDvy18fA1EDx.mjs → wa0JB_y6NmzvoRKB.mjs} +1 -1
- package/licenses/dependencies.txt +1 -1
- package/node/esm/{CRWzbCYpQ48Mc7Oj.mjs → 0F_7Ra_Mg1rp_0x4.mjs} +1 -1
- package/node/esm/{BRgoMSpXo7fDOSWt.mjs → AfWwLpjsZK3Xnefl.mjs} +1 -1
- package/node/esm/{CnmS1R-8lJ_sRiZr.mjs → B3--elLaGJoBEY_L.mjs} +1 -1
- package/node/esm/{Fi47qQmSSnZbc-_T.mjs → BIwraEgJzTzK01gQ.mjs} +1 -1
- package/node/esm/{BJ5Ex-SSSvq3Ufb2.mjs → BOtOe-8nLAeM4o-4.mjs} +15 -15
- package/node/esm/{DZXvUlOI18ASk4cY.mjs → C94shI5CnIIJRtAo.mjs} +1 -1
- package/node/esm/{BXG28v6SWExbwtYv.mjs → CE2V9rdg6tG36hHp.mjs} +1 -1
- package/{browser/esm/OjUVs9yHJQbHq8OD.mjs → node/esm/CQQW2XjAcQLLG0t0.mjs} +1 -1
- package/{browser/esm/BhAg6FTDoDkRcf9D.mjs → node/esm/CR08yQcZqzfdqNsS.mjs} +1 -1
- package/{browser/esm/sxtuUs9-MAibjEWc.mjs → node/esm/CRS6izrcfqnISEm9.mjs} +1 -1
- package/node/esm/{D6QeD-EYnM6w98fy.mjs → Cu-dFGbN6BqrD9vF.mjs} +1 -1
- package/{browser/esm/B7BEc4Msi2XlEIER.mjs → node/esm/Cyy8L1eyERo8ybk-.mjs} +1 -1
- package/node/esm/{C21-iIYh5KUqwGUS.mjs → D2Mc05N33cJJIgFY.mjs} +15 -15
- package/node/esm/{cN12k06S_qMOUBeq.mjs → D38QRdiFDwf2Q7vd.mjs} +1 -1
- package/node/esm/{D4MZjiOfbcSU7TGx.mjs → DNlQg7Hxh_N16uoo.mjs} +1 -1
- package/{browser/esm/DmMIV1-nZOvaA844.mjs → node/esm/DmQt7hSOmsK8So0R.mjs} +1 -1
- package/{browser/esm/Dt_a2ot6PKKgpQ0r.mjs → node/esm/DprfVGZfh-nH6Oep.mjs} +1 -1
- package/node/esm/{D8LgT--BLc3SOBnq.mjs → Dxkwp4gqxvOCj07H.mjs} +1 -1
- package/{browser/esm/r6HjIuEn_D7VNa-4.mjs → node/esm/R5Xr0d0EgMhe-uWK.mjs} +1 -1
- package/{browser/esm/DsnUFEhJGCZ5o3I_.mjs → node/esm/Rmuy-GhgJIZ92NYI.mjs} +1 -1
- package/node/esm/{BDbtwbWXXdqWLyPT.mjs → V4iwvDP7NcKwlrBx.mjs} +1 -1
- package/node/esm/{NFVDFXIiRDXJlhKx.mjs → Z8Nn-EsR2ghgWe-o.mjs} +1 -1
- package/{browser/esm/DjCgtM-GF-W0YS-p.mjs → node/esm/gfO13QKh0RD_4pY6.mjs} +1 -1
- package/node/esm/index.mjs +3185 -3156
- package/node/esm/{Cvy5UTha3amXG2Vm.mjs → mLbyGFmnqVEUU5k1.mjs} +1 -1
- package/node/esm/{CNkRKDvy18fA1EDx.mjs → wa0JB_y6NmzvoRKB.mjs} +1 -1
- package/package.json +4 -4
- package/types/index.d.ts +48 -2
- package/types/scripting.d.ts +17963 -17903
- package/browser/cjs/AEppYLzHcTcmM3v0.cjs +0 -54
- package/browser/cjs/C-eF8qM1EIdQznkH.cjs +0 -7
- package/browser/cjs/PDVoAoWxxix7hOyp.cjs +0 -124
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { c as Pe, t as we, g as $s, a as Ws, b as Ke, d as Un, e as Gs, r as zs, m as Ve, f as Ks } from "./
|
|
1
|
+
import { c as Pe, t as we, g as $s, a as Ws, b as Ke, d as Un, e as Gs, r as zs, m as Ve, f as Ks } from "./UKDkYapuHOfa-hQG.mjs";
|
|
2
2
|
import { FormulaError as U, ScalarType as re } from "@sheetxl/primitives";
|
|
3
3
|
import { CoordUtils as Vt, CommonUtils as lt } from "@sheetxl/utils";
|
|
4
4
|
/**
|
|
5
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.6.
|
|
5
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.6.7
|
|
6
6
|
*
|
|
7
7
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
8
8
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
9
9
|
*/
|
|
10
10
|
var xo = typeof global == "object" && global && global.Object === Object && global, Vs = typeof self == "object" && self && self.Object === Object && self, kt = xo || Vs || Function("return this")(), gt = kt.Symbol, Co = Object.prototype, Hs = Co.hasOwnProperty, Ys = Co.toString, Ae = gt ? gt.toStringTag : void 0, Xs = Object.prototype.toString, qr = gt ? gt.toStringTag : void 0;
|
|
11
11
|
function qt(t) {
|
|
12
|
-
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : qr && qr in Object(t) ? function(e) {
|
|
12
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : qr && qr in Object(t) ? (function(e) {
|
|
13
13
|
var n = Hs.call(e, Ae), r = e[Ae];
|
|
14
14
|
try {
|
|
15
15
|
e[Ae] = void 0;
|
|
@@ -18,9 +18,9 @@ function qt(t) {
|
|
|
18
18
|
}
|
|
19
19
|
var o = Ys.call(e);
|
|
20
20
|
return i && (n ? e[Ae] = r : delete e[Ae]), o;
|
|
21
|
-
}(t) : function(e) {
|
|
21
|
+
})(t) : (function(e) {
|
|
22
22
|
return Xs.call(e);
|
|
23
|
-
}(t);
|
|
23
|
+
})(t);
|
|
24
24
|
}
|
|
25
25
|
function yt(t) {
|
|
26
26
|
return t != null && typeof t == "object";
|
|
@@ -42,10 +42,10 @@ function ko(t) {
|
|
|
42
42
|
}
|
|
43
43
|
var qs = /\s/, Zs = /^\s+/;
|
|
44
44
|
function Qs(t) {
|
|
45
|
-
return t && t.slice(0, function(e) {
|
|
45
|
+
return t && t.slice(0, (function(e) {
|
|
46
46
|
for (var n = e.length; n-- && qs.test(e.charAt(n)); ) ;
|
|
47
47
|
return n;
|
|
48
|
-
}(t) + 1).replace(Zs, "");
|
|
48
|
+
})(t) + 1).replace(Zs, "");
|
|
49
49
|
}
|
|
50
50
|
function Tt(t) {
|
|
51
51
|
var e = typeof t;
|
|
@@ -53,7 +53,7 @@ function Tt(t) {
|
|
|
53
53
|
}
|
|
54
54
|
var Js = /^[-+]0x[0-9a-f]+$/i, ta = /^0b[01]+$/i, ea = /^0o[0-7]+$/i, na = parseInt, ra = 1 / 0;
|
|
55
55
|
function ia(t) {
|
|
56
|
-
return t ? (t = function(e) {
|
|
56
|
+
return t ? (t = (function(e) {
|
|
57
57
|
if (typeof e == "number") return e;
|
|
58
58
|
if (vn(e)) return NaN;
|
|
59
59
|
if (Tt(e)) {
|
|
@@ -64,7 +64,7 @@ function ia(t) {
|
|
|
64
64
|
e = Qs(e);
|
|
65
65
|
var r = ta.test(e);
|
|
66
66
|
return r || ea.test(e) ? na(e.slice(2), r ? 2 : 8) : Js.test(e) ? NaN : +e;
|
|
67
|
-
}(t)) === ra || t === -1 / 0 ? 17976931348623157e292 * (t < 0 ? -1 : 1) : t == t ? t : 0 : t === 0 ? t : 0;
|
|
67
|
+
})(t)) === ra || t === -1 / 0 ? 17976931348623157e292 * (t < 0 ? -1 : 1) : t == t ? t : 0 : t === 0 ? t : 0;
|
|
68
68
|
}
|
|
69
69
|
function yn(t) {
|
|
70
70
|
var e = ia(t), n = e % 1;
|
|
@@ -98,12 +98,12 @@ function fa(t) {
|
|
|
98
98
|
var e;
|
|
99
99
|
}
|
|
100
100
|
function oe(t, e) {
|
|
101
|
-
var n = function(r, i) {
|
|
101
|
+
var n = (function(r, i) {
|
|
102
102
|
return r?.[i];
|
|
103
|
-
}(t, e);
|
|
103
|
+
})(t, e);
|
|
104
104
|
return fa(n) ? n : void 0;
|
|
105
105
|
}
|
|
106
|
-
var lr = oe(kt, "WeakMap"), ei = Object.create, da = /* @__PURE__ */ function() {
|
|
106
|
+
var lr = oe(kt, "WeakMap"), ei = Object.create, da = /* @__PURE__ */ (function() {
|
|
107
107
|
function t() {
|
|
108
108
|
}
|
|
109
109
|
return function(e) {
|
|
@@ -113,16 +113,16 @@ var lr = oe(kt, "WeakMap"), ei = Object.create, da = /* @__PURE__ */ function()
|
|
|
113
113
|
var n = new t();
|
|
114
114
|
return t.prototype = void 0, n;
|
|
115
115
|
};
|
|
116
|
-
}();
|
|
116
|
+
})();
|
|
117
117
|
function q() {
|
|
118
118
|
}
|
|
119
|
-
var pa = Date.now, ni, Dn, jn, ln = function() {
|
|
119
|
+
var pa = Date.now, ni, Dn, jn, ln = (function() {
|
|
120
120
|
try {
|
|
121
121
|
var t = oe(Object, "defineProperty");
|
|
122
122
|
return t({}, "", {}), t;
|
|
123
123
|
} catch {
|
|
124
124
|
}
|
|
125
|
-
}(), ma = ln ? function(t, e) {
|
|
125
|
+
})(), ma = ln ? function(t, e) {
|
|
126
126
|
return ln(t, "toString", { configurable: !0, enumerable: !1, value: (n = e, function() {
|
|
127
127
|
return n;
|
|
128
128
|
}), writable: !0 });
|
|
@@ -146,10 +146,10 @@ function ga(t) {
|
|
|
146
146
|
return t != t;
|
|
147
147
|
}
|
|
148
148
|
function Sr(t, e, n) {
|
|
149
|
-
return e == e ? function(r, i, o) {
|
|
149
|
+
return e == e ? (function(r, i, o) {
|
|
150
150
|
for (var s = o - 1, a = r.length; ++s < a; ) if (r[s] === i) return s;
|
|
151
151
|
return -1;
|
|
152
|
-
}(t, e, n) : Po(t, ga, n);
|
|
152
|
+
})(t, e, n) : Po(t, ga, n);
|
|
153
153
|
}
|
|
154
154
|
function wo(t, e) {
|
|
155
155
|
return !!(t != null && t.length) && Sr(t, e, 0) > -1;
|
|
@@ -181,12 +181,12 @@ function hr(t, e, n, r) {
|
|
|
181
181
|
}
|
|
182
182
|
var ri = Math.max;
|
|
183
183
|
function Lr(t, e) {
|
|
184
|
-
return Ea(function(n, r, i) {
|
|
184
|
+
return Ea((function(n, r, i) {
|
|
185
185
|
return r = ri(r === void 0 ? n.length - 1 : r, 0), function() {
|
|
186
186
|
for (var o = arguments, s = -1, a = ri(o.length - r, 0), c = Array(a); ++s < a; ) c[s] = o[r + s];
|
|
187
187
|
s = -1;
|
|
188
188
|
for (var u = Array(r + 1); ++s < r; ) u[s] = o[s];
|
|
189
|
-
return u[r] = i(c), function(l, h, f) {
|
|
189
|
+
return u[r] = i(c), (function(l, h, f) {
|
|
190
190
|
switch (f.length) {
|
|
191
191
|
case 0:
|
|
192
192
|
return l.call(h);
|
|
@@ -198,9 +198,9 @@ function Lr(t, e) {
|
|
|
198
198
|
return l.call(h, f[0], f[1], f[2]);
|
|
199
199
|
}
|
|
200
200
|
return l.apply(h, f);
|
|
201
|
-
}(n, this, u);
|
|
201
|
+
})(n, this, u);
|
|
202
202
|
};
|
|
203
|
-
}(t, e, de), t + "");
|
|
203
|
+
})(t, e, de), t + "");
|
|
204
204
|
}
|
|
205
205
|
function xr(t) {
|
|
206
206
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= 9007199254740991;
|
|
@@ -221,9 +221,9 @@ function $e(t) {
|
|
|
221
221
|
function ii(t) {
|
|
222
222
|
return yt(t) && qt(t) == "[object Arguments]";
|
|
223
223
|
}
|
|
224
|
-
var Uo = Object.prototype, va = Uo.hasOwnProperty, Na = Uo.propertyIsEnumerable, Sn = ii(/* @__PURE__ */ function() {
|
|
224
|
+
var Uo = Object.prototype, va = Uo.hasOwnProperty, Na = Uo.propertyIsEnumerable, Sn = ii(/* @__PURE__ */ (function() {
|
|
225
225
|
return arguments;
|
|
226
|
-
}()) ? ii : function(t) {
|
|
226
|
+
})()) ? ii : function(t) {
|
|
227
227
|
return yt(t) && va.call(t, "callee") && !Na.call(t, "callee");
|
|
228
228
|
}, Fo = typeof exports == "object" && exports && !exports.nodeType && exports, oi = Fo && typeof module == "object" && module && !module.nodeType && module, si = oi && oi.exports === Fo ? kt.Buffer : void 0, Me = (si ? si.isBuffer : void 0) || function() {
|
|
229
229
|
return !1;
|
|
@@ -234,20 +234,20 @@ function _n(t) {
|
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
z["[object Float32Array]"] = z["[object Float64Array]"] = z["[object Int8Array]"] = z["[object Int16Array]"] = z["[object Int32Array]"] = z["[object Uint8Array]"] = z["[object Uint8ClampedArray]"] = z["[object Uint16Array]"] = z["[object Uint32Array]"] = !0, z["[object Arguments]"] = z["[object Array]"] = z["[object ArrayBuffer]"] = z["[object Boolean]"] = z["[object DataView]"] = z["[object Date]"] = z["[object Error]"] = z["[object Function]"] = z["[object Map]"] = z["[object Number]"] = z["[object Object]"] = z["[object RegExp]"] = z["[object Set]"] = z["[object String]"] = z["[object WeakMap]"] = !1;
|
|
237
|
-
var Do = typeof exports == "object" && exports && !exports.nodeType && exports, Le = Do && typeof module == "object" && module && !module.nodeType && module, Bn = Le && Le.exports === Do && xo.process, Yt = function() {
|
|
237
|
+
var Do = typeof exports == "object" && exports && !exports.nodeType && exports, Le = Do && typeof module == "object" && module && !module.nodeType && module, Bn = Le && Le.exports === Do && xo.process, Yt = (function() {
|
|
238
238
|
try {
|
|
239
239
|
var t = Le && Le.require && Le.require("util").types;
|
|
240
240
|
return t || Bn && Bn.binding && Bn.binding("util");
|
|
241
241
|
} catch {
|
|
242
242
|
}
|
|
243
|
-
}(), ai = Yt && Yt.isTypedArray, Cr = ai ? _n(ai) : function(t) {
|
|
243
|
+
})(), ai = Yt && Yt.isTypedArray, Cr = ai ? _n(ai) : function(t) {
|
|
244
244
|
return yt(t) && xr(t.length) && !!z[qt(t)];
|
|
245
245
|
}, ya = Object.prototype.hasOwnProperty;
|
|
246
246
|
function jo(t, e) {
|
|
247
|
-
var n = D(t), r = !n && Sn(t), i = !n && !r && Me(t), o = !n && !r && !i && Cr(t), s = n || r || i || o, a = s ? function(l, h) {
|
|
247
|
+
var n = D(t), r = !n && Sn(t), i = !n && !r && Me(t), o = !n && !r && !i && Cr(t), s = n || r || i || o, a = s ? (function(l, h) {
|
|
248
248
|
for (var f = -1, d = Array(l); ++f < l; ) d[f] = h(f);
|
|
249
249
|
return d;
|
|
250
|
-
}(t.length, String) : [], c = a.length;
|
|
250
|
+
})(t.length, String) : [], c = a.length;
|
|
251
251
|
for (var u in t) !e && !ya.call(t, u) || s && (u == "length" || i && (u == "offset" || u == "parent") || o && (u == "buffer" || u == "byteLength" || u == "byteOffset") || Rn(u, c)) || a.push(u);
|
|
252
252
|
return a;
|
|
253
253
|
}
|
|
@@ -278,11 +278,11 @@ var $n, Sa = Object.prototype.hasOwnProperty, ht = ($n = function(t, e) {
|
|
|
278
278
|
return t;
|
|
279
279
|
})), _a = Object.prototype.hasOwnProperty;
|
|
280
280
|
function La(t) {
|
|
281
|
-
if (!Tt(t)) return function(i) {
|
|
281
|
+
if (!Tt(t)) return (function(i) {
|
|
282
282
|
var o = [];
|
|
283
283
|
if (i != null) for (var s in Object(i)) o.push(s);
|
|
284
284
|
return o;
|
|
285
|
-
}(t);
|
|
285
|
+
})(t);
|
|
286
286
|
var e = $e(t), n = [];
|
|
287
287
|
for (var r in t) (r != "constructor" || !e && _a.call(t, r)) && n.push(r);
|
|
288
288
|
return n;
|
|
@@ -385,21 +385,21 @@ function br(t, e) {
|
|
|
385
385
|
return n.cache = new (br.Cache || Wt)(), n;
|
|
386
386
|
}
|
|
387
387
|
br.Cache = Wt;
|
|
388
|
-
var wa = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ma = /\\(\\)?/g, Ua = function(t) {
|
|
388
|
+
var wa = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ma = /\\(\\)?/g, Ua = (function(t) {
|
|
389
389
|
var e = br(t, function(r) {
|
|
390
390
|
return n.size === 500 && n.clear(), r;
|
|
391
391
|
}), n = e.cache;
|
|
392
392
|
return e;
|
|
393
|
-
}(function(t) {
|
|
393
|
+
})(function(t) {
|
|
394
394
|
var e = [];
|
|
395
395
|
return t.charCodeAt(0) === 46 && e.push(""), t.replace(wa, function(n, r, i, o) {
|
|
396
396
|
e.push(i ? o.replace(Ma, "$1") : r || n);
|
|
397
397
|
}), e;
|
|
398
398
|
});
|
|
399
399
|
function Ln(t, e) {
|
|
400
|
-
return D(t) ? t : kr(t, e) ? [t] : Ua(function(n) {
|
|
400
|
+
return D(t) ? t : kr(t, e) ? [t] : Ua((function(n) {
|
|
401
401
|
return n == null ? "" : ko(n);
|
|
402
|
-
}(t));
|
|
402
|
+
})(t));
|
|
403
403
|
}
|
|
404
404
|
function We(t) {
|
|
405
405
|
if (typeof t == "string" || vn(t)) return t;
|
|
@@ -526,10 +526,10 @@ function Ya(t, e, n) {
|
|
|
526
526
|
case "[object Uint8ClampedArray]":
|
|
527
527
|
case "[object Uint16Array]":
|
|
528
528
|
case "[object Uint32Array]":
|
|
529
|
-
return function(u) {
|
|
529
|
+
return (function(u) {
|
|
530
530
|
var l = u.buffer;
|
|
531
531
|
return new u.constructor(l, u.byteOffset, u.length);
|
|
532
|
-
}(t);
|
|
532
|
+
})(t);
|
|
533
533
|
case "[object Map]":
|
|
534
534
|
case "[object Set]":
|
|
535
535
|
return new c();
|
|
@@ -537,10 +537,10 @@ function Ya(t, e, n) {
|
|
|
537
537
|
case "[object String]":
|
|
538
538
|
return new c(t);
|
|
539
539
|
case "[object RegExp]":
|
|
540
|
-
return function(u) {
|
|
540
|
+
return (function(u) {
|
|
541
541
|
var l = new u.constructor(u.source, Ha.exec(u));
|
|
542
542
|
return l.lastIndex = u.lastIndex, l;
|
|
543
|
-
}(t);
|
|
543
|
+
})(t);
|
|
544
544
|
case "[object Symbol]":
|
|
545
545
|
return r = t, Ai ? Object(Ai.call(r)) : {};
|
|
546
546
|
}
|
|
@@ -555,26 +555,26 @@ function nn(t, e, n, r, i, o) {
|
|
|
555
555
|
if (s !== void 0) return s;
|
|
556
556
|
if (!Tt(t)) return t;
|
|
557
557
|
var a = D(t);
|
|
558
|
-
if (a) return s = function(f) {
|
|
558
|
+
if (a) return s = (function(f) {
|
|
559
559
|
var d = f.length, E = new f.constructor(d);
|
|
560
560
|
return d && typeof f[0] == "string" && Va.call(f, "index") && (E.index = f.index, E.input = f.input), E;
|
|
561
|
-
}(t), function(f, d) {
|
|
561
|
+
})(t), (function(f, d) {
|
|
562
562
|
var E = -1, I = f.length;
|
|
563
563
|
for (d || (d = Array(I)); ++E < I; ) d[E] = f[E];
|
|
564
564
|
return d;
|
|
565
|
-
}(t, s);
|
|
565
|
+
})(t, s);
|
|
566
566
|
var c = mt(t), u = c == Xo || c == "[object GeneratorFunction]";
|
|
567
|
-
if (Me(t)) return function(f) {
|
|
567
|
+
if (Me(t)) return (function(f) {
|
|
568
568
|
var d = f.length, E = hi ? hi(d) : new f.constructor(d);
|
|
569
569
|
return f.copy(E), E;
|
|
570
|
-
}(t);
|
|
571
|
-
if (c == qo || c == Yo || u && !i) return s = u ? {} : function(f) {
|
|
570
|
+
})(t);
|
|
571
|
+
if (c == qo || c == Yo || u && !i) return s = u ? {} : (function(f) {
|
|
572
572
|
return typeof f.constructor != "function" || $e(f) ? {} : da(Go(f));
|
|
573
|
-
}(t), function(f, d) {
|
|
573
|
+
})(t), (function(f, d) {
|
|
574
574
|
return hr(f, Fr(f), d);
|
|
575
|
-
}(t, function(f, d) {
|
|
575
|
+
})(t, (function(f, d) {
|
|
576
576
|
return f && hr(d, At(d), f);
|
|
577
|
-
}(s, t));
|
|
577
|
+
})(s, t));
|
|
578
578
|
if (!W[c]) return i ? t : {};
|
|
579
579
|
s = Ya(t, c), o || (o = new xt());
|
|
580
580
|
var l = o.get(t);
|
|
@@ -663,7 +663,7 @@ function Ja(t, e, n, r, i, o) {
|
|
|
663
663
|
if (!Me(e)) return !1;
|
|
664
664
|
s = !0, l = !1;
|
|
665
665
|
}
|
|
666
|
-
if (f && !l) return o || (o = new xt()), s || Cr(t) ? Ni(t, e, n, r, i, o) : function(T, m, p, A, O, g, R) {
|
|
666
|
+
if (f && !l) return o || (o = new xt()), s || Cr(t) ? Ni(t, e, n, r, i, o) : (function(T, m, p, A, O, g, R) {
|
|
667
667
|
switch (p) {
|
|
668
668
|
case "[object DataView]":
|
|
669
669
|
if (T.byteLength != m.byteLength || T.byteOffset != m.byteOffset) return !1;
|
|
@@ -693,7 +693,7 @@ function Ja(t, e, n, r, i, o) {
|
|
|
693
693
|
if (Wn) return Wn.call(T) == Wn.call(m);
|
|
694
694
|
}
|
|
695
695
|
return !1;
|
|
696
|
-
}(t, e, c, n, r, i, o);
|
|
696
|
+
})(t, e, c, n, r, i, o);
|
|
697
697
|
if (!(1 & n)) {
|
|
698
698
|
var d = l && Si.call(t, "__wrapped__"), E = h && Si.call(e, "__wrapped__");
|
|
699
699
|
if (d || E) {
|
|
@@ -701,7 +701,7 @@ function Ja(t, e, n, r, i, o) {
|
|
|
701
701
|
return o || (o = new xt()), i(I, S, n, r, o);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
return !!f && (o || (o = new xt()), function(T, m, p, A, O, g) {
|
|
704
|
+
return !!f && (o || (o = new xt()), (function(T, m, p, A, O, g) {
|
|
705
705
|
var R = 1 & p, N = fr(T), v = N.length;
|
|
706
706
|
if (v != fr(m).length && !R) return !1;
|
|
707
707
|
for (var y = v; y--; ) {
|
|
@@ -726,7 +726,7 @@ function Ja(t, e, n, r, i, o) {
|
|
|
726
726
|
B == et || !("constructor" in T) || !("constructor" in m) || typeof B == "function" && B instanceof B && typeof et == "function" && et instanceof et || ($ = !1);
|
|
727
727
|
}
|
|
728
728
|
return g.delete(T), g.delete(m), $;
|
|
729
|
-
}(t, e, n, r, i, o));
|
|
729
|
+
})(t, e, n, r, i, o));
|
|
730
730
|
}
|
|
731
731
|
function Br(t, e, n, r, i) {
|
|
732
732
|
return t === e || (t == null || e == null || !yt(t) && !yt(e) ? t != t && e != e : Ja(t, e, n, r, Br, i));
|
|
@@ -740,15 +740,15 @@ function Jo(t, e) {
|
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
function tc(t) {
|
|
743
|
-
var e = function(n) {
|
|
743
|
+
var e = (function(n) {
|
|
744
744
|
for (var r = At(n), i = r.length; i--; ) {
|
|
745
745
|
var o = r[i], s = n[o];
|
|
746
746
|
r[i] = [o, s, Qo(s)];
|
|
747
747
|
}
|
|
748
748
|
return r;
|
|
749
|
-
}(t);
|
|
749
|
+
})(t);
|
|
750
750
|
return e.length == 1 && e[0][2] ? Jo(e[0][0], e[0][1]) : function(n) {
|
|
751
|
-
return n === t || function(r, i, o, s) {
|
|
751
|
+
return n === t || (function(r, i, o, s) {
|
|
752
752
|
var a = o.length, c = a;
|
|
753
753
|
if (r == null) return !c;
|
|
754
754
|
for (r = Object(r); a--; ) {
|
|
@@ -762,7 +762,7 @@ function tc(t) {
|
|
|
762
762
|
} else if (!Br(f, h, 3, s, new xt())) return !1;
|
|
763
763
|
}
|
|
764
764
|
return !0;
|
|
765
|
-
}(n, 0, e);
|
|
765
|
+
})(n, 0, e);
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
768
|
function ec(t, e) {
|
|
@@ -778,23 +778,23 @@ function ts(t, e, n) {
|
|
|
778
778
|
}
|
|
779
779
|
function nc(t, e) {
|
|
780
780
|
return kr(t) && Qo(e) ? Jo(We(t), e) : function(n) {
|
|
781
|
-
var r = function(i, o, s) {
|
|
781
|
+
var r = (function(i, o, s) {
|
|
782
782
|
var a = i == null ? void 0 : Pr(i, o);
|
|
783
783
|
return a === void 0 ? s : a;
|
|
784
|
-
}(n, t);
|
|
785
|
-
return r === void 0 && r === e ? function(i, o) {
|
|
784
|
+
})(n, t);
|
|
785
|
+
return r === void 0 && r === e ? (function(i, o) {
|
|
786
786
|
return i != null && ts(i, o, ec);
|
|
787
|
-
}(n, t) : Br(e, r, 3);
|
|
787
|
+
})(n, t) : Br(e, r, 3);
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
790
|
function rc(t) {
|
|
791
791
|
return kr(t) ? (e = We(t), function(n) {
|
|
792
792
|
return n?.[e];
|
|
793
|
-
}) : /* @__PURE__ */ function(n) {
|
|
793
|
+
}) : /* @__PURE__ */ (function(n) {
|
|
794
794
|
return function(r) {
|
|
795
795
|
return Pr(r, n);
|
|
796
796
|
};
|
|
797
|
-
}(t);
|
|
797
|
+
})(t);
|
|
798
798
|
var e;
|
|
799
799
|
}
|
|
800
800
|
function Ct(t) {
|
|
@@ -839,7 +839,7 @@ function Li(t) {
|
|
|
839
839
|
return yt(t) && bt(t);
|
|
840
840
|
}
|
|
841
841
|
var fn = Lr(function(t, e) {
|
|
842
|
-
return Li(t) ? function(n, r, i, o) {
|
|
842
|
+
return Li(t) ? (function(n, r, i, o) {
|
|
843
843
|
var s = -1, a = wo, c = !0, u = n.length, l = [], h = r.length;
|
|
844
844
|
if (!u) return l;
|
|
845
845
|
r.length >= 200 && (a = Dr, c = !1, r = new fe(r));
|
|
@@ -851,7 +851,7 @@ var fn = Lr(function(t, e) {
|
|
|
851
851
|
} else a(r, d, o) || l.push(f);
|
|
852
852
|
}
|
|
853
853
|
return l;
|
|
854
|
-
}(t, Mr(e, 0, Li, !0)) : [];
|
|
854
|
+
})(t, Mr(e, 0, Li, !0)) : [];
|
|
855
855
|
});
|
|
856
856
|
function pe(t) {
|
|
857
857
|
var e = t == null ? 0 : t.length;
|
|
@@ -938,11 +938,11 @@ function at(t) {
|
|
|
938
938
|
return typeof t == "string" || !D(t) && yt(t) && qt(t) == "[object String]";
|
|
939
939
|
}
|
|
940
940
|
function Z(t) {
|
|
941
|
-
return t == null ? [] : function(e, n) {
|
|
941
|
+
return t == null ? [] : (function(e, n) {
|
|
942
942
|
return Nn(n, function(r) {
|
|
943
943
|
return e[r];
|
|
944
944
|
});
|
|
945
|
-
}(t, At(t));
|
|
945
|
+
})(t, At(t));
|
|
946
946
|
}
|
|
947
947
|
var Ec = Math.max;
|
|
948
948
|
function it(t, e, n, r) {
|
|
@@ -984,18 +984,18 @@ function Tc(t, e, n, r) {
|
|
|
984
984
|
}
|
|
985
985
|
function Ot(t, e) {
|
|
986
986
|
if (t == null) return {};
|
|
987
|
-
var n = Nn(function(r) {
|
|
987
|
+
var n = Nn((function(r) {
|
|
988
988
|
return Ho(r, Wo, Ba);
|
|
989
|
-
}(t), function(r) {
|
|
989
|
+
})(t), function(r) {
|
|
990
990
|
return [r];
|
|
991
991
|
});
|
|
992
|
-
return e = Ct(e), function(r, i, o) {
|
|
992
|
+
return e = Ct(e), (function(r, i, o) {
|
|
993
993
|
for (var s = -1, a = i.length, c = {}; ++s < a; ) {
|
|
994
994
|
var u = i[s], l = Pr(r, u);
|
|
995
995
|
o(l, u) && Tc(c, Ln(u, r), l);
|
|
996
996
|
}
|
|
997
997
|
return c;
|
|
998
|
-
}(t, n, function(r, i) {
|
|
998
|
+
})(t, n, function(r, i) {
|
|
999
999
|
return e(r, i[0]);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
@@ -1009,7 +1009,7 @@ function ft(t, e, n) {
|
|
|
1009
1009
|
return r(t, Ct(e), n, i, se);
|
|
1010
1010
|
}
|
|
1011
1011
|
function xn(t, e) {
|
|
1012
|
-
return (D(t) ? Ur : ns)(t, function(n) {
|
|
1012
|
+
return (D(t) ? Ur : ns)(t, (function(n) {
|
|
1013
1013
|
if (typeof n != "function") throw new TypeError("Expected a function");
|
|
1014
1014
|
return function() {
|
|
1015
1015
|
var r = arguments;
|
|
@@ -1025,7 +1025,7 @@ function xn(t, e) {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
return !n.apply(this, r);
|
|
1027
1027
|
};
|
|
1028
|
-
}(Ct(e)));
|
|
1028
|
+
})(Ct(e)));
|
|
1029
1029
|
}
|
|
1030
1030
|
function Ic(t, e) {
|
|
1031
1031
|
var n;
|
|
@@ -1040,7 +1040,7 @@ var vc = he && 1 / jr(new he([, -0]))[1] == 1 / 0 ? function(t) {
|
|
|
1040
1040
|
return new he(t);
|
|
1041
1041
|
} : q;
|
|
1042
1042
|
function mr(t) {
|
|
1043
|
-
return t && t.length ? function(e, n, r) {
|
|
1043
|
+
return t && t.length ? (function(e, n, r) {
|
|
1044
1044
|
var i = -1, o = wo, s = e.length, a = !0, c = [], u = c;
|
|
1045
1045
|
if (s >= 200) {
|
|
1046
1046
|
var l = vc(e);
|
|
@@ -1055,7 +1055,7 @@ function mr(t) {
|
|
|
1055
1055
|
} else o(u, f, r) || (u !== c && u.push(f), c.push(h));
|
|
1056
1056
|
}
|
|
1057
1057
|
return c;
|
|
1058
|
-
}(t) : [];
|
|
1058
|
+
})(t) : [];
|
|
1059
1059
|
}
|
|
1060
1060
|
function Er(t) {
|
|
1061
1061
|
console && console.error && console.error(`Error: ${t}`);
|
|
@@ -1311,21 +1311,21 @@ function wi(t, e, n) {
|
|
|
1311
1311
|
function xe(t) {
|
|
1312
1312
|
if (t instanceof dt) return xe(t.referencedRule);
|
|
1313
1313
|
if (t instanceof K) return [t.terminalType];
|
|
1314
|
-
if (function(e) {
|
|
1314
|
+
if ((function(e) {
|
|
1315
1315
|
return e instanceof ut || e instanceof ct || e instanceof Q || e instanceof wt || e instanceof Mt || e instanceof St || e instanceof K || e instanceof Ee;
|
|
1316
|
-
}(t)) return function(e) {
|
|
1316
|
+
})(t)) return (function(e) {
|
|
1317
1317
|
let n = [];
|
|
1318
1318
|
const r = e.definition;
|
|
1319
1319
|
let i, o = 0, s = r.length > o, a = !0;
|
|
1320
1320
|
for (; s && a; ) i = r[o], a = dn(i), n = n.concat(xe(i)), o += 1, s = r.length > o;
|
|
1321
1321
|
return mr(n);
|
|
1322
|
-
}(t);
|
|
1323
|
-
if (function(e) {
|
|
1322
|
+
})(t);
|
|
1323
|
+
if ((function(e) {
|
|
1324
1324
|
return e instanceof _t;
|
|
1325
|
-
}(t)) return function(e) {
|
|
1325
|
+
})(t)) return (function(e) {
|
|
1326
1326
|
const n = _(e.definition, (r) => xe(r));
|
|
1327
1327
|
return mr(vt(n));
|
|
1328
|
-
}(t);
|
|
1328
|
+
})(t);
|
|
1329
1329
|
throw Error("non exhaustive match");
|
|
1330
1330
|
}
|
|
1331
1331
|
const as = "_~IN~_";
|
|
@@ -1536,9 +1536,9 @@ const Sc = new class {
|
|
|
1536
1536
|
const n = this.disjunction();
|
|
1537
1537
|
return this.consumeChar(")"), { type: e, value: n, loc: this.loc(t) };
|
|
1538
1538
|
}
|
|
1539
|
-
return function() {
|
|
1539
|
+
return (function() {
|
|
1540
1540
|
throw Error("Internal Error - Should never get here!");
|
|
1541
|
-
}();
|
|
1541
|
+
})();
|
|
1542
1542
|
}
|
|
1543
1543
|
quantifier(t = !1) {
|
|
1544
1544
|
let e;
|
|
@@ -2023,7 +2023,7 @@ function Tr(t, e, n) {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
function Ze(t, e, n) {
|
|
2025
2025
|
const r = Ht(t);
|
|
2026
|
-
e[r] = r, n === !0 && function(i, o) {
|
|
2026
|
+
e[r] = r, n === !0 && (function(i, o) {
|
|
2027
2027
|
const s = String.fromCharCode(i), a = s.toUpperCase();
|
|
2028
2028
|
if (a !== s) {
|
|
2029
2029
|
const c = Ht(a.charCodeAt(0));
|
|
@@ -2035,7 +2035,7 @@ function Ze(t, e, n) {
|
|
|
2035
2035
|
o[u] = u;
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
|
-
}(t, e);
|
|
2038
|
+
})(t, e);
|
|
2039
2039
|
}
|
|
2040
2040
|
function Fi(t, e) {
|
|
2041
2041
|
return me(t.value, (n) => {
|
|
@@ -2167,22 +2167,22 @@ function xc(t, e) {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
function Cc(t, e) {
|
|
2169
2169
|
let n = [];
|
|
2170
|
-
const r = function(s) {
|
|
2170
|
+
const r = (function(s) {
|
|
2171
2171
|
const a = pt(s, (l) => !L(l, te)), c = _(a, (l) => ({ message: "Token Type: ->" + l.name + "<- missing static 'PATTERN' property", type: V.MISSING_PATTERN, tokenTypes: [l] })), u = fn(s, a);
|
|
2172
2172
|
return { errors: c, valid: u };
|
|
2173
|
-
}(t);
|
|
2173
|
+
})(t);
|
|
2174
2174
|
n = n.concat(r.errors);
|
|
2175
|
-
const i = function(s) {
|
|
2175
|
+
const i = (function(s) {
|
|
2176
2176
|
const a = pt(s, (l) => {
|
|
2177
2177
|
const h = l[te];
|
|
2178
2178
|
return !(Gt(h) || Kt(h) || L(h, "exec") || at(h));
|
|
2179
2179
|
}), c = _(a, (l) => ({ message: "Token Type: ->" + l.name + "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.", type: V.INVALID_PATTERN, tokenTypes: [l] })), u = fn(s, a);
|
|
2180
2180
|
return { errors: c, valid: u };
|
|
2181
|
-
}(r.valid), o = i.valid;
|
|
2182
|
-
return n = n.concat(i.errors), n = n.concat(function(s) {
|
|
2181
|
+
})(r.valid), o = i.valid;
|
|
2182
|
+
return n = n.concat(i.errors), n = n.concat((function(s) {
|
|
2183
2183
|
let a = [];
|
|
2184
2184
|
const c = pt(s, (u) => Gt(u[te]));
|
|
2185
|
-
return a = a.concat(function(u) {
|
|
2185
|
+
return a = a.concat((function(u) {
|
|
2186
2186
|
class l extends gr {
|
|
2187
2187
|
constructor() {
|
|
2188
2188
|
super(...arguments), this.found = !1;
|
|
@@ -2203,7 +2203,7 @@ function Cc(t, e) {
|
|
|
2203
2203
|
return _(h, (d) => ({ message: `Unexpected RegExp Anchor Error:
|
|
2204
2204
|
Token Type: ->` + d.name + `<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
2205
2205
|
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`, type: V.EOI_ANCHOR_FOUND, tokenTypes: [d] }));
|
|
2206
|
-
}(c)), a = a.concat(function(u) {
|
|
2206
|
+
})(c)), a = a.concat((function(u) {
|
|
2207
2207
|
class l extends gr {
|
|
2208
2208
|
constructor() {
|
|
2209
2209
|
super(...arguments), this.found = !1;
|
|
@@ -2224,34 +2224,34 @@ function Cc(t, e) {
|
|
|
2224
2224
|
return _(h, (d) => ({ message: `Unexpected RegExp Anchor Error:
|
|
2225
2225
|
Token Type: ->` + d.name + `<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
2226
2226
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`, type: V.SOI_ANCHOR_FOUND, tokenTypes: [d] }));
|
|
2227
|
-
}(c)), a = a.concat(function(u) {
|
|
2227
|
+
})(c)), a = a.concat((function(u) {
|
|
2228
2228
|
const l = pt(u, (f) => {
|
|
2229
2229
|
const d = f[te];
|
|
2230
2230
|
return d instanceof RegExp && (d.multiline || d.global);
|
|
2231
2231
|
});
|
|
2232
2232
|
return _(l, (f) => ({ message: "Token Type: ->" + f.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')", type: V.UNSUPPORTED_FLAGS_FOUND, tokenTypes: [f] }));
|
|
2233
|
-
}(c)), a = a.concat(function(u) {
|
|
2233
|
+
})(c)), a = a.concat((function(u) {
|
|
2234
2234
|
const l = [];
|
|
2235
2235
|
let h = _(u, (d) => ft(u, (E, I) => (d.PATTERN.source !== I.PATTERN.source || it(l, I) || I.PATTERN === st.NA || (l.push(I), E.push(I)), E), []));
|
|
2236
2236
|
return h = Ge(h), _(pt(h, (d) => d.length > 1), (d) => {
|
|
2237
2237
|
const E = _(d, (I) => I.name);
|
|
2238
2238
|
return { message: `The same RegExp pattern ->${Rt(d).PATTERN}<-has been used in all of the following Token Types: ${E.join(", ")} <-`, type: V.DUPLICATE_PATTERNS_FOUND, tokenTypes: d };
|
|
2239
2239
|
});
|
|
2240
|
-
}(c)), a = a.concat(function(u) {
|
|
2240
|
+
})(c)), a = a.concat((function(u) {
|
|
2241
2241
|
const l = pt(u, (f) => f.PATTERN.test(""));
|
|
2242
2242
|
return _(l, (f) => ({ message: "Token Type: ->" + f.name + "<- static 'PATTERN' must not match an empty string", type: V.EMPTY_MATCH_PATTERN, tokenTypes: [f] }));
|
|
2243
|
-
}(c)), a;
|
|
2244
|
-
}(o)), n = n.concat(function(s) {
|
|
2243
|
+
})(c)), a;
|
|
2244
|
+
})(o)), n = n.concat((function(s) {
|
|
2245
2245
|
const a = pt(s, (u) => {
|
|
2246
2246
|
if (!L(u, "GROUP")) return !1;
|
|
2247
2247
|
const l = u.GROUP;
|
|
2248
2248
|
return l !== st.SKIPPED && l !== st.NA && !at(l);
|
|
2249
2249
|
});
|
|
2250
2250
|
return _(a, (u) => ({ message: "Token Type: ->" + u.name + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String", type: V.INVALID_GROUP_TYPE_FOUND, tokenTypes: [u] }));
|
|
2251
|
-
}(o)), n = n.concat(function(s, a) {
|
|
2251
|
+
})(o)), n = n.concat((function(s, a) {
|
|
2252
2252
|
const c = pt(s, (l) => l.PUSH_MODE !== void 0 && !it(a, l.PUSH_MODE));
|
|
2253
2253
|
return _(c, (l) => ({ message: `Token Type: ->${l.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${l.PUSH_MODE}<-which does not exist`, type: V.PUSH_MODE_DOES_NOT_EXIST, tokenTypes: [l] }));
|
|
2254
|
-
}(o, e)), n = n.concat(function(s) {
|
|
2254
|
+
})(o, e)), n = n.concat((function(s) {
|
|
2255
2255
|
const a = [], c = ft(s, (u, l, h) => {
|
|
2256
2256
|
const f = l.PATTERN;
|
|
2257
2257
|
return f === st.NA || (at(f) ? u.push({ str: f, idx: h, tokenType: l }) : Gt(f) && (d = f, me([".", "\\", "[", "]", "|", "^", "$", "(", ")", "?", "*", "+", "{"], (E) => d.source.indexOf(E) !== -1) === void 0) && u.push({ str: f.source, idx: h, tokenType: l })), u;
|
|
@@ -2259,7 +2259,7 @@ function Cc(t, e) {
|
|
|
2259
2259
|
}, []);
|
|
2260
2260
|
return k(s, (u, l) => {
|
|
2261
2261
|
k(c, ({ str: h, idx: f, tokenType: d }) => {
|
|
2262
|
-
if (l < f && function(E, I) {
|
|
2262
|
+
if (l < f && (function(E, I) {
|
|
2263
2263
|
if (Gt(I)) {
|
|
2264
2264
|
const S = I.exec(E);
|
|
2265
2265
|
return S !== null && S.index === 0;
|
|
@@ -2268,7 +2268,7 @@ function Cc(t, e) {
|
|
|
2268
2268
|
if (L(I, "exec")) return I.exec(E, 0, [], {});
|
|
2269
2269
|
if (typeof I == "string") return I === E;
|
|
2270
2270
|
throw Error("non exhaustive match");
|
|
2271
|
-
}(h, u.PATTERN)) {
|
|
2271
|
+
})(h, u.PATTERN)) {
|
|
2272
2272
|
const E = `Token: ->${d.name}<- can never be matched.
|
|
2273
2273
|
Because it appears AFTER the Token Type ->${u.name}<-in the lexer's definition.
|
|
2274
2274
|
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
|
|
@@ -2276,7 +2276,7 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
|
|
|
2276
2276
|
}
|
|
2277
2277
|
});
|
|
2278
2278
|
}), a;
|
|
2279
|
-
}(o)), n;
|
|
2279
|
+
})(o)), n;
|
|
2280
2280
|
}
|
|
2281
2281
|
const kc = /[^\\][$]/, bc = /[^\\[][\^]|^\^/;
|
|
2282
2282
|
function Di(t) {
|
|
@@ -2294,7 +2294,7 @@ function Pc(t, e, n) {
|
|
|
2294
2294
|
return e && k(o, (a) => {
|
|
2295
2295
|
const c = hs(a, s);
|
|
2296
2296
|
if (c !== !1) {
|
|
2297
|
-
const u = function(h, f) {
|
|
2297
|
+
const u = (function(h, f) {
|
|
2298
2298
|
if (f.issue === V.IDENTIFY_TERMINATOR) return `Warning: unable to identify line terminator usage in pattern.
|
|
2299
2299
|
The problem is in the <${h.name}> Token Type
|
|
2300
2300
|
Root cause: ${f.errMsg}.
|
|
@@ -2303,7 +2303,7 @@ function Pc(t, e, n) {
|
|
|
2303
2303
|
The problem is in the <${h.name}> Token Type
|
|
2304
2304
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;
|
|
2305
2305
|
throw Error("non exhaustive match");
|
|
2306
|
-
}(a, c), l = { message: u, type: c.issue, tokenType: a };
|
|
2306
|
+
})(a, c), l = { message: u, type: c.issue, tokenType: a };
|
|
2307
2307
|
r.push(l);
|
|
2308
2308
|
} else L(a, "LINE_BREAKS") ? a.LINE_BREAKS === !0 && (i = !0) : Wr(s, a.PATTERN) && (i = !0);
|
|
2309
2309
|
}), e && !i && r.push({ message: `Warning: No LINE_BREAKS Found.
|
|
@@ -2366,7 +2366,7 @@ function Tn(t, e) {
|
|
|
2366
2366
|
let Bi = 1;
|
|
2367
2367
|
const $i = {};
|
|
2368
2368
|
function ze(t) {
|
|
2369
|
-
const e = function(n) {
|
|
2369
|
+
const e = (function(n) {
|
|
2370
2370
|
let r = tt(n), i = n, o = !0;
|
|
2371
2371
|
for (; o; ) {
|
|
2372
2372
|
i = Ge(vt(_(i, (a) => a.CATEGORIES)));
|
|
@@ -2374,24 +2374,24 @@ function ze(t) {
|
|
|
2374
2374
|
r = r.concat(s), G(s) ? o = !1 : i = s;
|
|
2375
2375
|
}
|
|
2376
2376
|
return r;
|
|
2377
|
-
}(t);
|
|
2377
|
+
})(t);
|
|
2378
2378
|
(function(n) {
|
|
2379
2379
|
k(n, (r) => {
|
|
2380
|
-
ps(r) || ($i[Bi] = r, r.tokenTypeIdx = Bi++), Wi(r) && !D(r.CATEGORIES) && (r.CATEGORIES = [r.CATEGORIES]), Wi(r) || (r.CATEGORIES = []), L(r, "categoryMatches") || (r.categoryMatches = []), function(i) {
|
|
2380
|
+
ps(r) || ($i[Bi] = r, r.tokenTypeIdx = Bi++), Wi(r) && !D(r.CATEGORIES) && (r.CATEGORIES = [r.CATEGORIES]), Wi(r) || (r.CATEGORIES = []), L(r, "categoryMatches") || (r.categoryMatches = []), (function(i) {
|
|
2381
2381
|
return L(i, "categoryMatchesMap");
|
|
2382
|
-
}(r) || (r.categoryMatchesMap = {});
|
|
2382
|
+
})(r) || (r.categoryMatchesMap = {});
|
|
2383
2383
|
});
|
|
2384
|
-
})(e), function(n) {
|
|
2384
|
+
})(e), (function(n) {
|
|
2385
2385
|
k(n, (r) => {
|
|
2386
2386
|
ds([], r);
|
|
2387
2387
|
});
|
|
2388
|
-
}(e), function(n) {
|
|
2388
|
+
})(e), (function(n) {
|
|
2389
2389
|
k(n, (r) => {
|
|
2390
2390
|
r.categoryMatches = [], k(r.categoryMatchesMap, (i, o) => {
|
|
2391
2391
|
r.categoryMatches.push($i[o].tokenTypeIdx);
|
|
2392
2392
|
});
|
|
2393
2393
|
});
|
|
2394
|
-
}(e), k(e, (n) => {
|
|
2394
|
+
})(e), k(e, (n) => {
|
|
2395
2395
|
n.isParent = n.categoryMatches.length > 0;
|
|
2396
2396
|
});
|
|
2397
2397
|
}
|
|
@@ -2444,7 +2444,7 @@ a boolean 2nd argument is no longer supported`);
|
|
|
2444
2444
|
if (n.safeMode && n.ensureOptimizations) throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');
|
|
2445
2445
|
this.trackStartLines = /full|onlyStart/i.test(this.config.positionTracking), this.trackEndLines = /full/i.test(this.config.positionTracking), D(e) ? i = { modes: { defaultMode: tt(e) }, defaultMode: Ne } : (o = !1, i = tt(e));
|
|
2446
2446
|
}), this.config.skipValidations === !1 && (this.TRACE_INIT("performRuntimeChecks", () => {
|
|
2447
|
-
this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(function(a) {
|
|
2447
|
+
this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat((function(a) {
|
|
2448
2448
|
const c = [];
|
|
2449
2449
|
return L(a, Ne) || c.push({ message: "A MultiMode Lexer cannot be initialized without a <" + Ne + `> property in its definition
|
|
2450
2450
|
`, type: V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE }), L(a, zn) || c.push({ message: `A MultiMode Lexer cannot be initialized without a <modes> property in its definition
|
|
@@ -2458,7 +2458,7 @@ a boolean 2nd argument is no longer supported`);
|
|
|
2458
2458
|
});
|
|
2459
2459
|
});
|
|
2460
2460
|
}), c;
|
|
2461
|
-
}(i, this.trackStartLines, this.config.lineTerminatorCharacters));
|
|
2461
|
+
})(i, this.trackStartLines, this.config.lineTerminatorCharacters));
|
|
2462
2462
|
}), this.TRACE_INIT("performWarningRuntimeChecks", () => {
|
|
2463
2463
|
this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(Pc(i, this.trackStartLines, this.config.lineTerminatorCharacters));
|
|
2464
2464
|
})), i.modes = i.modes ? i.modes : {}, k(i.modes, (a, c) => {
|
|
@@ -2519,14 +2519,14 @@ a boolean 2nd argument is no longer supported`);
|
|
|
2519
2519
|
let A = 0, O = 0;
|
|
2520
2520
|
const g = this.hasCustom ? 0 : Math.floor(e.length / 10), R = new Array(g), N = [];
|
|
2521
2521
|
let v = this.trackStartLines ? 1 : void 0, y = this.trackStartLines ? 1 : void 0;
|
|
2522
|
-
const M = function(X) {
|
|
2522
|
+
const M = (function(X) {
|
|
2523
2523
|
const nt = {};
|
|
2524
2524
|
return k(At(X), (Ut) => {
|
|
2525
2525
|
const ot = X[Ut];
|
|
2526
2526
|
if (!D(ot)) throw Error("non exhaustive match");
|
|
2527
2527
|
nt[Ut] = [];
|
|
2528
2528
|
}), nt;
|
|
2529
|
-
}(this.emptyGroups), w = this.trackStartLines, F = this.config.lineTerminatorsPattern;
|
|
2529
|
+
})(this.emptyGroups), w = this.trackStartLines, F = this.config.lineTerminatorsPattern;
|
|
2530
2530
|
let $ = 0, x = [], C = [];
|
|
2531
2531
|
const j = [], Y = [];
|
|
2532
2532
|
let B;
|
|
@@ -2658,12 +2658,12 @@ function ms(t) {
|
|
|
2658
2658
|
st.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.", st.NA = /NOT_APPLICABLE/;
|
|
2659
2659
|
const Dc = "parent", Gi = "categories", zi = "label", Ki = "group", Vi = "push_mode", Hi = "pop_mode", Yi = "longer_alt", Xi = "line_breaks", qi = "start_chars_hint";
|
|
2660
2660
|
function P(t) {
|
|
2661
|
-
return function(e) {
|
|
2661
|
+
return (function(e) {
|
|
2662
2662
|
const n = e.pattern, r = {};
|
|
2663
2663
|
if (r.name = e.name, zt(n) || (r.PATTERN = n), L(e, Dc)) throw `The parent property is no longer supported.
|
|
2664
2664
|
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;
|
|
2665
2665
|
return L(e, Gi) && (r.CATEGORIES = e[Gi]), ze([r]), L(e, zi) && (r.LABEL = e[zi]), L(e, Ki) && (r.GROUP = e[Ki]), L(e, Hi) && (r.POP_MODE = e[Hi]), L(e, Vi) && (r.PUSH_MODE = e[Vi]), L(e, Yi) && (r.LONGER_ALT = e[Yi]), L(e, Xi) && (r.LINE_BREAKS = e[Xi]), L(e, qi) && (r.START_CHARS_HINT = e[qi]), r;
|
|
2666
|
-
}(t);
|
|
2666
|
+
})(t);
|
|
2667
2667
|
}
|
|
2668
2668
|
const ee = P({ name: "EOF", pattern: st.NA });
|
|
2669
2669
|
function Gr(t, e, n, r, i, o, s, a) {
|
|
@@ -3164,7 +3164,7 @@ function eo(t) {
|
|
|
3164
3164
|
return Nt(t, (e) => Nt(e, (n) => Nt(n, (r) => G(r.categoryMatches))));
|
|
3165
3165
|
}
|
|
3166
3166
|
function qc(t, e, n, r) {
|
|
3167
|
-
const i = Et(t, (c) => function(u, l) {
|
|
3167
|
+
const i = Et(t, (c) => (function(u, l) {
|
|
3168
3168
|
const h = new Qc();
|
|
3169
3169
|
u.accept(h);
|
|
3170
3170
|
const f = h.allProductions, d = dc(f, Zc);
|
|
@@ -3172,7 +3172,7 @@ function qc(t, e, n, r) {
|
|
|
3172
3172
|
const S = Rt(I), T = l.buildDuplicateFoundError(u, I), m = Lt(S), p = { message: T, type: rt.DUPLICATE_PRODUCTIONS, ruleName: u.name, dslName: m, occurrence: S.idx }, A = Is(S);
|
|
3173
3173
|
return A && (p.parameter = A), p;
|
|
3174
3174
|
});
|
|
3175
|
-
}(c, n)), o = function(c, u, l) {
|
|
3175
|
+
})(c, n)), o = (function(c, u, l) {
|
|
3176
3176
|
const h = [], f = _(u, (d) => d.name);
|
|
3177
3177
|
return k(c, (d) => {
|
|
3178
3178
|
const E = d.name;
|
|
@@ -3181,17 +3181,17 @@ function qc(t, e, n, r) {
|
|
|
3181
3181
|
h.push({ message: I, type: rt.CONFLICT_TOKENS_RULES_NAMESPACE, ruleName: E });
|
|
3182
3182
|
}
|
|
3183
3183
|
}), h;
|
|
3184
|
-
}(t, e, n), s = Et(t, (c) => function(u, l) {
|
|
3184
|
+
})(t, e, n), s = Et(t, (c) => (function(u, l) {
|
|
3185
3185
|
const h = new Kr();
|
|
3186
3186
|
return u.accept(h), Et(h.alternations, (d) => d.definition.length > 255 ? [{ message: l.buildTooManyAlternativesError({ topLevelRule: u, alternation: d }), type: rt.TOO_MANY_ALTS, ruleName: u.name, occurrence: d.idx }] : []);
|
|
3187
|
-
}(c, n)), a = Et(t, (c) => function(u, l, h, f) {
|
|
3187
|
+
})(c, n)), a = Et(t, (c) => (function(u, l, h, f) {
|
|
3188
3188
|
const d = [];
|
|
3189
3189
|
if (ft(l, (I, S) => S.name === u.name ? I + 1 : I, 0) > 1) {
|
|
3190
3190
|
const I = f.buildDuplicateRuleNameError({ topLevelRule: u, grammarName: h });
|
|
3191
3191
|
d.push({ message: I, type: rt.DUPLICATE_RULE_NAME, ruleName: u.name });
|
|
3192
3192
|
}
|
|
3193
3193
|
return d;
|
|
3194
|
-
}(c, t, r, n));
|
|
3194
|
+
})(c, t, r, n));
|
|
3195
3195
|
return i.concat(o, s, a);
|
|
3196
3196
|
}
|
|
3197
3197
|
function Zc(t) {
|
|
@@ -3270,7 +3270,7 @@ function Jc(t, e, n) {
|
|
|
3270
3270
|
t.accept(r);
|
|
3271
3271
|
let i = r.alternations;
|
|
3272
3272
|
return i = xn(i, (s) => s.ignoreAmbiguities === !0), Et(i, (s) => {
|
|
3273
|
-
const a = s.idx, c = s.maxLookahead || e, u = zr(a, t, c, s), l = function(f, d, E, I) {
|
|
3273
|
+
const a = s.idx, c = s.maxLookahead || e, u = zr(a, t, c, s), l = (function(f, d, E, I) {
|
|
3274
3274
|
const S = [], T = ft(f, (p, A, O) => (d.definition[O].ignoreAmbiguities === !0 || k(A, (g) => {
|
|
3275
3275
|
const R = [O];
|
|
3276
3276
|
k(f, (N, v) => {
|
|
@@ -3281,7 +3281,7 @@ function Jc(t, e, n) {
|
|
|
3281
3281
|
const A = _(p.alts, (O) => O + 1);
|
|
3282
3282
|
return { message: I.buildAlternationAmbiguityError({ topLevelRule: E, alternation: d, ambiguityIndices: A, prefixPath: p.path }), type: rt.AMBIGUOUS_ALTS, ruleName: E.name, occurrence: d.idx, alternatives: p.alts };
|
|
3283
3283
|
});
|
|
3284
|
-
}(u, s, t, n), h = function(f, d, E, I) {
|
|
3284
|
+
})(u, s, t, n), h = (function(f, d, E, I) {
|
|
3285
3285
|
const S = ft(f, (m, p, A) => {
|
|
3286
3286
|
const O = _(p, (g) => ({ idx: A, path: g }));
|
|
3287
3287
|
return m.concat(O);
|
|
@@ -3300,7 +3300,7 @@ function Jc(t, e, n) {
|
|
|
3300
3300
|
return { message: I.buildAlternationPrefixAmbiguityError({ topLevelRule: E, alternation: d, ambiguityIndices: g, prefixPath: O.path }), type: rt.AMBIGUOUS_PREFIX_ALTS, ruleName: E.name, occurrence: R, alternatives: g };
|
|
3301
3301
|
});
|
|
3302
3302
|
}));
|
|
3303
|
-
}(u, s, t, n);
|
|
3303
|
+
})(u, s, t, n);
|
|
3304
3304
|
return l.concat(h);
|
|
3305
3305
|
});
|
|
3306
3306
|
}
|
|
@@ -3325,10 +3325,10 @@ function eu(t) {
|
|
|
3325
3325
|
const e = $r(t, { errMsgProvider: jc }), n = {};
|
|
3326
3326
|
return k(t.rules, (r) => {
|
|
3327
3327
|
n[r.name] = r;
|
|
3328
|
-
}), function(r, i) {
|
|
3328
|
+
}), (function(r, i) {
|
|
3329
3329
|
const o = new Bc(r, i);
|
|
3330
3330
|
return o.resolveRefs(), o.errors;
|
|
3331
|
-
}(n, e.errMsgProvider);
|
|
3331
|
+
})(n, e.errMsgProvider);
|
|
3332
3332
|
}
|
|
3333
3333
|
const Ns = "MismatchedTokenException", ys = "NoViableAltException", Rs = "EarlyExitException", Os = "NotAllInputParsedException", Ss = [Ns, ys, Rs, Os];
|
|
3334
3334
|
function Qe(t) {
|
|
@@ -3398,16 +3398,16 @@ class au {
|
|
|
3398
3398
|
return Et(e, (n) => vs(n, n, ne));
|
|
3399
3399
|
}
|
|
3400
3400
|
validateEmptyOrAlternatives(e) {
|
|
3401
|
-
return Et(e, (n) => function(r, i) {
|
|
3401
|
+
return Et(e, (n) => (function(r, i) {
|
|
3402
3402
|
const o = new Kr();
|
|
3403
3403
|
return r.accept(o), Et(o.alternations, (s) => Et(Fe(s.definition), (a, c) => G(gs([a], [], Ce, 1)) ? [{ message: i.buildEmptyAlternationError({ topLevelRule: r, alternation: s, emptyChoiceIdx: c }), type: rt.NONE_LAST_EMPTY_ALT, ruleName: r.name, occurrence: s.idx, alternative: c + 1 }] : []));
|
|
3404
|
-
}(n, ne));
|
|
3404
|
+
})(n, ne));
|
|
3405
3405
|
}
|
|
3406
3406
|
validateAmbiguousAlternationAlternatives(e, n) {
|
|
3407
3407
|
return Et(e, (r) => Jc(r, n, ne));
|
|
3408
3408
|
}
|
|
3409
3409
|
validateSomeNonEmptyLookaheadPath(e, n) {
|
|
3410
|
-
return function(r, i, o) {
|
|
3410
|
+
return (function(r, i, o) {
|
|
3411
3411
|
const s = [];
|
|
3412
3412
|
return k(r, (a) => {
|
|
3413
3413
|
const c = new tu();
|
|
@@ -3419,19 +3419,19 @@ class au {
|
|
|
3419
3419
|
}
|
|
3420
3420
|
});
|
|
3421
3421
|
}), s;
|
|
3422
|
-
}(e, n, ne);
|
|
3422
|
+
})(e, n, ne);
|
|
3423
3423
|
}
|
|
3424
3424
|
buildLookaheadForAlternation(e) {
|
|
3425
|
-
return function(n, r, i, o, s, a) {
|
|
3425
|
+
return (function(n, r, i, o, s, a) {
|
|
3426
3426
|
const c = zr(n, r, i);
|
|
3427
3427
|
return a(c, o, eo(c) ? Tn : Ce, s);
|
|
3428
|
-
}(e.prodOccurrence, e.rule, e.maxLookahead, e.hasPredicates, e.dynamicTokensEnabled, Vc);
|
|
3428
|
+
})(e.prodOccurrence, e.rule, e.maxLookahead, e.hasPredicates, e.dynamicTokensEnabled, Vc);
|
|
3429
3429
|
}
|
|
3430
3430
|
buildLookaheadForOptional(e) {
|
|
3431
|
-
return function(n, r, i, o, s, a) {
|
|
3431
|
+
return (function(n, r, i, o, s, a) {
|
|
3432
3432
|
const c = vr(n, r, s, i), u = eo(c) ? Tn : Ce;
|
|
3433
3433
|
return a(c[0], u, o);
|
|
3434
|
-
}(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, Ji(e.prodType), Hc);
|
|
3434
|
+
})(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, Ji(e.prodType), Hc);
|
|
3435
3435
|
}
|
|
3436
3436
|
}
|
|
3437
3437
|
const tn = new class extends ge {
|
|
@@ -3486,12 +3486,12 @@ function uu(t, e) {
|
|
|
3486
3486
|
const r = { visit: function(i, o) {
|
|
3487
3487
|
if (D(i) && (i = i[0]), !zt(i)) return this[i.name](i.children, o);
|
|
3488
3488
|
}, validateVisitor: function() {
|
|
3489
|
-
const i = function(o, s) {
|
|
3490
|
-
return function(c, u) {
|
|
3489
|
+
const i = (function(o, s) {
|
|
3490
|
+
return (function(c, u) {
|
|
3491
3491
|
const l = pt(u, (f) => Kt(c[f]) === !1), h = _(l, (f) => ({ msg: `Missing visitor method: <${f}> on ${c.constructor.name} CST Visitor.`, type: yr.MISSING_METHOD, methodName: f }));
|
|
3492
3492
|
return Ge(h);
|
|
3493
|
-
}(o, s);
|
|
3494
|
-
}(this, e);
|
|
3493
|
+
})(o, s);
|
|
3494
|
+
})(this, e);
|
|
3495
3495
|
if (!G(i)) {
|
|
3496
3496
|
const o = _(i, (s) => s.msg);
|
|
3497
3497
|
throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
@@ -3578,20 +3578,20 @@ class De {
|
|
|
3578
3578
|
r = eu({ rules: Z(this.gastProductionsCache) }), this.definitionErrors = this.definitionErrors.concat(r);
|
|
3579
3579
|
}), this.TRACE_INIT("Grammar Validations", () => {
|
|
3580
3580
|
if (G(r) && this.skipValidations === !1) {
|
|
3581
|
-
const o = (i = { rules: Z(this.gastProductionsCache), tokenTypes: Z(this.tokensMap), errMsgProvider: ne, grammarName: n }, qc((i = $r(i, { errMsgProvider: ne })).rules, i.tokenTypes, i.errMsgProvider, i.grammarName)), s = function(a) {
|
|
3581
|
+
const o = (i = { rules: Z(this.gastProductionsCache), tokenTypes: Z(this.tokensMap), errMsgProvider: ne, grammarName: n }, qc((i = $r(i, { errMsgProvider: ne })).rules, i.tokenTypes, i.errMsgProvider, i.grammarName)), s = (function(a) {
|
|
3582
3582
|
return _(a.lookaheadStrategy.validate({ rules: a.rules, tokenTypes: a.tokenTypes, grammarName: a.grammarName }), (c) => Object.assign({ type: rt.CUSTOM_LOOKAHEAD_VALIDATION }, c));
|
|
3583
|
-
}({ lookaheadStrategy: this.lookaheadStrategy, rules: Z(this.gastProductionsCache), tokenTypes: Z(this.tokensMap), grammarName: n });
|
|
3583
|
+
})({ lookaheadStrategy: this.lookaheadStrategy, rules: Z(this.gastProductionsCache), tokenTypes: Z(this.tokensMap), grammarName: n });
|
|
3584
3584
|
this.definitionErrors = this.definitionErrors.concat(o, s);
|
|
3585
3585
|
}
|
|
3586
3586
|
var i;
|
|
3587
3587
|
}), G(this.definitionErrors) && (this.recoveryEnabled && this.TRACE_INIT("computeAllProdsFollows", () => {
|
|
3588
|
-
const i = function(o) {
|
|
3588
|
+
const i = (function(o) {
|
|
3589
3589
|
const s = {};
|
|
3590
3590
|
return k(o, (a) => {
|
|
3591
3591
|
const c = new yc(a).startWalking();
|
|
3592
3592
|
ht(s, c);
|
|
3593
3593
|
}), s;
|
|
3594
|
-
}(Z(this.gastProductionsCache));
|
|
3594
|
+
})(Z(this.gastProductionsCache));
|
|
3595
3595
|
this.resyncFollows = i;
|
|
3596
3596
|
}), this.TRACE_INIT("ComputeLookaheadFunctions", () => {
|
|
3597
3597
|
var i, o;
|
|
@@ -3722,11 +3722,11 @@ De.DEFER_DEFINITION_ERRORS_HANDLING = !1, Zn = De, [class {
|
|
|
3722
3722
|
preComputeLookaheadFunctions(t) {
|
|
3723
3723
|
k(t, (e) => {
|
|
3724
3724
|
this.TRACE_INIT(`${e.name} Rule Lookahead`, () => {
|
|
3725
|
-
const { alternation: n, repetition: r, option: i, repetitionMandatory: o, repetitionMandatoryWithSeparator: s, repetitionWithSeparator: a } = function(c) {
|
|
3725
|
+
const { alternation: n, repetition: r, option: i, repetitionMandatory: o, repetitionMandatoryWithSeparator: s, repetitionWithSeparator: a } = (function(c) {
|
|
3726
3726
|
tn.reset(), c.accept(tn);
|
|
3727
3727
|
const u = tn.dslMethods;
|
|
3728
3728
|
return tn.reset(), u;
|
|
3729
|
-
}(e);
|
|
3729
|
+
})(e);
|
|
3730
3730
|
k(n, (c) => {
|
|
3731
3731
|
const u = c.idx === 0 ? "" : c.idx;
|
|
3732
3732
|
this.TRACE_INIT(`${Lt(c)}${u}`, () => {
|
|
@@ -3820,7 +3820,7 @@ De.DEFER_DEFINITION_ERRORS_HANDLING = !1, Zn = De, [class {
|
|
|
3820
3820
|
}
|
|
3821
3821
|
getBaseCstVisitorConstructorWithDefaults() {
|
|
3822
3822
|
if (zt(this.baseCstVisitorWithDefaultsConstructor)) {
|
|
3823
|
-
const t = function(e, n, r) {
|
|
3823
|
+
const t = (function(e, n, r) {
|
|
3824
3824
|
const i = function() {
|
|
3825
3825
|
};
|
|
3826
3826
|
Ls(i, e + "BaseSemanticsWithDefaults");
|
|
@@ -3828,7 +3828,7 @@ De.DEFER_DEFINITION_ERRORS_HANDLING = !1, Zn = De, [class {
|
|
|
3828
3828
|
return k(n, (s) => {
|
|
3829
3829
|
o[s] = cu;
|
|
3830
3830
|
}), (i.prototype = o).constructor = i, i;
|
|
3831
|
-
}(this.className, At(this.gastProductionsCache), this.getBaseCstVisitorConstructor());
|
|
3831
|
+
})(this.className, At(this.gastProductionsCache), this.getBaseCstVisitorConstructor());
|
|
3832
3832
|
return this.baseCstVisitorWithDefaultsConstructor = t, t;
|
|
3833
3833
|
}
|
|
3834
3834
|
return this.baseCstVisitorWithDefaultsConstructor;
|
|
@@ -4392,11 +4392,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
4392
4392
|
return this[t] = r, r;
|
|
4393
4393
|
}
|
|
4394
4394
|
OVERRIDE_RULE(t, e, n = en) {
|
|
4395
|
-
const r = function(o, s, a) {
|
|
4395
|
+
const r = (function(o, s, a) {
|
|
4396
4396
|
const c = [];
|
|
4397
4397
|
let u;
|
|
4398
4398
|
return it(s, o) || (u = `Invalid rule override, rule: ->${o}<- cannot be overridden in the grammar: ->${a}<-as it is not defined in any of the super grammars `, c.push({ message: u, type: rt.INVALID_RULE_OVERRIDE, ruleName: o })), c;
|
|
4399
|
-
}(t, this.definedRulesNames, this.className);
|
|
4399
|
+
})(t, this.definedRulesNames, this.className);
|
|
4400
4400
|
this.definitionErrors = this.definitionErrors.concat(r);
|
|
4401
4401
|
const i = this.defineRule(t, e, n);
|
|
4402
4402
|
return this[t] = i, i;
|
|
@@ -4764,7 +4764,7 @@ function In(t) {
|
|
|
4764
4764
|
return { type: "error", value: t ? U.getBuiltInByLabel(t.toUpperCase()) : U.BuiltIn.Ref, inputs: null, isReference: !0 };
|
|
4765
4765
|
}
|
|
4766
4766
|
function je(t, e) {
|
|
4767
|
-
return function r(i, o) {
|
|
4767
|
+
return (function r(i, o) {
|
|
4768
4768
|
const s = i.inputs;
|
|
4769
4769
|
let a;
|
|
4770
4770
|
if (s) {
|
|
@@ -4776,7 +4776,7 @@ function je(t, e) {
|
|
|
4776
4776
|
}
|
|
4777
4777
|
const c = a ? { ...i, inputs: a } : i, u = e(c, o);
|
|
4778
4778
|
return u === void 0 ? c : u;
|
|
4779
|
-
}(t, void 0) || this;
|
|
4779
|
+
})(t, void 0) || this;
|
|
4780
4780
|
}
|
|
4781
4781
|
function un(t, e) {
|
|
4782
4782
|
let n = 0, r = je(t, (p) => {
|
|
@@ -4875,7 +4875,7 @@ function un(t, e) {
|
|
|
4875
4875
|
A.fn = ll[g];
|
|
4876
4876
|
}
|
|
4877
4877
|
}
|
|
4878
|
-
const m = function(p) {
|
|
4878
|
+
const m = (function(p) {
|
|
4879
4879
|
const A = [], O = (N, v) => {
|
|
4880
4880
|
const y = { type: N.type, value: N.value };
|
|
4881
4881
|
N.evalIndex !== void 0 && (y.evalIndex = N.evalIndex), N.refIndex !== void 0 && (y.refIndex = N.refIndex), v && (y.ctx = v), A.push(y);
|
|
@@ -4960,7 +4960,7 @@ function un(t, e) {
|
|
|
4960
4960
|
}
|
|
4961
4961
|
}
|
|
4962
4962
|
return A;
|
|
4963
|
-
}(r);
|
|
4963
|
+
})(r);
|
|
4964
4964
|
return { ast: r, evaluations: i, executions: u, precedentsAbsolute: d, precedentsExecute: E, precedentsNamed: I, precedentsRelative: h, precedentsRoot: S, references: l, tokens: m, error: e };
|
|
4965
4965
|
}
|
|
4966
4966
|
function go(t, e) {
|
|
@@ -5093,9 +5093,9 @@ class Gl extends fu {
|
|
|
5093
5093
|
return o = e.ACTION(() => (a || this._reportError(o, "Missing closing parenthesis '}'", i), this._ensureWhitespace(o, e.getLexerPosition(), !1, !0))), o;
|
|
5094
5094
|
}), e.RULE("literalForArray", () => e.OR([{ ALT: () => {
|
|
5095
5095
|
const r = e.OPTION(() => e.SUBRULE(e.plusMinusOp)), i = e.CONSUME(yo), o = e.ACTION(() => this._ensureWhitespace(po(i.image), e.getLexerPosition()));
|
|
5096
|
-
return r ? e.ACTION(() => /* @__PURE__ */ function(s, a) {
|
|
5096
|
+
return r ? e.ACTION(() => /* @__PURE__ */ (function(s, a) {
|
|
5097
5097
|
return { type: "prefix", value: s, inputs: [a] };
|
|
5098
|
-
}(r, o)) : o;
|
|
5098
|
+
})(r, o)) : o;
|
|
5099
5099
|
} }, { ALT: () => {
|
|
5100
5100
|
const r = e.CONSUME(Ao);
|
|
5101
5101
|
return e.ACTION(() => this._ensureWhitespace(rr(r.image), e.getLexerPosition()));
|
|
@@ -5211,14 +5211,14 @@ class Gl extends fu {
|
|
|
5211
5211
|
let i = e.OR([{ ALT: () => {
|
|
5212
5212
|
const o = e.CONSUME(Al), s = e.getLexerPosition(), a = e.OPTION(() => e.CONSUME(_o));
|
|
5213
5213
|
return e.ACTION(() => {
|
|
5214
|
-
const c = this._ensureWhitespace(function(u, l) {
|
|
5214
|
+
const c = this._ensureWhitespace((function(u, l) {
|
|
5215
5215
|
const h = u.match(/([$]?)([A-Za-z]{1,3})([$]?)([1-9][0-9]*)/);
|
|
5216
5216
|
let f = lo(h[2]) - 1;
|
|
5217
5217
|
const d = h[1].length === 1;
|
|
5218
5218
|
let E = +h[4] - 1;
|
|
5219
5219
|
const I = h[3].length === 1;
|
|
5220
5220
|
return d || f === Number.MIN_SAFE_INTEGER || (f -= l.colIndex), I || E === Number.MIN_SAFE_INTEGER || (E -= l.rowIndex), { type: "cell", value: Object.freeze({ colIndex: f, rowIndex: E, $colIndex: d, $rowIndex: I }), inputs: null, isReference: !0 };
|
|
5221
|
-
}(o.image, e.position), s);
|
|
5221
|
+
})(o.image, e.position), s);
|
|
5222
5222
|
return a ? this._ensureWhitespace(er("#", c, !0), s) : c;
|
|
5223
5223
|
});
|
|
5224
5224
|
} }, { ALT: () => {
|
|
@@ -5226,12 +5226,12 @@ class Gl extends fu {
|
|
|
5226
5226
|
return e.ACTION(() => this._ensureWhitespace(nr(o.image), e.getLexerPosition()));
|
|
5227
5227
|
} }, { ALT: () => {
|
|
5228
5228
|
const o = e.CONSUME(vl);
|
|
5229
|
-
return e.ACTION(() => this._ensureWhitespace(function(s, a) {
|
|
5229
|
+
return e.ACTION(() => this._ensureWhitespace((function(s, a) {
|
|
5230
5230
|
const c = s.startsWith("$");
|
|
5231
5231
|
c && (s = s.substring(1));
|
|
5232
5232
|
let u = lo(s) - 1;
|
|
5233
5233
|
return c || u === Number.MIN_SAFE_INTEGER || (u -= a.colIndex), { type: "cell", value: Object.freeze({ colIndex: u, rowIndex: Number.MIN_SAFE_INTEGER, $colIndex: c, $rowIndex: !1 }), inputs: null, isReference: !0 };
|
|
5234
|
-
}(o.image, e.position), e.getLexerPosition()));
|
|
5234
|
+
})(o.image, e.position), e.getLexerPosition()));
|
|
5235
5235
|
} }, { ALT: () => {
|
|
5236
5236
|
const o = e.CONSUME(Nl);
|
|
5237
5237
|
return e.ACTION(() => this._ensureWhitespace(ho(o.image, e.position), e.getLexerPosition()));
|
|
@@ -5261,7 +5261,7 @@ class Gl extends fu {
|
|
|
5261
5261
|
return e;
|
|
5262
5262
|
}
|
|
5263
5263
|
_createAST(e, n) {
|
|
5264
|
-
const r = function(a) {
|
|
5264
|
+
const r = (function(a) {
|
|
5265
5265
|
const c = Xu.tokenize(a);
|
|
5266
5266
|
if (c.errors.length > 0) {
|
|
5267
5267
|
const u = c.errors[0], l = u.line, h = u.column;
|
|
@@ -5274,7 +5274,7 @@ class Gl extends fu {
|
|
|
5274
5274
|
` + u.message, u.errorLocation = { line: l, column: h }, new U.Parse(u.message, { line: l, column: h, offset: u.offset, length: u.length });
|
|
5275
5275
|
}
|
|
5276
5276
|
return c;
|
|
5277
|
-
}(n);
|
|
5277
|
+
})(n);
|
|
5278
5278
|
let i;
|
|
5279
5279
|
if (!r) return i = { type: "text", value: n }, i;
|
|
5280
5280
|
const o = r.tokens;
|