@antdv-next/x 1.2.1-beta.1 → 1.2.2
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/dist/attachments/index.js +1 -2
- package/dist/code-highlighter/style/index.d.ts +51 -19
- package/dist/code-highlighter/style/index.js +44 -31
- package/dist/index.umd.js +133 -52
- package/dist/package.js +1 -1
- package/dist/sender/hooks/use-speech.js +1 -2
- package/dist/suggestion/Suggestion.js +37 -6
- package/dist/suggestion/useActive.d.ts +1 -1
- package/dist/suggestion/useActive.js +44 -2
- package/dist/theme/util/alias.js +5 -5
- package/dist/think/Think.js +2 -3
- package/dist/thought-chain/Node.js +2 -3
- package/dist/x-provider/index.js +2 -3
- package/es/{_basePickBy-CrbncDqR.js → _basePickBy-BL4DHvHb.js} +1 -1
- package/es/{_baseUniq-B-qU_Imh.js → _baseUniq-CyFYmJd-.js} +7 -7
- package/es/antdv-next-x.esm.js +374 -335
- package/es/architecture-PBZL5I3N-M9p1teRv.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-OvuktNfv.js → architectureDiagram-2XIMDMQ5-zW5aGalx.js} +99 -89
- package/es/{blockDiagram-WCTKOSBZ-CS-kh74L.js → blockDiagram-WCTKOSBZ-0QujSG-h.js} +36 -33
- package/es/{c4Diagram-IC4MRINW-BZGIF4Dk.js → c4Diagram-IC4MRINW-B7y07WFn.js} +24 -16
- package/es/{channel-DrSSYyxp.js → channel-CxLj88Pg.js} +1 -1
- package/es/{chunk-4BX2VUAB-Rm8-te6i.js → chunk-4BX2VUAB-CprgMM4u.js} +1 -1
- package/es/{chunk-55IACEB6-Tre45n-8.js → chunk-55IACEB6-BpkEkHy8.js} +1 -1
- package/es/{chunk-7R4GIKGN-scch4dXY.js → chunk-7R4GIKGN-mKY502R8.js} +6 -4
- package/es/{chunk-FMBD7UC4-JmekSPZP.js → chunk-FMBD7UC4-B88neS61.js} +1 -1
- package/es/{chunk-GEFDOKGD-BEzc6NZw.js → chunk-GEFDOKGD-oBEpn5hN.js} +67 -27
- package/es/chunk-GLR3WWYH-B2D9kjtF.js +41 -0
- package/es/chunk-HHEYEP7N-DcZkCke2.js +9 -0
- package/es/{chunk-JSJVCQXG-_l_UVbaa.js → chunk-JSJVCQXG-BbVOaXjl.js} +3 -3
- package/es/{chunk-KX2RTZJC-BUWM8pJz.js → chunk-KX2RTZJC-Dw3D7Wrw.js} +2 -2
- package/es/{chunk-KYZI473N-BSgb_E0Q.js → chunk-KYZI473N-33-uii7Y.js} +10 -10
- package/es/{chunk-MX3YWQON-D602L8pU.js → chunk-MX3YWQON-D4cz36rq.js} +1 -1
- package/es/{chunk-NQ4KR5QH-BPQV0i93.js → chunk-NQ4KR5QH-CprADZhD.js} +44 -40
- package/es/{chunk-O4XLMI2P-BMqc3iYa.js → chunk-O4XLMI2P-DBAvycZ-.js} +13 -14
- package/es/{chunk-PQ6SQG4A-DcYrzB1X.js → chunk-PQ6SQG4A-BITIwHAS.js} +2 -2
- package/es/{chunk-PU5JKC2W-TuGY6X1n.js → chunk-PU5JKC2W-DIl8TkGX.js} +22 -26
- package/es/{chunk-QZHKN3VN-CKbD02cl.js → chunk-QZHKN3VN-Cg0ROtzE.js} +1 -1
- package/es/{chunk-WL4C6EOR-B31ErTFp.js → chunk-WL4C6EOR-Bhp_3T_o.js} +15 -15
- package/es/chunk-XPW4576I-255j2Rgd.js +1146 -0
- package/es/{chunk-XZSTWKYB-DYKLwCEy.js → chunk-XZSTWKYB-kjAdbx6i.js} +266 -321
- package/es/{chunk-YBOYWFTD-CRiKEIiS.js → chunk-YBOYWFTD-C2IdGsg8.js} +5 -5
- package/es/classDiagram-VBA2DB6C-BQonl2jX.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-C9U3lqTc.js +29 -0
- package/es/{clone-yzFtXY5G.js → clone-DIGEZsKS.js} +1 -1
- package/es/{cose-bilkent-S5V4N54A-BM90wTBk.js → cose-bilkent-S5V4N54A-Cyxewg9z.js} +36 -31
- package/es/{cytoscape.esm-B_-hKv4-.js → cytoscape.esm-DBPri10E.js} +197 -155
- package/es/{dagre-DCYVBij1.js → dagre-BHOjJWBG.js} +26 -24
- package/es/{dagre-KLK3FWXG-Ced70SgJ.js → dagre-KLK3FWXG-CnJPDj7X.js} +17 -18
- package/es/{defaultLocale-yzzuPw6P.js → defaultLocale-aSMWOJHq.js} +4 -1
- package/es/{diagram-E7M64L7V-xZCloH_i.js → diagram-E7M64L7V-CBOCgbMd.js} +22 -24
- package/es/{diagram-IFDJBPK2-BTmFZhvz.js → diagram-IFDJBPK2-BtubJp0H.js} +11 -11
- package/es/{diagram-P4PSJMXO-DX_3B0LB.js → diagram-P4PSJMXO-CI30BBYG.js} +10 -10
- package/es/{dist-h4ggShny.js → dist-BpM0Gz7z.js} +1 -1
- package/es/{erDiagram-INFDFZHY-MJ_HVY-7.js → erDiagram-INFDFZHY-C8hYuPxm.js} +21 -21
- package/es/{flowDiagram-PKNHOUZH-CQIRy1sx.js → flowDiagram-PKNHOUZH-D5vrDkks.js} +40 -33
- package/es/{ganttDiagram-A5KZAMGK-Dw9bjWjx.js → ganttDiagram-A5KZAMGK-BmIEQBGq.js} +33 -21
- package/es/gitGraph-HDMCJU4V-x8fnR2OX.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js → gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js} +7 -7
- package/es/{graphlib-BMvIh7N7.js → graphlib-DqWOhV4K.js} +2 -2
- package/es/info-3K5VOQVL-CRBCVSej.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-CS64-uil.js → infoDiagram-LFFYTUFH-DOcKfbXf.js} +4 -4
- package/es/{init-sjaVZO3f.js → init-Co4dhKfe.js} +3 -1
- package/es/isEmpty-BJdINx-6.js +35 -0
- package/es/{ishikawaDiagram-PHBUUO56-C_Hw5UnV.js → ishikawaDiagram-PHBUUO56-DM1elxPS.js} +12 -12
- package/es/{journeyDiagram-4ABVD52K-CFFyM4Ar.js → journeyDiagram-4ABVD52K-BnYWOH1P.js} +11 -11
- package/es/{kanban-definition-K7BYSVSG-B_R-mA10.js → kanban-definition-K7BYSVSG-Ys7nAs7y.js} +27 -26
- package/es/{katex-C-qdUNlg.js → katex-olkKUfKs.js} +52 -62
- package/es/{line-D05MESIS.js → line-Cm2n2y9Z.js} +1 -1
- package/es/{linear-B8tPH2Pw.js → linear-D-yDc6KG.js} +6 -4
- package/es/{mermaid-parser.core-C_69nk7j.js → mermaid-parser.core-DFgQn74w.js} +8 -8
- package/es/mermaid.core-BzgA0NbC.js +680 -0
- package/es/{mindmap-definition-YRQLILUH-qgGUYYe3.js → mindmap-definition-YRQLILUH-Ca8psfLi.js} +26 -24
- package/es/{ordinal-CNQzPcrr.js → ordinal-95c16pGC.js} +1 -1
- package/es/packet-RMMSAZCW-CyE-elPF.js +3 -0
- package/es/pie-UPGHQEXC-EfdQ-_OF.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-B8-AVOmP.js → pieDiagram-SKSYHLDU-DhQSMJCw.js} +11 -11
- package/es/{quadrantDiagram-337W2JSQ-C2Z0CN4Z.js → quadrantDiagram-337W2JSQ-jOtIC8r0.js} +9 -9
- package/es/radar-KQ55EAFF-B68vkNB4.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-Cdj7PwWC.js → requirementDiagram-Z7DCOOCP-CNngzPE4.js} +18 -18
- package/es/{rolldown-runtime-CEY2VRuR.js → rolldown-runtime-Dv1pqm0U.js} +2 -2
- package/es/{sankeyDiagram-WA2Y5GQK-BNmU-dM1.js → sankeyDiagram-WA2Y5GQK-BgsyVNdD.js} +9 -9
- package/es/{sequenceDiagram-2WXFIKYE-pj0uPf22.js → sequenceDiagram-2WXFIKYE-BAc5PP9P.js} +46 -34
- package/es/{shiki-runtime-7QG17np_.js → shiki-runtime-BlKUZiZP.js} +41 -44
- package/es/{src-Dynw_Lub.js → src-3T61hYex.js} +1 -1
- package/es/{stateDiagram-RAJIS63D-BgCfMnGb.js → stateDiagram-RAJIS63D-153LjStx.js} +18 -18
- package/es/stateDiagram-v2-FVOUBMTO-BXEvy1YD.js +27 -0
- package/es/{timeline-definition-YZTLITO2-Bj5QKnBI.js → timeline-definition-YZTLITO2-BLhlkb_X.js} +8 -8
- package/es/treemap-KZPCXAKY-Dg_ShzRB.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-lpWcIvN6.js → vennDiagram-LZ73GAT5-BTYWphmf.js} +13 -13
- package/es/{xychartDiagram-JWTSCODW-De1M-7Yz.js → xychartDiagram-JWTSCODW-B9Nlu6S_.js} +29 -25
- package/package.json +1 -1
- package/es/architecture-PBZL5I3N-BRGGaMu3.js +0 -3
- package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +0 -29
- package/es/gitGraph-HDMCJU4V-oForq_Vw.js +0 -3
- package/es/info-3K5VOQVL-0F-ZLEMx.js +0 -3
- package/es/mermaid.core-BVGVwWcu.js +0 -1914
- package/es/packet-RMMSAZCW-CeqtQQ_e.js +0 -3
- package/es/pie-UPGHQEXC-BI60FhK4.js +0 -3
- package/es/radar-KQ55EAFF-CRwOOFw0.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +0 -27
- package/es/treemap-KZPCXAKY-BlOAFUbR.js +0 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./rolldown-runtime-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./rolldown-runtime-Dv1pqm0U.js";
|
|
2
2
|
import { B as o, C as s, E as c, H as l, O as u, R as d, S as f, U as p, V as m, _ as h, j as g, k as _, t as v, v as y, w as ee, x as b, z as x } from "./isArrayLikeObject-Dqk_yOP-.js";
|
|
3
|
-
import { D as S, M as C, O as te, S as w, _ as ne, a as T, b as re, f as E, g as ie, i as D, j as O, k as ae, l as oe, n as k, o as A, r as j, s as M, t as se, u as N, v as ce, x as le } from "./_baseUniq-
|
|
4
|
-
import { a as ue, d as de, f as fe, l as pe, n as me, o as P, p as he, s as F, t as ge, u as _e } from "./_basePickBy-
|
|
5
|
-
import { t as I } from "./
|
|
6
|
-
import {
|
|
3
|
+
import { D as S, M as C, O as te, S as w, _ as ne, a as T, b as re, f as E, g as ie, i as D, j as O, k as ae, l as oe, n as k, o as A, r as j, s as M, t as se, u as N, v as ce, x as le } from "./_baseUniq-CyFYmJd-.js";
|
|
4
|
+
import { a as ue, d as de, f as fe, l as pe, n as me, o as P, p as he, s as F, t as ge, u as _e } from "./_basePickBy-BL4DHvHb.js";
|
|
5
|
+
import { t as I } from "./isEmpty-BJdINx-6.js";
|
|
6
|
+
import { t as L } from "./clone-DIGEZsKS.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/langium@4.2.1/node_modules/langium/lib/syntax-tree.js
|
|
8
8
|
function R(e) {
|
|
9
9
|
return typeof e == "object" && !!e && typeof e.$type == "string";
|
|
@@ -1601,7 +1601,9 @@ var Hn = [
|
|
|
1601
1601
|
case "u":
|
|
1602
1602
|
In(n, "unicode");
|
|
1603
1603
|
break;
|
|
1604
|
-
case "y":
|
|
1604
|
+
case "y":
|
|
1605
|
+
In(n, "sticky");
|
|
1606
|
+
break;
|
|
1605
1607
|
}
|
|
1606
1608
|
if (this.idx !== this.input.length) throw Error("Redundant input: " + this.input.substring(this.idx));
|
|
1607
1609
|
return {
|
|
@@ -1666,12 +1668,14 @@ var Hn = [
|
|
|
1666
1668
|
case "!":
|
|
1667
1669
|
t = "NegativeLookahead";
|
|
1668
1670
|
break;
|
|
1669
|
-
case "<":
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1671
|
+
case "<":
|
|
1672
|
+
switch (this.popChar()) {
|
|
1673
|
+
case "=":
|
|
1674
|
+
t = "Lookbehind";
|
|
1675
|
+
break;
|
|
1676
|
+
case "!": t = "NegativeLookbehind";
|
|
1677
|
+
}
|
|
1678
|
+
break;
|
|
1675
1679
|
}
|
|
1676
1680
|
Ln(t);
|
|
1677
1681
|
let n = this.disjunction();
|
|
@@ -1723,9 +1727,11 @@ var Hn = [
|
|
|
1723
1727
|
atLeast: n,
|
|
1724
1728
|
atMost: Infinity
|
|
1725
1729
|
}, this.consumeChar("}");
|
|
1730
|
+
break;
|
|
1726
1731
|
}
|
|
1727
1732
|
if (e === !0 && t === void 0) return;
|
|
1728
1733
|
Ln(t);
|
|
1734
|
+
break;
|
|
1729
1735
|
}
|
|
1730
1736
|
if ((e !== !0 || t !== void 0) && Ln(t)) return this.peekChar(0) === "?" ? (this.consumeChar("?"), t.greedy = !1) : t.greedy = !0, t.type = "Quantifier", t.loc = this.loc(n), t;
|
|
1731
1737
|
}
|
|
@@ -1741,7 +1747,9 @@ var Hn = [
|
|
|
1741
1747
|
case "[":
|
|
1742
1748
|
e = this.characterClass();
|
|
1743
1749
|
break;
|
|
1744
|
-
case "(":
|
|
1750
|
+
case "(":
|
|
1751
|
+
e = this.group();
|
|
1752
|
+
break;
|
|
1745
1753
|
}
|
|
1746
1754
|
// istanbul ignore next
|
|
1747
1755
|
return e === void 0 && this.isPatternCharacter() && (e = this.patternCharacter()), Ln(e) ? (e.loc = this.loc(t), this.isQuantifier() && (e.quantifier = this.quantifier()), e) : Rn();
|
|
@@ -1811,7 +1819,9 @@ var Hn = [
|
|
|
1811
1819
|
case "w":
|
|
1812
1820
|
e = Vn;
|
|
1813
1821
|
break;
|
|
1814
|
-
case "W":
|
|
1822
|
+
case "W":
|
|
1823
|
+
e = Vn, t = !0;
|
|
1824
|
+
break;
|
|
1815
1825
|
}
|
|
1816
1826
|
// istanbul ignore next
|
|
1817
1827
|
return Ln(e) ? {
|
|
@@ -1835,7 +1845,9 @@ var Hn = [
|
|
|
1835
1845
|
case "t":
|
|
1836
1846
|
e = V(" ");
|
|
1837
1847
|
break;
|
|
1838
|
-
case "v":
|
|
1848
|
+
case "v":
|
|
1849
|
+
e = V("\v");
|
|
1850
|
+
break;
|
|
1839
1851
|
}
|
|
1840
1852
|
// istanbul ignore next
|
|
1841
1853
|
return Ln(e) ? {
|
|
@@ -1958,7 +1970,9 @@ var Hn = [
|
|
|
1958
1970
|
case "?":
|
|
1959
1971
|
this.consumeChar("?"), this.consumeChar(":"), e = !1;
|
|
1960
1972
|
break;
|
|
1961
|
-
default:
|
|
1973
|
+
default:
|
|
1974
|
+
this.groupIdx++;
|
|
1975
|
+
break;
|
|
1962
1976
|
}
|
|
1963
1977
|
let t = this.disjunction();
|
|
1964
1978
|
this.consumeChar(")");
|
|
@@ -2196,7 +2210,9 @@ var Hn = [
|
|
|
2196
2210
|
case "GroupBackReference":
|
|
2197
2211
|
this.visitGroupBackReference(e);
|
|
2198
2212
|
break;
|
|
2199
|
-
case "Quantifier":
|
|
2213
|
+
case "Quantifier":
|
|
2214
|
+
this.visitQuantifier(e);
|
|
2215
|
+
break;
|
|
2200
2216
|
}
|
|
2201
2217
|
this.visitChildren(e);
|
|
2202
2218
|
}
|
|
@@ -2302,7 +2318,9 @@ function nr(e) {
|
|
|
2302
2318
|
case "k":
|
|
2303
2319
|
s(n.indexOf(">", r) - r + 1);
|
|
2304
2320
|
break;
|
|
2305
|
-
default:
|
|
2321
|
+
default:
|
|
2322
|
+
s(2);
|
|
2323
|
+
break;
|
|
2306
2324
|
}
|
|
2307
2325
|
break;
|
|
2308
2326
|
case "[":
|
|
@@ -2330,18 +2348,24 @@ function nr(e) {
|
|
|
2330
2348
|
case "!":
|
|
2331
2349
|
a = r, r += 3, i(), e += n.substr(a, r - a);
|
|
2332
2350
|
break;
|
|
2333
|
-
case "<":
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2351
|
+
case "<":
|
|
2352
|
+
switch (n[r + 3]) {
|
|
2353
|
+
case "=":
|
|
2354
|
+
case "!":
|
|
2355
|
+
a = r, r += 4, i(), e += n.substr(a, r - a);
|
|
2356
|
+
break;
|
|
2357
|
+
default:
|
|
2358
|
+
o(n.indexOf(">", r) - r + 1), e += i() + "|$)";
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
break;
|
|
2340
2362
|
}
|
|
2341
2363
|
else o(1), e += i() + "|$)";
|
|
2342
2364
|
break;
|
|
2343
2365
|
case ")": return ++r, e;
|
|
2344
|
-
default:
|
|
2366
|
+
default:
|
|
2367
|
+
s(1);
|
|
2368
|
+
break;
|
|
2345
2369
|
}
|
|
2346
2370
|
return e;
|
|
2347
2371
|
}
|
|
@@ -2493,10 +2517,9 @@ function Tr(e, t) {
|
|
|
2493
2517
|
lookahead: e.lookahead,
|
|
2494
2518
|
parenthesized: e.parenthesized
|
|
2495
2519
|
});
|
|
2496
|
-
}
|
|
2497
|
-
if (
|
|
2498
|
-
if (
|
|
2499
|
-
if (Gt(e)) {
|
|
2520
|
+
} else if (Pt(e)) return kr(e);
|
|
2521
|
+
else if (_n(e)) return Or(e);
|
|
2522
|
+
else if (Gt(e)) {
|
|
2500
2523
|
let n = e.regex.lastIndexOf("/"), r = e.regex.substring(1, n), i = e.regex.substring(n + 1);
|
|
2501
2524
|
return t && (t.i = i.includes("i"), t.s = i.includes("s"), t.u = i.includes("u")), Mr(r, {
|
|
2502
2525
|
cardinality: e.cardinality,
|
|
@@ -2504,13 +2527,12 @@ function Tr(e, t) {
|
|
|
2504
2527
|
parenthesized: e.parenthesized,
|
|
2505
2528
|
wrap: !1
|
|
2506
2529
|
});
|
|
2507
|
-
}
|
|
2508
|
-
if (bn(e)) return Mr(wr, {
|
|
2530
|
+
} else if (bn(e)) return Mr(wr, {
|
|
2509
2531
|
cardinality: e.cardinality,
|
|
2510
2532
|
lookahead: e.lookahead,
|
|
2511
2533
|
parenthesized: e.parenthesized
|
|
2512
2534
|
});
|
|
2513
|
-
throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`);
|
|
2535
|
+
else throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`);
|
|
2514
2536
|
}
|
|
2515
2537
|
function Er(e) {
|
|
2516
2538
|
return Mr(e.elements.map((e) => Tr(e)).join("|"), {
|
|
@@ -2890,44 +2912,43 @@ function ji(e) {
|
|
|
2890
2912
|
idx: e.idx
|
|
2891
2913
|
};
|
|
2892
2914
|
return ue(e.label) && (t.label = e.label), t;
|
|
2893
|
-
}
|
|
2894
|
-
if (e instanceof wi) return {
|
|
2915
|
+
} else if (e instanceof wi) return {
|
|
2895
2916
|
type: "Alternative",
|
|
2896
2917
|
definition: t(e.definition)
|
|
2897
2918
|
};
|
|
2898
|
-
if (e instanceof Ti) return {
|
|
2919
|
+
else if (e instanceof Ti) return {
|
|
2899
2920
|
type: "Option",
|
|
2900
2921
|
idx: e.idx,
|
|
2901
2922
|
definition: t(e.definition)
|
|
2902
2923
|
};
|
|
2903
|
-
if (e instanceof Ei) return {
|
|
2924
|
+
else if (e instanceof Ei) return {
|
|
2904
2925
|
type: "RepetitionMandatory",
|
|
2905
2926
|
idx: e.idx,
|
|
2906
2927
|
definition: t(e.definition)
|
|
2907
2928
|
};
|
|
2908
|
-
if (e instanceof Di) return {
|
|
2929
|
+
else if (e instanceof Di) return {
|
|
2909
2930
|
type: "RepetitionMandatoryWithSeparator",
|
|
2910
2931
|
idx: e.idx,
|
|
2911
2932
|
separator: ji(new U({ terminalType: e.separator })),
|
|
2912
2933
|
definition: t(e.definition)
|
|
2913
2934
|
};
|
|
2914
|
-
if (e instanceof Oi) return {
|
|
2935
|
+
else if (e instanceof Oi) return {
|
|
2915
2936
|
type: "RepetitionWithSeparator",
|
|
2916
2937
|
idx: e.idx,
|
|
2917
2938
|
separator: ji(new U({ terminalType: e.separator })),
|
|
2918
2939
|
definition: t(e.definition)
|
|
2919
2940
|
};
|
|
2920
|
-
if (e instanceof H) return {
|
|
2941
|
+
else if (e instanceof H) return {
|
|
2921
2942
|
type: "Repetition",
|
|
2922
2943
|
idx: e.idx,
|
|
2923
2944
|
definition: t(e.definition)
|
|
2924
2945
|
};
|
|
2925
|
-
if (e instanceof ki) return {
|
|
2946
|
+
else if (e instanceof ki) return {
|
|
2926
2947
|
type: "Alternation",
|
|
2927
2948
|
idx: e.idx,
|
|
2928
2949
|
definition: t(e.definition)
|
|
2929
2950
|
};
|
|
2930
|
-
if (e instanceof U) {
|
|
2951
|
+
else if (e instanceof U) {
|
|
2931
2952
|
let t = {
|
|
2932
2953
|
type: "Terminal",
|
|
2933
2954
|
name: e.terminalType.name,
|
|
@@ -2937,14 +2958,13 @@ function ji(e) {
|
|
|
2937
2958
|
ue(e.label) && (t.terminalLabel = e.label);
|
|
2938
2959
|
let n = e.terminalType.PATTERN;
|
|
2939
2960
|
return e.terminalType.PATTERN && (t.pattern = oi(n) ? n.source : n), t;
|
|
2940
|
-
}
|
|
2941
|
-
if (e instanceof Ci) return {
|
|
2961
|
+
} else if (e instanceof Ci) return {
|
|
2942
2962
|
type: "Rule",
|
|
2943
2963
|
name: e.name,
|
|
2944
2964
|
orgText: e.orgText,
|
|
2945
2965
|
definition: t(e.definition)
|
|
2946
2966
|
};
|
|
2947
|
-
throw Error("non exhaustive match");
|
|
2967
|
+
else throw Error("non exhaustive match");
|
|
2948
2968
|
}
|
|
2949
2969
|
//#endregion
|
|
2950
2970
|
//#region ../../node_modules/.pnpm/@chevrotain+gast@11.1.2/node_modules/@chevrotain/gast/lib/src/visitor.js
|
|
@@ -2993,7 +3013,7 @@ function Ni(e) {
|
|
|
2993
3013
|
return e instanceof wi || e instanceof Ti || e instanceof H || e instanceof Ei || e instanceof Di || e instanceof Oi || e instanceof U || e instanceof Ci;
|
|
2994
3014
|
}
|
|
2995
3015
|
function Pi(e, t = []) {
|
|
2996
|
-
return e instanceof Ti || e instanceof H || e instanceof Oi ? !0 : e instanceof ki ? fi(e.definition, (e) => Pi(e, t)) : e instanceof Si && ei(t, e) ? !1 : e instanceof xi
|
|
3016
|
+
return e instanceof Ti || e instanceof H || e instanceof Oi ? !0 : e instanceof ki ? fi(e.definition, (e) => Pi(e, t)) : e instanceof Si && ei(t, e) ? !1 : e instanceof xi ? (e instanceof Si && t.push(e), Jr(e.definition, (e) => Pi(e, t))) : !1;
|
|
2997
3017
|
}
|
|
2998
3018
|
function Fi(e) {
|
|
2999
3019
|
return e instanceof ki;
|
|
@@ -3082,8 +3102,7 @@ function Bi(e) {
|
|
|
3082
3102
|
return pi(t);
|
|
3083
3103
|
}
|
|
3084
3104
|
function Vi(e) {
|
|
3085
|
-
|
|
3086
|
-
return pi(fe(t));
|
|
3105
|
+
return pi(fe(F(e.definition, (e) => zi(e))));
|
|
3087
3106
|
}
|
|
3088
3107
|
function Hi(e) {
|
|
3089
3108
|
return [e.terminalType];
|
|
@@ -3268,8 +3287,7 @@ function oa(e, t) {
|
|
|
3268
3287
|
if (t instanceof RegExp) {
|
|
3269
3288
|
let n = Yi(t), r = new aa(e);
|
|
3270
3289
|
return r.visit(n), r.found;
|
|
3271
|
-
}
|
|
3272
|
-
return pe(t, (t) => ei(e, t.charCodeAt(0))) !== void 0;
|
|
3290
|
+
} else return pe(t, (t) => ei(e, t.charCodeAt(0))) !== void 0;
|
|
3273
3291
|
}
|
|
3274
3292
|
//#endregion
|
|
3275
3293
|
//#region ../../node_modules/.pnpm/chevrotain@11.1.2/node_modules/chevrotain/lib/src/scan/lexer.js
|
|
@@ -3315,17 +3333,15 @@ function la(e, t) {
|
|
|
3315
3333
|
"w",
|
|
3316
3334
|
"W"
|
|
3317
3335
|
], e[1]) ? e[1] : Da(t);
|
|
3318
|
-
}
|
|
3319
|
-
if (
|
|
3320
|
-
if (typeof t == "
|
|
3321
|
-
if (typeof t == "string") {
|
|
3336
|
+
} else if (d(t)) return i = !0, { exec: t };
|
|
3337
|
+
else if (typeof t == "object") return i = !0, t;
|
|
3338
|
+
else if (typeof t == "string") {
|
|
3322
3339
|
if (t.length === 1) return t;
|
|
3323
3340
|
{
|
|
3324
3341
|
let e = t.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
|
|
3325
3342
|
return Da(new RegExp(e));
|
|
3326
3343
|
}
|
|
3327
|
-
}
|
|
3328
|
-
throw Error("non exhaustive match");
|
|
3344
|
+
} else throw Error("non exhaustive match");
|
|
3329
3345
|
});
|
|
3330
3346
|
});
|
|
3331
3347
|
let o, s, c, l, u;
|
|
@@ -3381,7 +3397,7 @@ function la(e, t) {
|
|
|
3381
3397
|
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
|
|
3382
3398
|
else {
|
|
3383
3399
|
let i = $i(n.PATTERN, t.ensureOptimizations);
|
|
3384
|
-
|
|
3400
|
+
I(i) && (v = !1), M(i, (t) => {
|
|
3385
3401
|
La(e, t, _[r]);
|
|
3386
3402
|
});
|
|
3387
3403
|
}
|
|
@@ -3442,7 +3458,7 @@ function ha(e) {
|
|
|
3442
3458
|
this.found = !0;
|
|
3443
3459
|
}
|
|
3444
3460
|
}
|
|
3445
|
-
|
|
3461
|
+
return F(T(e, (e) => {
|
|
3446
3462
|
let n = e.PATTERN;
|
|
3447
3463
|
try {
|
|
3448
3464
|
let e = Yi(n), r = new t();
|
|
@@ -3451,16 +3467,14 @@ function ha(e) {
|
|
|
3451
3467
|
/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/
|
|
3452
3468
|
return ma.test(n.source);
|
|
3453
3469
|
}
|
|
3454
|
-
})
|
|
3455
|
-
return F(n, (e) => ({
|
|
3470
|
+
}), (e) => ({
|
|
3456
3471
|
message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain end of input anchor '$'\n See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
|
|
3457
3472
|
type: W.EOI_ANCHOR_FOUND,
|
|
3458
3473
|
tokenTypes: [e]
|
|
3459
3474
|
}));
|
|
3460
3475
|
}
|
|
3461
3476
|
function ga(e) {
|
|
3462
|
-
|
|
3463
|
-
return F(t, (e) => ({
|
|
3477
|
+
return F(T(e, (e) => e.PATTERN.test("")), (e) => ({
|
|
3464
3478
|
message: "Token Type: ->" + e.name + "<- static 'PATTERN' must not match an empty string",
|
|
3465
3479
|
type: W.EMPTY_MATCH_PATTERN,
|
|
3466
3480
|
tokenTypes: [e]
|
|
@@ -3476,7 +3490,7 @@ function va(e) {
|
|
|
3476
3490
|
this.found = !0;
|
|
3477
3491
|
}
|
|
3478
3492
|
}
|
|
3479
|
-
|
|
3493
|
+
return F(T(e, (e) => {
|
|
3480
3494
|
let n = e.PATTERN;
|
|
3481
3495
|
try {
|
|
3482
3496
|
let e = Yi(n), r = new t();
|
|
@@ -3485,19 +3499,17 @@ function va(e) {
|
|
|
3485
3499
|
/* istanbul ignore next - cannot ensure an error in regexp-to-ast*/
|
|
3486
3500
|
return _a.test(n.source);
|
|
3487
3501
|
}
|
|
3488
|
-
})
|
|
3489
|
-
return F(n, (e) => ({
|
|
3502
|
+
}), (e) => ({
|
|
3490
3503
|
message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
|
|
3491
3504
|
type: W.SOI_ANCHOR_FOUND,
|
|
3492
3505
|
tokenTypes: [e]
|
|
3493
3506
|
}));
|
|
3494
3507
|
}
|
|
3495
3508
|
function ya(e) {
|
|
3496
|
-
|
|
3509
|
+
return F(T(e, (e) => {
|
|
3497
3510
|
let t = e[sa];
|
|
3498
3511
|
return t instanceof RegExp && (t.multiline || t.global);
|
|
3499
|
-
})
|
|
3500
|
-
return F(t, (e) => ({
|
|
3512
|
+
}), (e) => ({
|
|
3501
3513
|
message: "Token Type: ->" + e.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
|
|
3502
3514
|
type: W.UNSUPPORTED_FLAGS_FOUND,
|
|
3503
3515
|
tokenTypes: [e]
|
|
@@ -3505,9 +3517,7 @@ function ya(e) {
|
|
|
3505
3517
|
}
|
|
3506
3518
|
function ba(e) {
|
|
3507
3519
|
let t = [], n = F(e, (n) => k(e, (e, r) => n.PATTERN.source === r.PATTERN.source && !ei(t, r) && r.PATTERN !== io.NA ? (t.push(r), e.push(r), e) : e, []));
|
|
3508
|
-
n = Lr(n)
|
|
3509
|
-
let r = T(n, (e) => e.length > 1);
|
|
3510
|
-
return F(r, (e) => {
|
|
3520
|
+
return n = Lr(n), F(T(n, (e) => e.length > 1), (e) => {
|
|
3511
3521
|
let t = F(e, (e) => e.name);
|
|
3512
3522
|
return {
|
|
3513
3523
|
message: `The same RegExp pattern ->${Yr(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,
|
|
@@ -3517,20 +3527,18 @@ function ba(e) {
|
|
|
3517
3527
|
});
|
|
3518
3528
|
}
|
|
3519
3529
|
function xa(e) {
|
|
3520
|
-
|
|
3530
|
+
return F(T(e, (e) => {
|
|
3521
3531
|
if (!P(e, "GROUP")) return !1;
|
|
3522
3532
|
let t = e.GROUP;
|
|
3523
3533
|
return t !== io.SKIPPED && t !== io.NA && !ue(t);
|
|
3524
|
-
})
|
|
3525
|
-
return F(t, (e) => ({
|
|
3534
|
+
}), (e) => ({
|
|
3526
3535
|
message: "Token Type: ->" + e.name + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",
|
|
3527
3536
|
type: W.INVALID_GROUP_TYPE_FOUND,
|
|
3528
3537
|
tokenTypes: [e]
|
|
3529
3538
|
}));
|
|
3530
3539
|
}
|
|
3531
3540
|
function Sa(e, t) {
|
|
3532
|
-
|
|
3533
|
-
return F(n, (e) => ({
|
|
3541
|
+
return F(T(e, (e) => e.PUSH_MODE !== void 0 && !ei(t, e.PUSH_MODE)), (e) => ({
|
|
3534
3542
|
message: `Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,
|
|
3535
3543
|
type: W.PUSH_MODE_DOES_NOT_EXIST,
|
|
3536
3544
|
tokenTypes: [e]
|
|
@@ -3567,11 +3575,10 @@ function wa(e, t) {
|
|
|
3567
3575
|
if (Ea(t)) return !1;
|
|
3568
3576
|
let n = t.exec(e);
|
|
3569
3577
|
return n !== null && n.index === 0;
|
|
3570
|
-
}
|
|
3571
|
-
if (
|
|
3572
|
-
if (
|
|
3573
|
-
|
|
3574
|
-
throw Error("non exhaustive match");
|
|
3578
|
+
} else if (d(t)) return t(e, 0, [], {});
|
|
3579
|
+
else if (P(t, "exec")) return t.exec(e, 0, [], {});
|
|
3580
|
+
else if (typeof t == "string") return t === e;
|
|
3581
|
+
else throw Error("non exhaustive match");
|
|
3575
3582
|
}
|
|
3576
3583
|
function Ta(e) {
|
|
3577
3584
|
return pe([
|
|
@@ -3610,19 +3617,15 @@ function Oa(e, t, n) {
|
|
|
3610
3617
|
type: W.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST
|
|
3611
3618
|
}), P(e, "modes") && M(e.modes, (e, t) => {
|
|
3612
3619
|
M(e, (n, i) => {
|
|
3613
|
-
|
|
3620
|
+
j(n) ? r.push({
|
|
3614
3621
|
message: `A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,
|
|
3615
3622
|
type: W.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
|
|
3616
|
-
})
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
!j(i) && !ei(e, i) && r.push({
|
|
3621
|
-
message: `A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,
|
|
3622
|
-
type: W.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE
|
|
3623
|
-
});
|
|
3623
|
+
}) : P(n, "LONGER_ALT") && M(m(n.LONGER_ALT) ? n.LONGER_ALT : [n.LONGER_ALT], (i) => {
|
|
3624
|
+
!j(i) && !ei(e, i) && r.push({
|
|
3625
|
+
message: `A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,
|
|
3626
|
+
type: W.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE
|
|
3624
3627
|
});
|
|
3625
|
-
}
|
|
3628
|
+
});
|
|
3626
3629
|
});
|
|
3627
3630
|
}), r;
|
|
3628
3631
|
}
|
|
@@ -3644,8 +3647,8 @@ function ka(e, t, n) {
|
|
|
3644
3647
|
}), r;
|
|
3645
3648
|
}
|
|
3646
3649
|
function Aa(e) {
|
|
3647
|
-
let t = {}
|
|
3648
|
-
return M(
|
|
3650
|
+
let t = {};
|
|
3651
|
+
return M(S(e), (n) => {
|
|
3649
3652
|
let r = e[n];
|
|
3650
3653
|
/* istanbul ignore else */
|
|
3651
3654
|
if (m(r)) t[n] = [];
|
|
@@ -3669,7 +3672,7 @@ var Na = {
|
|
|
3669
3672
|
for (let n = this.lastIndex; n < t; n++) {
|
|
3670
3673
|
let t = e.charCodeAt(n);
|
|
3671
3674
|
if (t === 10) return this.lastIndex = n + 1, !0;
|
|
3672
|
-
if (t === 13) return
|
|
3675
|
+
if (t === 13) return e.charCodeAt(n + 1) === 10 ? this.lastIndex = n + 2 : this.lastIndex = n + 1, !0;
|
|
3673
3676
|
}
|
|
3674
3677
|
return !1;
|
|
3675
3678
|
},
|
|
@@ -3688,10 +3691,9 @@ function Pa(e, t) {
|
|
|
3688
3691
|
};
|
|
3689
3692
|
}
|
|
3690
3693
|
return !1;
|
|
3691
|
-
}
|
|
3692
|
-
if (
|
|
3693
|
-
|
|
3694
|
-
throw Error("non exhaustive match");
|
|
3694
|
+
} else if (ue(e.PATTERN)) return !1;
|
|
3695
|
+
else if (ja(e)) return { issue: W.CUSTOM_LINE_BREAK };
|
|
3696
|
+
else throw Error("non exhaustive match");
|
|
3695
3697
|
}
|
|
3696
3698
|
function Fa(e, t) {
|
|
3697
3699
|
/* istanbul ignore else */
|
|
@@ -3712,7 +3714,7 @@ function za(e) {
|
|
|
3712
3714
|
return e < 256 ? e : Ra[e];
|
|
3713
3715
|
}
|
|
3714
3716
|
function Ba() {
|
|
3715
|
-
if (
|
|
3717
|
+
if (I(Ra)) {
|
|
3716
3718
|
Ra = Array(65536);
|
|
3717
3719
|
for (let e = 0; e < 65536; e++) Ra[e] = e > 255 ? 255 + ~~(e / 255) : e;
|
|
3718
3720
|
}
|
|
@@ -3734,11 +3736,11 @@ function Ga(e) {
|
|
|
3734
3736
|
});
|
|
3735
3737
|
}
|
|
3736
3738
|
function Ka(e) {
|
|
3737
|
-
let t =
|
|
3739
|
+
let t = L(e), n = e, r = !0;
|
|
3738
3740
|
for (; r;) {
|
|
3739
3741
|
n = Lr(fe(F(n, (e) => e.CATEGORIES)));
|
|
3740
3742
|
let e = Ur(n, t);
|
|
3741
|
-
t = t.concat(e),
|
|
3743
|
+
t = t.concat(e), I(e) ? r = !1 : n = e;
|
|
3742
3744
|
}
|
|
3743
3745
|
return t;
|
|
3744
3746
|
}
|
|
@@ -3817,8 +3819,7 @@ var io = class {
|
|
|
3817
3819
|
this.traceInitIndent < this.traceInitMaxIdent && console.log(`${n}--> <${e}>`);
|
|
3818
3820
|
let { time: r, value: i } = _i(t), a = r > 10 ? console.warn : console.log;
|
|
3819
3821
|
return this.traceInitIndent < this.traceInitMaxIdent && a(`${n}<-- <${e}> time: ${r}ms`), this.traceInitIndent--, i;
|
|
3820
|
-
}
|
|
3821
|
-
return t();
|
|
3822
|
+
} else return t();
|
|
3822
3823
|
}, typeof t == "boolean") throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");
|
|
3823
3824
|
this.config = Fr({}, ro, t);
|
|
3824
3825
|
let n = this.config.traceInitPerf;
|
|
@@ -3829,9 +3830,9 @@ var io = class {
|
|
|
3829
3830
|
else if (this.config.lineTerminatorCharacters === ro.lineTerminatorCharacters) throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");
|
|
3830
3831
|
if (t.safeMode && t.ensureOptimizations) throw Error("\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.");
|
|
3831
3832
|
this.trackStartLines = /full|onlyStart/i.test(this.config.positionTracking), this.trackEndLines = /full/i.test(this.config.positionTracking), m(e) ? n = {
|
|
3832
|
-
modes: { defaultMode:
|
|
3833
|
+
modes: { defaultMode: L(e) },
|
|
3833
3834
|
defaultMode: ca
|
|
3834
|
-
} : (r = !1, n =
|
|
3835
|
+
} : (r = !1, n = L(e));
|
|
3835
3836
|
}), this.config.skipValidations === !1 && (this.TRACE_INIT("performRuntimeChecks", () => {
|
|
3836
3837
|
this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(Oa(n, this.trackStartLines, this.config.lineTerminatorCharacters));
|
|
3837
3838
|
}), this.TRACE_INIT("performWarningRuntimeChecks", () => {
|
|
@@ -3844,7 +3845,7 @@ var io = class {
|
|
|
3844
3845
|
this.TRACE_INIT(`Mode: <${n}> processing`, () => {
|
|
3845
3846
|
if (this.modes.push(n), this.config.skipValidations === !1 && this.TRACE_INIT("validatePatterns", () => {
|
|
3846
3847
|
this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(ua(e, i));
|
|
3847
|
-
}),
|
|
3848
|
+
}), I(this.lexerDefinitionErrors)) {
|
|
3848
3849
|
Ga(e);
|
|
3849
3850
|
let r;
|
|
3850
3851
|
this.TRACE_INIT("analyzeTokenTypes", () => {
|
|
@@ -3858,7 +3859,7 @@ var io = class {
|
|
|
3858
3859
|
}), this.patternIdxToConfig[n] = r.patternIdxToConfig, this.charCodeToPatternIdxToConfig[n] = r.charCodeToPatternIdxToConfig, this.emptyGroups = Fr({}, this.emptyGroups, r.emptyGroups), this.hasCustom = r.hasCustom || this.hasCustom, this.canModeBeOptimized[n] = r.canBeOptimized;
|
|
3859
3860
|
}
|
|
3860
3861
|
});
|
|
3861
|
-
}), this.defaultMode = n.defaultMode, !
|
|
3862
|
+
}), this.defaultMode = n.defaultMode, !I(this.lexerDefinitionErrors) && !this.config.deferDefinitionErrorsHandling) {
|
|
3862
3863
|
let e = F(this.lexerDefinitionErrors, (e) => e.message).join("-----------------------\n");
|
|
3863
3864
|
throw Error("Errors detected in definition of Lexer:\n" + e);
|
|
3864
3865
|
}
|
|
@@ -3872,7 +3873,7 @@ var io = class {
|
|
|
3872
3873
|
this.hasCustom ? (this.addToken = this.addTokenUsingPush, this.handlePayload = this.handlePayloadWithCustom) : (this.addToken = this.addTokenUsingMemberAccess, this.handlePayload = this.handlePayloadNoCustom);
|
|
3873
3874
|
}), this.TRACE_INIT("Failed Optimization Warnings", () => {
|
|
3874
3875
|
let e = k(this.canModeBeOptimized, (e, t, n) => (t === !1 && e.push(n), e), []);
|
|
3875
|
-
if (t.ensureOptimizations && !
|
|
3876
|
+
if (t.ensureOptimizations && !I(e)) throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
3876
3877
|
Or inspect the console log for details on how to resolve these issues.`);
|
|
3877
3878
|
}), this.TRACE_INIT("clearRegExpParserCache", () => {
|
|
3878
3879
|
Xi();
|
|
@@ -3882,7 +3883,7 @@ var io = class {
|
|
|
3882
3883
|
});
|
|
3883
3884
|
}
|
|
3884
3885
|
tokenize(e, t = this.defaultMode) {
|
|
3885
|
-
if (!
|
|
3886
|
+
if (!I(this.lexerDefinitionErrors)) {
|
|
3886
3887
|
let e = F(this.lexerDefinitionErrors, (e) => e.message).join("-----------------------\n");
|
|
3887
3888
|
throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n" + e);
|
|
3888
3889
|
}
|
|
@@ -4086,11 +4087,7 @@ var So = {
|
|
|
4086
4087
|
},
|
|
4087
4088
|
buildNoViableAltMessage({ expectedPathsPerAlt: e, actual: t, previous: n, customUserDescription: r, ruleName: i }) {
|
|
4088
4089
|
let a = "\nbut found: '" + Yr(t).image + "'";
|
|
4089
|
-
|
|
4090
|
-
{
|
|
4091
|
-
let t = k(e, (e, t) => e.concat(t), []), n = F(t, (e) => `[${F(e, (e) => ao(e)).join(", ")}]`);
|
|
4092
|
-
return `Expecting: one of these possible Token sequences:\n${F(n, (e, t) => ` ${t + 1}. ${e}`).join("\n")}` + a;
|
|
4093
|
-
}
|
|
4090
|
+
return r ? "Expecting: " + r + a : `Expecting: one of these possible Token sequences:\n${F(F(k(e, (e, t) => e.concat(t), []), (e) => `[${F(e, (e) => ao(e)).join(", ")}]`), (e, t) => ` ${t + 1}. ${e}`).join("\n")}` + a;
|
|
4094
4091
|
},
|
|
4095
4092
|
buildEarlyExitMessage({ expectedIterationPaths: e, actual: t, customUserDescription: n, ruleName: r }) {
|
|
4096
4093
|
let i = "\nbut found: '" + Yr(t).image + "'";
|
|
@@ -4188,7 +4185,7 @@ var Eo = class extends Mi {
|
|
|
4188
4185
|
}
|
|
4189
4186
|
startWalking() {
|
|
4190
4187
|
if (this.found = !1, this.path.ruleStack[0] !== this.topProd.name) throw Error("The path does not start with the walker's top Rule!");
|
|
4191
|
-
return this.ruleStack =
|
|
4188
|
+
return this.ruleStack = L(this.path.ruleStack).reverse(), this.occurrenceStack = L(this.path.occurrenceStack).reverse(), this.ruleStack.pop(), this.occurrenceStack.pop(), this.updateExpectedNext(), this.walk(this.topProd), this.possibleTokTypes;
|
|
4192
4189
|
}
|
|
4193
4190
|
walk(e, t = []) {
|
|
4194
4191
|
this.found || super.walk(e, t);
|
|
@@ -4200,7 +4197,7 @@ var Eo = class extends Mi {
|
|
|
4200
4197
|
}
|
|
4201
4198
|
}
|
|
4202
4199
|
updateExpectedNext() {
|
|
4203
|
-
|
|
4200
|
+
I(this.ruleStack) ? (this.nextProductionName = "", this.nextProductionOccurrence = 0, this.isAtEndOfPath = !0) : (this.nextProductionName = this.ruleStack.pop(), this.nextProductionOccurrence = this.occurrenceStack.pop());
|
|
4204
4201
|
}
|
|
4205
4202
|
}, Oo = class extends Do {
|
|
4206
4203
|
constructor(e, t) {
|
|
@@ -4253,7 +4250,7 @@ var Eo = class extends Mi {
|
|
|
4253
4250
|
}
|
|
4254
4251
|
};
|
|
4255
4252
|
function Po(e, t, n = []) {
|
|
4256
|
-
n =
|
|
4253
|
+
n = L(n);
|
|
4257
4254
|
let r = [], i = 0;
|
|
4258
4255
|
function a(t) {
|
|
4259
4256
|
return t.concat(Wr(e, i + 1));
|
|
@@ -4271,7 +4268,7 @@ function Po(e, t, n = []) {
|
|
|
4271
4268
|
else if (t instanceof Oi) r = o(t.definition.concat([new H({ definition: [new U({ terminalType: t.separator })].concat(t.definition) })]));
|
|
4272
4269
|
else if (t instanceof H) r = o(t.definition.concat([new H({ definition: t.definition })]));
|
|
4273
4270
|
else if (t instanceof ki) return M(t.definition, (e) => {
|
|
4274
|
-
|
|
4271
|
+
I(e.definition) === !1 && (r = o(e.definition));
|
|
4275
4272
|
}), r;
|
|
4276
4273
|
else if (t instanceof U) n.push(t.terminalType);
|
|
4277
4274
|
else throw Error("non exhaustive match");
|
|
@@ -4289,14 +4286,14 @@ function Fo(e, t, n, r) {
|
|
|
4289
4286
|
def: e,
|
|
4290
4287
|
ruleStack: [],
|
|
4291
4288
|
occurrenceStack: []
|
|
4292
|
-
}); !
|
|
4289
|
+
}); !I(d);) {
|
|
4293
4290
|
let e = d.pop();
|
|
4294
4291
|
if (e === o) {
|
|
4295
4292
|
s && _e(d).idx <= l && d.pop();
|
|
4296
4293
|
continue;
|
|
4297
4294
|
}
|
|
4298
4295
|
let r = e.def, f = e.idx, p = e.ruleStack, m = e.occurrenceStack;
|
|
4299
|
-
if (
|
|
4296
|
+
if (I(r)) continue;
|
|
4300
4297
|
let h = r[0];
|
|
4301
4298
|
/* istanbul ignore else */
|
|
4302
4299
|
if (h === i) {
|
|
@@ -4328,9 +4325,9 @@ function Fo(e, t, n, r) {
|
|
|
4328
4325
|
}), s = !0;
|
|
4329
4326
|
else throw Error("non exhaustive match");
|
|
4330
4327
|
else if (h instanceof Si) {
|
|
4331
|
-
let e =
|
|
4328
|
+
let e = L(p);
|
|
4332
4329
|
e.push(h.nonTerminalName);
|
|
4333
|
-
let t =
|
|
4330
|
+
let t = L(m);
|
|
4334
4331
|
t.push(h.idx);
|
|
4335
4332
|
let n = {
|
|
4336
4333
|
idx: f,
|
|
@@ -4433,9 +4430,9 @@ function Fo(e, t, n, r) {
|
|
|
4433
4430
|
return u;
|
|
4434
4431
|
}
|
|
4435
4432
|
function Io(e, t, n, r) {
|
|
4436
|
-
let i =
|
|
4433
|
+
let i = L(n);
|
|
4437
4434
|
i.push(e.name);
|
|
4438
|
-
let a =
|
|
4435
|
+
let a = L(r);
|
|
4439
4436
|
return a.push(1), {
|
|
4440
4437
|
idx: t,
|
|
4441
4438
|
def: e.definition,
|
|
@@ -4485,17 +4482,16 @@ function Vo(e, t, n, r) {
|
|
|
4485
4482
|
}
|
|
4486
4483
|
};
|
|
4487
4484
|
if (a && !r) {
|
|
4488
|
-
let t = F(e, (e) => fe(e)),
|
|
4485
|
+
let t = k(F(e, (e) => fe(e)), (e, t, n) => (M(t, (t) => {
|
|
4489
4486
|
P(e, t.tokenTypeIdx) || (e[t.tokenTypeIdx] = n), M(t.categoryMatches, (t) => {
|
|
4490
4487
|
P(e, t) || (e[t] = n);
|
|
4491
4488
|
});
|
|
4492
4489
|
}), e), {});
|
|
4493
4490
|
return function() {
|
|
4494
4491
|
let e = this.LA(1);
|
|
4495
|
-
return
|
|
4492
|
+
return t[e.tokenTypeIdx];
|
|
4496
4493
|
};
|
|
4497
|
-
}
|
|
4498
|
-
return function() {
|
|
4494
|
+
} else return function() {
|
|
4499
4495
|
for (let t = 0; t < i; t++) {
|
|
4500
4496
|
let r = e[t], i = r.length;
|
|
4501
4497
|
nextPath: for (let e = 0; e < i; e++) {
|
|
@@ -4510,13 +4506,12 @@ function Ho(e, t, n) {
|
|
|
4510
4506
|
let r = Jr(e, (e) => e.length === 1), i = e.length;
|
|
4511
4507
|
if (r && !n) {
|
|
4512
4508
|
let t = fe(e);
|
|
4513
|
-
if (t.length === 1 &&
|
|
4509
|
+
if (t.length === 1 && I(t[0].categoryMatches)) {
|
|
4514
4510
|
let e = t[0].tokenTypeIdx;
|
|
4515
4511
|
return function() {
|
|
4516
4512
|
return this.LA(1).tokenTypeIdx === e;
|
|
4517
4513
|
};
|
|
4518
|
-
}
|
|
4519
|
-
{
|
|
4514
|
+
} else {
|
|
4520
4515
|
let e = k(t, (e, t, n) => (e[t.tokenTypeIdx] = !0, M(t.categoryMatches, (t) => {
|
|
4521
4516
|
e[t] = !0;
|
|
4522
4517
|
}), e), []);
|
|
@@ -4525,8 +4520,7 @@ function Ho(e, t, n) {
|
|
|
4525
4520
|
return e[t.tokenTypeIdx] === !0;
|
|
4526
4521
|
};
|
|
4527
4522
|
}
|
|
4528
|
-
}
|
|
4529
|
-
return function() {
|
|
4523
|
+
} else return function() {
|
|
4530
4524
|
nextPath: for (let n = 0; n < i; n++) {
|
|
4531
4525
|
let r = e[n], i = r.length;
|
|
4532
4526
|
for (let e = 0; e < i; e++) if (t(this.LA(e + 1), r[e]) === !1) continue nextPath;
|
|
@@ -4543,7 +4537,7 @@ var Uo = class extends Li {
|
|
|
4543
4537
|
return this.walk(this.topProd), this.restDef;
|
|
4544
4538
|
}
|
|
4545
4539
|
checkIsTarget(e, t, n, r) {
|
|
4546
|
-
return e.idx === this.targetOccurrence && this.targetProdType === t
|
|
4540
|
+
return e.idx === this.targetOccurrence && this.targetProdType === t ? (this.restDef = n.concat(r), !0) : !1;
|
|
4547
4541
|
}
|
|
4548
4542
|
walkOption(e, t, n) {
|
|
4549
4543
|
this.checkIsTarget(e, G.OPTION, t, n) || super.walkOption(e, t, n);
|
|
@@ -4619,8 +4613,7 @@ function Jo(e, t) {
|
|
|
4619
4613
|
let n = F(e, (e) => Po([e], 1)), r = Go(n.length), i = F(n, (e) => {
|
|
4620
4614
|
let t = {};
|
|
4621
4615
|
return M(e, (e) => {
|
|
4622
|
-
|
|
4623
|
-
M(n, (e) => {
|
|
4616
|
+
M(Ko(e.partialPath), (e) => {
|
|
4624
4617
|
t[e] = !0;
|
|
4625
4618
|
});
|
|
4626
4619
|
}), t;
|
|
@@ -4632,7 +4625,7 @@ function Jo(e, t) {
|
|
|
4632
4625
|
let s = n[o];
|
|
4633
4626
|
for (let n = 0; n < s.length; n++) {
|
|
4634
4627
|
let c = s[n].partialPath, l = s[n].suffixDef, u = Ko(c);
|
|
4635
|
-
if (qo(i, u, o) ||
|
|
4628
|
+
if (qo(i, u, o) || I(l) || c.length === t) {
|
|
4636
4629
|
let e = r[o];
|
|
4637
4630
|
if (Zo(e, c) === !1) {
|
|
4638
4631
|
e.push(c);
|
|
@@ -4644,8 +4637,7 @@ function Jo(e, t) {
|
|
|
4644
4637
|
} else {
|
|
4645
4638
|
let t = Po(l, e + 1, c);
|
|
4646
4639
|
a[o] = a[o].concat(t), M(t, (e) => {
|
|
4647
|
-
|
|
4648
|
-
M(t, (e) => {
|
|
4640
|
+
M(Ko(e.partialPath), (e) => {
|
|
4649
4641
|
i[o][e] = !0;
|
|
4650
4642
|
});
|
|
4651
4643
|
});
|
|
@@ -4685,17 +4677,16 @@ function Qo(e, t) {
|
|
|
4685
4677
|
});
|
|
4686
4678
|
}
|
|
4687
4679
|
function $o(e) {
|
|
4688
|
-
return Jr(e, (e) => Jr(e, (e) => Jr(e, (e) =>
|
|
4680
|
+
return Jr(e, (e) => Jr(e, (e) => Jr(e, (e) => I(e.categoryMatches))));
|
|
4689
4681
|
}
|
|
4690
4682
|
//#endregion
|
|
4691
4683
|
//#region ../../node_modules/.pnpm/chevrotain@11.1.2/node_modules/chevrotain/lib/src/parse/grammar/checks.js
|
|
4692
4684
|
function es(e) {
|
|
4693
|
-
|
|
4685
|
+
return F(e.lookaheadStrategy.validate({
|
|
4694
4686
|
rules: e.rules,
|
|
4695
4687
|
tokenTypes: e.tokenTypes,
|
|
4696
4688
|
grammarName: e.grammarName
|
|
4697
|
-
});
|
|
4698
|
-
return F(t, (e) => Object.assign({ type: Tc.CUSTOM_LOOKAHEAD_VALIDATION }, e));
|
|
4689
|
+
}), (e) => Object.assign({ type: Tc.CUSTOM_LOOKAHEAD_VALIDATION }, e));
|
|
4699
4690
|
}
|
|
4700
4691
|
function ts(e, t, n, r) {
|
|
4701
4692
|
let i = Xr(e, (e) => ns(e, n)), a = vs(e, t, n), o = Xr(e, (e) => ms(e, n)), s = Xr(e, (t) => os(t, e, r, n));
|
|
@@ -4704,8 +4695,8 @@ function ts(e, t, n, r) {
|
|
|
4704
4695
|
function ns(e, t) {
|
|
4705
4696
|
let n = new as();
|
|
4706
4697
|
e.accept(n);
|
|
4707
|
-
let r = n.allProductions
|
|
4708
|
-
return F(D(
|
|
4698
|
+
let r = n.allProductions;
|
|
4699
|
+
return F(D(li(Qr(r, rs), (e) => e.length > 1)), (n) => {
|
|
4709
4700
|
let r = Yr(n), i = t.buildDuplicateFoundError(e, n), a = Ii(r), o = {
|
|
4710
4701
|
message: i,
|
|
4711
4702
|
type: Tc.DUPLICATE_PRODUCTIONS,
|
|
@@ -4776,7 +4767,7 @@ function ss(e, t, n) {
|
|
|
4776
4767
|
}
|
|
4777
4768
|
function cs(e, t, n, r = []) {
|
|
4778
4769
|
let i = [], a = ls(t.definition);
|
|
4779
|
-
if (
|
|
4770
|
+
if (I(a)) return [];
|
|
4780
4771
|
{
|
|
4781
4772
|
let t = e.name;
|
|
4782
4773
|
ei(a, e) && i.push({
|
|
@@ -4788,7 +4779,7 @@ function cs(e, t, n, r = []) {
|
|
|
4788
4779
|
ruleName: t
|
|
4789
4780
|
});
|
|
4790
4781
|
let o = Xr(Ur(a, r.concat([e])), (t) => {
|
|
4791
|
-
let i =
|
|
4782
|
+
let i = L(r);
|
|
4792
4783
|
return i.push(t), cs(e, t, n, i);
|
|
4793
4784
|
});
|
|
4794
4785
|
return i.concat(o);
|
|
@@ -4796,7 +4787,7 @@ function cs(e, t, n, r = []) {
|
|
|
4796
4787
|
}
|
|
4797
4788
|
function ls(e) {
|
|
4798
4789
|
let t = [];
|
|
4799
|
-
if (
|
|
4790
|
+
if (I(e)) return t;
|
|
4800
4791
|
let n = Yr(e);
|
|
4801
4792
|
/* istanbul ignore else */
|
|
4802
4793
|
if (n instanceof Si) t.push(n.referencedRule);
|
|
@@ -4807,8 +4798,7 @@ function ls(e) {
|
|
|
4807
4798
|
if (r && i) {
|
|
4808
4799
|
let n = Wr(e);
|
|
4809
4800
|
return t.concat(ls(n));
|
|
4810
|
-
}
|
|
4811
|
-
return t;
|
|
4801
|
+
} else return t;
|
|
4812
4802
|
}
|
|
4813
4803
|
var us = class extends Mi {
|
|
4814
4804
|
constructor() {
|
|
@@ -4822,20 +4812,17 @@ function ds(e, t) {
|
|
|
4822
4812
|
let n = new us();
|
|
4823
4813
|
e.accept(n);
|
|
4824
4814
|
let r = n.alternations;
|
|
4825
|
-
return Xr(r, (n) => Xr(Gr(n.definition), (r, i) => {
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
alternative: i + 1
|
|
4837
|
-
}] : [];
|
|
4838
|
-
}));
|
|
4815
|
+
return Xr(r, (n) => Xr(Gr(n.definition), (r, i) => I(Fo([r], [], Va, 1)) ? [{
|
|
4816
|
+
message: t.buildEmptyAlternationError({
|
|
4817
|
+
topLevelRule: e,
|
|
4818
|
+
alternation: n,
|
|
4819
|
+
emptyChoiceIdx: i
|
|
4820
|
+
}),
|
|
4821
|
+
type: Tc.NONE_LAST_EMPTY_ALT,
|
|
4822
|
+
ruleName: e.name,
|
|
4823
|
+
occurrence: n.idx,
|
|
4824
|
+
alternative: i + 1
|
|
4825
|
+
}] : []));
|
|
4839
4826
|
}
|
|
4840
4827
|
function fs(e, t, n) {
|
|
4841
4828
|
let r = new us();
|
|
@@ -4885,7 +4872,7 @@ function hs(e, t, n) {
|
|
|
4885
4872
|
let a = i.allProductions;
|
|
4886
4873
|
M(a, (i) => {
|
|
4887
4874
|
let a = Lo(i), o = i.maxLookahead || t, s = i.idx, c = Xo(s, e, a, o)[0];
|
|
4888
|
-
if (
|
|
4875
|
+
if (I(fe(c))) {
|
|
4889
4876
|
let t = n.buildEmptyRepetitionError({
|
|
4890
4877
|
topLevelRule: e,
|
|
4891
4878
|
repetition: i
|
|
@@ -4900,7 +4887,8 @@ function hs(e, t, n) {
|
|
|
4900
4887
|
}), r;
|
|
4901
4888
|
}
|
|
4902
4889
|
function gs(e, t, n, r) {
|
|
4903
|
-
let i = []
|
|
4890
|
+
let i = [];
|
|
4891
|
+
return F(k(e, (n, r, a) => (t.definition[a].ignoreAmbiguities === !0 || M(r, (r) => {
|
|
4904
4892
|
let o = [a];
|
|
4905
4893
|
M(e, (e, n) => {
|
|
4906
4894
|
a !== n && Zo(e, r) && t.definition[n].ignoreAmbiguities !== !0 && o.push(n);
|
|
@@ -4908,8 +4896,7 @@ function gs(e, t, n, r) {
|
|
|
4908
4896
|
alts: o,
|
|
4909
4897
|
path: r
|
|
4910
4898
|
}));
|
|
4911
|
-
}), n), [])
|
|
4912
|
-
return F(a, (e) => {
|
|
4899
|
+
}), n), []), (e) => {
|
|
4913
4900
|
let i = F(e.alts, (e) => e + 1);
|
|
4914
4901
|
return {
|
|
4915
4902
|
message: r.buildAlternationAmbiguityError({
|
|
@@ -4935,8 +4922,8 @@ function _s(e, t, n, r) {
|
|
|
4935
4922
|
}, []);
|
|
4936
4923
|
return Lr(Xr(i, (e) => {
|
|
4937
4924
|
if (t.definition[e.idx].ignoreAmbiguities === !0) return [];
|
|
4938
|
-
let a = e.idx, o = e.path
|
|
4939
|
-
return F(
|
|
4925
|
+
let a = e.idx, o = e.path;
|
|
4926
|
+
return F(T(i, (e) => t.definition[e.idx].ignoreAmbiguities !== !0 && e.idx < a && Qo(e.path, o)), (e) => {
|
|
4940
4927
|
let i = [e.idx + 1, a + 1], o = t.idx === 0 ? "" : t.idx;
|
|
4941
4928
|
return {
|
|
4942
4929
|
message: r.buildAlternationPrefixAmbiguityError({
|
|
@@ -5067,7 +5054,7 @@ var Ds = class extends Error {
|
|
|
5067
5054
|
return this.canRecoverWithSingleTokenInsertion(e, t) || this.canRecoverWithSingleTokenDeletion(e);
|
|
5068
5055
|
}
|
|
5069
5056
|
canRecoverWithSingleTokenInsertion(e, t) {
|
|
5070
|
-
if (!this.canTokenTypeBeInsertedInRecovery(e) ||
|
|
5057
|
+
if (!this.canTokenTypeBeInsertedInRecovery(e) || I(t)) return !1;
|
|
5071
5058
|
let n = this.LA(1);
|
|
5072
5059
|
return pe(t, (e) => this.tokenMatcher(n, e)) !== void 0;
|
|
5073
5060
|
}
|
|
@@ -5104,8 +5091,7 @@ var Ds = class extends Error {
|
|
|
5104
5091
|
});
|
|
5105
5092
|
}
|
|
5106
5093
|
flattenFollowSet() {
|
|
5107
|
-
|
|
5108
|
-
return fe(e);
|
|
5094
|
+
return fe(F(this.buildFullFollowKeyStack(), (e) => this.getFollowSetFromFollowKey(e)));
|
|
5109
5095
|
}
|
|
5110
5096
|
getFollowSetFromFollowKey(e) {
|
|
5111
5097
|
if (e === Ms) return [yo];
|
|
@@ -5124,7 +5110,7 @@ var Ds = class extends Error {
|
|
|
5124
5110
|
getCurrentGrammarPath(e, t) {
|
|
5125
5111
|
return {
|
|
5126
5112
|
ruleStack: this.getHumanReadableRuleStack(),
|
|
5127
|
-
occurrenceStack:
|
|
5113
|
+
occurrenceStack: L(this.RULE_OCCURRENCE_STACK),
|
|
5128
5114
|
lastTok: e,
|
|
5129
5115
|
lastTokOccurrence: t
|
|
5130
5116
|
};
|
|
@@ -5142,8 +5128,6 @@ function Is(e, t, n, r, i, a, o) {
|
|
|
5142
5128
|
let l = c.token, u = c.occurrence, d = c.isEndOfRule;
|
|
5143
5129
|
this.RULE_STACK.length === 1 && d && l === void 0 && (l = yo, u = 1), l !== void 0 && u !== void 0 && this.shouldInRepetitionRecoveryBeTried(l, u, o) && this.tryInRepetitionRecovery(e, t, n, l);
|
|
5144
5130
|
}
|
|
5145
|
-
//#endregion
|
|
5146
|
-
//#region ../../node_modules/.pnpm/chevrotain@11.1.2/node_modules/chevrotain/lib/src/parse/grammar/keys.js
|
|
5147
5131
|
var Ls = 1024, Rs = 1280, zs = 1536;
|
|
5148
5132
|
function Bs(e, t, n) {
|
|
5149
5133
|
return n | t | e;
|
|
@@ -5156,7 +5140,7 @@ var Vs = class {
|
|
|
5156
5140
|
}
|
|
5157
5141
|
validate(e) {
|
|
5158
5142
|
let t = this.validateNoLeftRecursion(e.rules);
|
|
5159
|
-
if (
|
|
5143
|
+
if (I(t)) {
|
|
5160
5144
|
let n = this.validateEmptyOrAlternatives(e.rules), r = this.validateAmbiguousAlternationAlternatives(e.rules, this.maxLookahead), i = this.validateSomeNonEmptyLookaheadPath(e.rules, this.maxLookahead);
|
|
5161
5145
|
return [
|
|
5162
5146
|
...t,
|
|
@@ -5331,7 +5315,7 @@ function Qs(e, t) {
|
|
|
5331
5315
|
},
|
|
5332
5316
|
validateVisitor: function() {
|
|
5333
5317
|
let e = tc(this, t);
|
|
5334
|
-
if (!
|
|
5318
|
+
if (!I(e)) {
|
|
5335
5319
|
let t = F(e, (e) => e.msg);
|
|
5336
5320
|
throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g, "\n ")}`);
|
|
5337
5321
|
}
|
|
@@ -5354,8 +5338,7 @@ function tc(e, t) {
|
|
|
5354
5338
|
return nc(e, t);
|
|
5355
5339
|
}
|
|
5356
5340
|
function nc(e, t) {
|
|
5357
|
-
|
|
5358
|
-
return Lr(F(n, (t) => ({
|
|
5341
|
+
return Lr(F(T(t, (t) => d(e[t]) === !1), (t) => ({
|
|
5359
5342
|
msg: `Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,
|
|
5360
5343
|
type: ec.MISSING_METHOD,
|
|
5361
5344
|
methodName: t
|
|
@@ -5800,17 +5783,17 @@ var rc = class {
|
|
|
5800
5783
|
initRecognizerEngine(e, t) {
|
|
5801
5784
|
if (this.className = this.constructor.name, this.shortRuleNameToFull = {}, this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 256, this.tokenMatcher = Ha, this.subruleIdx = 0, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_OCCURRENCE_STACK = [], this.gastProductionsCache = {}, P(t, "serializedGrammar")) throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");
|
|
5802
5785
|
if (m(e)) {
|
|
5803
|
-
if (
|
|
5786
|
+
if (I(e)) throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");
|
|
5804
5787
|
if (typeof e[0].startOffset == "number") throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.");
|
|
5805
5788
|
}
|
|
5806
5789
|
if (m(e)) this.tokensMap = k(e, (e, t) => (e[t.name] = t, e), {});
|
|
5807
5790
|
else if (P(e, "modes") && Jr(fe(D(e.modes)), to)) {
|
|
5808
5791
|
let t = pi(fe(D(e.modes)));
|
|
5809
5792
|
this.tokensMap = k(t, (e, t) => (e[t.name] = t, e), {});
|
|
5810
|
-
} else if (o(e)) this.tokensMap =
|
|
5793
|
+
} else if (o(e)) this.tokensMap = L(e);
|
|
5811
5794
|
else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");
|
|
5812
5795
|
this.tokensMap.EOF = yo;
|
|
5813
|
-
let n = Jr(P(e, "modes") ? fe(D(e.modes)) : D(e), (e) =>
|
|
5796
|
+
let n = Jr(P(e, "modes") ? fe(D(e.modes)) : D(e), (e) => I(e.categoryMatches));
|
|
5814
5797
|
this.tokenMatcher = n ? Ha : Va, Ga(D(this.tokensMap));
|
|
5815
5798
|
}
|
|
5816
5799
|
defineRule(e, t, n) {
|
|
@@ -5847,23 +5830,20 @@ var rc = class {
|
|
|
5847
5830
|
let t = e;
|
|
5848
5831
|
if (i) {
|
|
5849
5832
|
let r = this.findReSyncTokenType();
|
|
5850
|
-
if (this.isInCurrentRuleReSyncSet(r)) {
|
|
5851
|
-
|
|
5833
|
+
if (this.isInCurrentRuleReSyncSet(r)) if (t.resyncedTokens = this.reSyncTo(r), this.outputCst) {
|
|
5834
|
+
let e = this.CST_STACK[this.CST_STACK.length - 1];
|
|
5835
|
+
return e.recoveredNode = !0, e;
|
|
5836
|
+
} else return n(e);
|
|
5837
|
+
else {
|
|
5838
|
+
if (this.outputCst) {
|
|
5852
5839
|
let e = this.CST_STACK[this.CST_STACK.length - 1];
|
|
5853
|
-
|
|
5840
|
+
e.recoveredNode = !0, t.partialCstResult = e;
|
|
5854
5841
|
}
|
|
5855
|
-
|
|
5856
|
-
}
|
|
5857
|
-
if (this.outputCst) {
|
|
5858
|
-
let e = this.CST_STACK[this.CST_STACK.length - 1];
|
|
5859
|
-
e.recoveredNode = !0, t.partialCstResult = e;
|
|
5842
|
+
throw t;
|
|
5860
5843
|
}
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
throw t;
|
|
5865
|
-
}
|
|
5866
|
-
throw e;
|
|
5844
|
+
} else if (r) return this.moveToTerminatedState(), n(e);
|
|
5845
|
+
else throw t;
|
|
5846
|
+
} else throw e;
|
|
5867
5847
|
}
|
|
5868
5848
|
optionInternal(e, t) {
|
|
5869
5849
|
let n = this.getKeyForAutomaticLookahead(512, t);
|
|
@@ -6025,11 +6005,10 @@ var rc = class {
|
|
|
6025
6005
|
} catch (e) {
|
|
6026
6006
|
throw e.name === "InRuleRecoveryException" ? n : e;
|
|
6027
6007
|
}
|
|
6028
|
-
}
|
|
6029
|
-
throw n;
|
|
6008
|
+
} else throw n;
|
|
6030
6009
|
}
|
|
6031
6010
|
saveRecogState() {
|
|
6032
|
-
let e = this.errors, t =
|
|
6011
|
+
let e = this.errors, t = L(this.RULE_STACK);
|
|
6033
6012
|
return {
|
|
6034
6013
|
errors: e,
|
|
6035
6014
|
lexerState: this.exportLexerState(),
|
|
@@ -6066,12 +6045,12 @@ var rc = class {
|
|
|
6066
6045
|
SAVE_ERROR(e) {
|
|
6067
6046
|
if (Es(e)) return e.context = {
|
|
6068
6047
|
ruleStack: this.getHumanReadableRuleStack(),
|
|
6069
|
-
ruleOccurrenceStack:
|
|
6048
|
+
ruleOccurrenceStack: L(this.RULE_OCCURRENCE_STACK)
|
|
6070
6049
|
}, this._errors.push(e), e;
|
|
6071
6050
|
throw Error("Trying to save an Error which is not a RecognitionException");
|
|
6072
6051
|
}
|
|
6073
6052
|
get errors() {
|
|
6074
|
-
return
|
|
6053
|
+
return L(this._errors);
|
|
6075
6054
|
}
|
|
6076
6055
|
set errors(e) {
|
|
6077
6056
|
this._errors = e;
|
|
@@ -6287,8 +6266,7 @@ var bc = class {
|
|
|
6287
6266
|
this.traceInitIndent < this.traceInitMaxIdent && console.log(`${n}--> <${e}>`);
|
|
6288
6267
|
let { time: r, value: i } = _i(t), a = r > 10 ? console.warn : console.log;
|
|
6289
6268
|
return this.traceInitIndent < this.traceInitMaxIdent && a(`${n}<-- <${e}> time: ${r}ms`), this.traceInitIndent--, i;
|
|
6290
|
-
}
|
|
6291
|
-
return t();
|
|
6269
|
+
} else return t();
|
|
6292
6270
|
}
|
|
6293
6271
|
};
|
|
6294
6272
|
//#endregion
|
|
@@ -6355,7 +6333,7 @@ var Dc = class e {
|
|
|
6355
6333
|
if (this.TRACE_INIT("Grammar Resolving", () => {
|
|
6356
6334
|
r = ys({ rules: D(this.gastProductionsCache) }), this.definitionErrors = this.definitionErrors.concat(r);
|
|
6357
6335
|
}), this.TRACE_INIT("Grammar Validations", () => {
|
|
6358
|
-
if (
|
|
6336
|
+
if (I(r) && this.skipValidations === !1) {
|
|
6359
6337
|
let e = bs({
|
|
6360
6338
|
rules: D(this.gastProductionsCache),
|
|
6361
6339
|
tokenTypes: D(this.tokensMap),
|
|
@@ -6369,13 +6347,13 @@ var Dc = class e {
|
|
|
6369
6347
|
});
|
|
6370
6348
|
this.definitionErrors = this.definitionErrors.concat(e, t);
|
|
6371
6349
|
}
|
|
6372
|
-
}),
|
|
6350
|
+
}), I(this.definitionErrors) && (this.recoveryEnabled && this.TRACE_INIT("computeAllProdsFollows", () => {
|
|
6373
6351
|
let e = Gi(D(this.gastProductionsCache));
|
|
6374
6352
|
this.resyncFollows = e;
|
|
6375
6353
|
}), this.TRACE_INIT("ComputeLookaheadFunctions", () => {
|
|
6376
6354
|
var e, t;
|
|
6377
6355
|
(t = (e = this.lookaheadStrategy).initialize) == null || t.call(e, { rules: D(this.gastProductionsCache) }), this.preComputeLookaheadFunctions(D(this.gastProductionsCache));
|
|
6378
|
-
})), !e.DEFER_DEFINITION_ERRORS_HANDLING && !
|
|
6356
|
+
})), !e.DEFER_DEFINITION_ERRORS_HANDLING && !I(this.definitionErrors)) throw t = F(this.definitionErrors, (e) => e.message), Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`);
|
|
6379
6357
|
});
|
|
6380
6358
|
}
|
|
6381
6359
|
constructor(e, t) {
|
|
@@ -6399,14 +6377,11 @@ Dc.DEFER_DEFINITION_ERRORS_HANDLING = !1, xc(Dc, [
|
|
|
6399
6377
|
]);
|
|
6400
6378
|
var Oc = class extends Dc {
|
|
6401
6379
|
constructor(e, t = Cc) {
|
|
6402
|
-
let n =
|
|
6380
|
+
let n = L(t);
|
|
6403
6381
|
n.outputCst = !1, super(e, n);
|
|
6404
6382
|
}
|
|
6405
6383
|
};
|
|
6406
6384
|
//#endregion
|
|
6407
|
-
//#region ../../node_modules/.pnpm/chevrotain@11.1.2/node_modules/chevrotain/lib/src/api.js
|
|
6408
|
-
/* istanbul ignore file - tricky to import some things from this module during testing */
|
|
6409
|
-
//#endregion
|
|
6410
6385
|
//#region ../../node_modules/.pnpm/chevrotain-allstar@0.3.1_chevrotain@11.1.2/node_modules/chevrotain-allstar/lib/atn.js
|
|
6411
6386
|
function kc(e, t, n) {
|
|
6412
6387
|
return `${e.name}_${t}_${n}`;
|
|
@@ -6692,8 +6667,7 @@ var sl = class {
|
|
|
6692
6667
|
let t = this.LA(1);
|
|
6693
6668
|
return e[t.tokenTypeIdx];
|
|
6694
6669
|
};
|
|
6695
|
-
}
|
|
6696
|
-
return r ? function(e) {
|
|
6670
|
+
} else if (r) return function(e) {
|
|
6697
6671
|
let t = new sl(), n = e === void 0 ? 0 : e.length;
|
|
6698
6672
|
for (let r = 0; r < n; r++) {
|
|
6699
6673
|
let n = e?.[r].GATE;
|
|
@@ -6701,7 +6675,8 @@ var sl = class {
|
|
|
6701
6675
|
}
|
|
6702
6676
|
let r = fl.call(this, a, c, t, o);
|
|
6703
6677
|
return typeof r == "number" ? r : void 0;
|
|
6704
|
-
}
|
|
6678
|
+
};
|
|
6679
|
+
else return function() {
|
|
6705
6680
|
let e = fl.call(this, a, c, cl, o);
|
|
6706
6681
|
return typeof e == "number" ? e : void 0;
|
|
6707
6682
|
};
|
|
@@ -6715,13 +6690,12 @@ var sl = class {
|
|
|
6715
6690
|
}), (e) => F(e, (e) => e[0]));
|
|
6716
6691
|
if (ul(l) && l[0][0] && !i) {
|
|
6717
6692
|
let e = l[0], t = fe(e);
|
|
6718
|
-
if (t.length === 1 &&
|
|
6693
|
+
if (t.length === 1 && I(t[0].categoryMatches)) {
|
|
6719
6694
|
let e = t[0].tokenTypeIdx;
|
|
6720
6695
|
return function() {
|
|
6721
6696
|
return this.LA(1).tokenTypeIdx === e;
|
|
6722
6697
|
};
|
|
6723
|
-
}
|
|
6724
|
-
{
|
|
6698
|
+
} else {
|
|
6725
6699
|
let e = k(t, (e, t) => (t !== void 0 && (e[t.tokenTypeIdx] = !0, M(t.categoryMatches, (t) => {
|
|
6726
6700
|
e[t] = !0;
|
|
6727
6701
|
})), e), {});
|
|
@@ -7456,8 +7430,7 @@ var Fl = /* @__PURE__ */ i({
|
|
|
7456
7430
|
this._workspaceEdit.documentChanges.push(r), n = new cu(e, this._changeAnnotations), this._textEditChanges[t.uri] = n;
|
|
7457
7431
|
}
|
|
7458
7432
|
return n;
|
|
7459
|
-
}
|
|
7460
|
-
{
|
|
7433
|
+
} else {
|
|
7461
7434
|
if (this.initChanges(), this._workspaceEdit.changes === void 0) throw Error("Workspace edit is not configured for normal text edit changes.");
|
|
7462
7435
|
let t = this._textEditChanges[e];
|
|
7463
7436
|
if (!t) {
|
|
@@ -7626,7 +7599,7 @@ var Fl = /* @__PURE__ */ i({
|
|
|
7626
7599
|
})(Du ||= {}), (function(e) {
|
|
7627
7600
|
function t(e, t, ...n) {
|
|
7628
7601
|
let r = { label: e };
|
|
7629
|
-
return Y.defined(t) && (r.documentation = t),
|
|
7602
|
+
return Y.defined(t) && (r.documentation = t), Y.defined(n) ? r.parameters = n : r.parameters = [], r;
|
|
7630
7603
|
}
|
|
7631
7604
|
e.create = t;
|
|
7632
7605
|
})(Ou ||= {}), (function(e) {
|
|
@@ -8162,8 +8135,7 @@ var dd = class {
|
|
|
8162
8135
|
};
|
|
8163
8136
|
}
|
|
8164
8137
|
return this._rangeCache;
|
|
8165
|
-
}
|
|
8166
|
-
return {
|
|
8138
|
+
} else return {
|
|
8167
8139
|
start: q.create(0, 0),
|
|
8168
8140
|
end: q.create(0, 0)
|
|
8169
8141
|
};
|
|
@@ -8213,11 +8185,11 @@ var yd = "", bd = (e) => e.endsWith(yd) ? e : e + yd, xd = class {
|
|
|
8213
8185
|
constructor(e) {
|
|
8214
8186
|
this._unorderedGroups = /* @__PURE__ */ new Map(), this.allRules = /* @__PURE__ */ new Map(), this.lexer = e.parser.Lexer;
|
|
8215
8187
|
let t = this.lexer.definition, n = e.LanguageMetaData.mode === "production";
|
|
8216
|
-
|
|
8188
|
+
e.shared.profilers.LangiumProfiler?.isActive("parsing") ? this.wrapper = new Od(t, {
|
|
8217
8189
|
...e.parser.ParserConfig,
|
|
8218
8190
|
skipValidations: n,
|
|
8219
8191
|
errorMessageProvider: e.parser.ParserErrorMessageProvider
|
|
8220
|
-
}, e.shared.profilers.LangiumProfiler.createTask("parsing", e.LanguageMetaData.languageId)) : new Dd(t, {
|
|
8192
|
+
}, e.shared.profilers.LangiumProfiler.createTask("parsing", e.LanguageMetaData.languageId)) : this.wrapper = new Dd(t, {
|
|
8221
8193
|
...e.parser.ParserConfig,
|
|
8222
8194
|
skipValidations: n,
|
|
8223
8195
|
errorMessageProvider: e.parser.ParserErrorMessageProvider
|
|
@@ -8677,12 +8649,10 @@ function Pd(e, t) {
|
|
|
8677
8649
|
return (s) => {
|
|
8678
8650
|
o ??= Wd(e, n), e.parser.subrule(r, o, i, t, a(s));
|
|
8679
8651
|
};
|
|
8680
|
-
}
|
|
8681
|
-
if (on(n)) {
|
|
8652
|
+
} else if (on(n)) {
|
|
8682
8653
|
let r = e.consume++, i = Kd(e, n.name);
|
|
8683
8654
|
return () => e.parser.consume(r, i, t);
|
|
8684
|
-
}
|
|
8685
|
-
if (n) Pn(n);
|
|
8655
|
+
} else if (n) Pn(n);
|
|
8686
8656
|
else throw new Nn(t.$cstNode, `Undefined rule: ${t.rule.$refText}`);
|
|
8687
8657
|
}
|
|
8688
8658
|
function Fd(e, t) {
|
|
@@ -8696,8 +8666,7 @@ function Fd(e, t) {
|
|
|
8696
8666
|
for (let { parameterName: r, predicate: i } of e) r && (n[r] = i(t));
|
|
8697
8667
|
return n;
|
|
8698
8668
|
};
|
|
8699
|
-
}
|
|
8700
|
-
{
|
|
8669
|
+
} else {
|
|
8701
8670
|
let n = t.map((e) => Id(e.value));
|
|
8702
8671
|
return (t) => {
|
|
8703
8672
|
let r = {};
|
|
@@ -8713,20 +8682,16 @@ function Id(e) {
|
|
|
8713
8682
|
if (ht(e)) {
|
|
8714
8683
|
let t = Id(e.left), n = Id(e.right);
|
|
8715
8684
|
return (e) => t(e) || n(e);
|
|
8716
|
-
}
|
|
8717
|
-
if (dt(e)) {
|
|
8685
|
+
} else if (dt(e)) {
|
|
8718
8686
|
let t = Id(e.left), n = Id(e.right);
|
|
8719
8687
|
return (e) => t(e) && n(e);
|
|
8720
|
-
}
|
|
8721
|
-
if (It(e)) {
|
|
8688
|
+
} else if (It(e)) {
|
|
8722
8689
|
let t = Id(e.value);
|
|
8723
8690
|
return (e) => !t(e);
|
|
8724
|
-
}
|
|
8725
|
-
if (Bt(e)) {
|
|
8691
|
+
} else if (Bt(e)) {
|
|
8726
8692
|
let t = e.parameter.ref.name;
|
|
8727
8693
|
return (e) => e !== void 0 && e[t] === !0;
|
|
8728
|
-
}
|
|
8729
|
-
if (ot(e)) {
|
|
8694
|
+
} else if (ot(e)) {
|
|
8730
8695
|
let t = !!e.true;
|
|
8731
8696
|
return () => t;
|
|
8732
8697
|
}
|
|
@@ -8765,7 +8730,7 @@ function Rd(e, t) {
|
|
|
8765
8730
|
}
|
|
8766
8731
|
};
|
|
8767
8732
|
let c = n.GATE;
|
|
8768
|
-
return o.GATE =
|
|
8733
|
+
return c ? o.GATE = () => c(t) : o.GATE = () => !s.unorderedGroups.get(i(r, s))?.[a], o;
|
|
8769
8734
|
})), "*");
|
|
8770
8735
|
return (t) => {
|
|
8771
8736
|
a(t), e.parser.isRecording() || e.parser.unorderedGroups.delete(i(r, e.parser));
|
|
@@ -8784,22 +8749,18 @@ function Vd(e, t, n = t.terminal) {
|
|
|
8784
8749
|
let n = hr(t.type.ref)?.terminal;
|
|
8785
8750
|
if (!n) throw Error("Could not find name assignment for type: " + br(t.type.ref));
|
|
8786
8751
|
return Vd(e, t, n);
|
|
8787
|
-
}
|
|
8788
|
-
if (Yt(n) && Ht(n.rule.ref)) {
|
|
8752
|
+
} else if (Yt(n) && Ht(n.rule.ref)) {
|
|
8789
8753
|
let r = n.rule.ref, i = e.subrule++, a;
|
|
8790
8754
|
return (n) => {
|
|
8791
8755
|
a ??= Wd(e, r), e.parser.subrule(i, a, !1, t, n);
|
|
8792
8756
|
};
|
|
8793
|
-
}
|
|
8794
|
-
if (Yt(n) && on(n.rule.ref)) {
|
|
8757
|
+
} else if (Yt(n) && on(n.rule.ref)) {
|
|
8795
8758
|
let r = e.consume++, i = Kd(e, n.rule.ref.name);
|
|
8796
8759
|
return () => e.parser.consume(r, i, t);
|
|
8797
|
-
}
|
|
8798
|
-
if (jt(n)) {
|
|
8760
|
+
} else if (jt(n)) {
|
|
8799
8761
|
let r = e.consume++, i = Kd(e, n.value);
|
|
8800
8762
|
return () => e.parser.consume(r, i, t);
|
|
8801
|
-
}
|
|
8802
|
-
throw Error("Could not build cross reference parser");
|
|
8763
|
+
} else throw Error("Could not build cross reference parser");
|
|
8803
8764
|
}
|
|
8804
8765
|
function Hd(e, t) {
|
|
8805
8766
|
let n = e.consume++, r = e.tokens[t.value];
|
|
@@ -8824,8 +8785,7 @@ function Ud(e, t, n, r) {
|
|
|
8824
8785
|
DEF: () => n(r),
|
|
8825
8786
|
GATE: i ? () => i(r) : void 0
|
|
8826
8787
|
});
|
|
8827
|
-
}
|
|
8828
|
-
if (r === "+") {
|
|
8788
|
+
} else if (r === "+") {
|
|
8829
8789
|
let t = e.many++;
|
|
8830
8790
|
if (i) {
|
|
8831
8791
|
let r = e.or++;
|
|
@@ -8836,17 +8796,14 @@ function Ud(e, t, n, r) {
|
|
|
8836
8796
|
ALT: Ec(),
|
|
8837
8797
|
GATE: () => !i(a)
|
|
8838
8798
|
}]);
|
|
8839
|
-
}
|
|
8840
|
-
|
|
8841
|
-
}
|
|
8842
|
-
if (r === "?") {
|
|
8799
|
+
} else return (r) => e.parser.atLeastOne(t, { DEF: () => n(r) });
|
|
8800
|
+
} else if (r === "?") {
|
|
8843
8801
|
let t = e.optional++;
|
|
8844
8802
|
return (r) => e.parser.optional(t, {
|
|
8845
8803
|
DEF: () => n(r),
|
|
8846
8804
|
GATE: i ? () => i(r) : void 0
|
|
8847
8805
|
});
|
|
8848
|
-
}
|
|
8849
|
-
Pn(r);
|
|
8806
|
+
} else Pn(r);
|
|
8850
8807
|
}
|
|
8851
8808
|
function Wd(e, t) {
|
|
8852
8809
|
let n = Gd(e, t), r = e.parser.getRule(n);
|
|
@@ -9834,16 +9791,14 @@ var wf = class {
|
|
|
9834
9791
|
if (typeof t == "string") {
|
|
9835
9792
|
let r = this.parse(e, t, n);
|
|
9836
9793
|
return this.createLangiumDocument(r, e, void 0, t);
|
|
9837
|
-
}
|
|
9838
|
-
if ("$model" in t) {
|
|
9794
|
+
} else if ("$model" in t) {
|
|
9839
9795
|
let n = {
|
|
9840
9796
|
value: t.$model,
|
|
9841
9797
|
parserErrors: [],
|
|
9842
9798
|
lexerErrors: []
|
|
9843
9799
|
};
|
|
9844
9800
|
return this.createLangiumDocument(n, e);
|
|
9845
|
-
}
|
|
9846
|
-
{
|
|
9801
|
+
} else {
|
|
9847
9802
|
let r = this.parse(e, t.getText(), n);
|
|
9848
9803
|
return this.createLangiumDocument(r, e, t);
|
|
9849
9804
|
}
|
|
@@ -9852,8 +9807,7 @@ var wf = class {
|
|
|
9852
9807
|
if (typeof t == "string") {
|
|
9853
9808
|
let r = await this.parseAsync(e, t, n);
|
|
9854
9809
|
return this.createLangiumDocument(r, e, void 0, t);
|
|
9855
|
-
}
|
|
9856
|
-
{
|
|
9810
|
+
} else {
|
|
9857
9811
|
let r = await this.parseAsync(e, t.getText(), n);
|
|
9858
9812
|
return this.createLangiumDocument(r, e, t);
|
|
9859
9813
|
}
|
|
@@ -10172,8 +10126,7 @@ var kf = class {
|
|
|
10172
10126
|
for (let t of He(n)) if (ye(t.reference) && t.reference.items.some((t) => t.ref === e)) return t.reference.items.map((e) => e.ref);
|
|
10173
10127
|
}
|
|
10174
10128
|
return [e];
|
|
10175
|
-
}
|
|
10176
|
-
return [e];
|
|
10129
|
+
} else return [e];
|
|
10177
10130
|
}
|
|
10178
10131
|
getNodeFromReferenceDescription(e) {
|
|
10179
10132
|
if (!e) return;
|
|
@@ -10292,7 +10245,7 @@ var kf = class {
|
|
|
10292
10245
|
}
|
|
10293
10246
|
delete(e) {
|
|
10294
10247
|
let t = this.map.get(e);
|
|
10295
|
-
return t
|
|
10248
|
+
return t === void 0 ? !1 : (this.map.delete(e), this.inverse.delete(t), !0);
|
|
10296
10249
|
}
|
|
10297
10250
|
}, Nf = class {
|
|
10298
10251
|
constructor(e) {
|
|
@@ -10389,7 +10342,7 @@ var kf = class {
|
|
|
10389
10342
|
if (t) {
|
|
10390
10343
|
let n = t();
|
|
10391
10344
|
return this.cache.set(e, n), n;
|
|
10392
|
-
}
|
|
10345
|
+
} else return;
|
|
10393
10346
|
}
|
|
10394
10347
|
delete(e) {
|
|
10395
10348
|
return this.throwIfDisposed(), this.cache.delete(e);
|
|
@@ -10414,7 +10367,7 @@ var kf = class {
|
|
|
10414
10367
|
if (n) {
|
|
10415
10368
|
let e = n();
|
|
10416
10369
|
return r.set(t, e), e;
|
|
10417
|
-
}
|
|
10370
|
+
} else return;
|
|
10418
10371
|
}
|
|
10419
10372
|
delete(e, t) {
|
|
10420
10373
|
return this.throwIfDisposed(), this.cacheForContext(e).delete(t);
|
|
@@ -10499,47 +10452,41 @@ var Uf = class {
|
|
|
10499
10452
|
return this.linkNode(r, r, n), r;
|
|
10500
10453
|
}
|
|
10501
10454
|
replacer(e, t, { refText: n, sourceText: r, textRegions: i, comments: a, uriConverter: o }) {
|
|
10502
|
-
if (!this.ignoreProperties.has(e)) {
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
let i = this.astNodeLocator.getAstNodePath(e);
|
|
10509
|
-
return {
|
|
10510
|
-
$ref: `${n}#${i}`,
|
|
10511
|
-
$refText: r
|
|
10512
|
-
};
|
|
10513
|
-
}
|
|
10455
|
+
if (!this.ignoreProperties.has(e)) if (ve(t)) {
|
|
10456
|
+
let e = t.ref, r = n ? t.$refText : void 0;
|
|
10457
|
+
if (e) {
|
|
10458
|
+
let t = Fe(e), n = "";
|
|
10459
|
+
this.currentDocument && this.currentDocument !== t && (n = o ? o(t.uri, e) : t.uri.toString());
|
|
10460
|
+
let i = this.astNodeLocator.getAstNodePath(e);
|
|
10514
10461
|
return {
|
|
10515
|
-
$
|
|
10462
|
+
$ref: `${n}#${i}`,
|
|
10516
10463
|
$refText: r
|
|
10517
10464
|
};
|
|
10465
|
+
} else return {
|
|
10466
|
+
$error: t.error?.message ?? "Could not resolve reference",
|
|
10467
|
+
$refText: r
|
|
10468
|
+
};
|
|
10469
|
+
} else if (ye(t)) {
|
|
10470
|
+
let e = n ? t.$refText : void 0, r = [];
|
|
10471
|
+
for (let e of t.items) {
|
|
10472
|
+
let t = e.ref, n = Fe(e.ref), i = "";
|
|
10473
|
+
this.currentDocument && this.currentDocument !== n && (i = o ? o(n.uri, t) : n.uri.toString());
|
|
10474
|
+
let a = this.astNodeLocator.getAstNodePath(t);
|
|
10475
|
+
r.push(`${i}#${a}`);
|
|
10518
10476
|
}
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
}
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
$refText: e
|
|
10530
|
-
};
|
|
10531
|
-
}
|
|
10532
|
-
if (R(t)) {
|
|
10533
|
-
let n;
|
|
10534
|
-
if (i && (n = this.addAstNodeRegionWithAssignmentsTo({ ...t }), (!e || t.$document) && n?.$textRegion && (n.$textRegion.documentURI = this.currentDocument?.uri.toString())), r && !e && (n ??= { ...t }, n.$sourceText = t.$cstNode?.text), a) {
|
|
10535
|
-
n ??= { ...t };
|
|
10536
|
-
let e = this.commentProvider.getComment(t);
|
|
10537
|
-
e && (n.$comment = e.replace(/\r/g, ""));
|
|
10538
|
-
}
|
|
10539
|
-
return n ?? t;
|
|
10477
|
+
return {
|
|
10478
|
+
$refs: r,
|
|
10479
|
+
$refText: e
|
|
10480
|
+
};
|
|
10481
|
+
} else if (R(t)) {
|
|
10482
|
+
let n;
|
|
10483
|
+
if (i && (n = this.addAstNodeRegionWithAssignmentsTo({ ...t }), (!e || t.$document) && n?.$textRegion && (n.$textRegion.documentURI = this.currentDocument?.uri.toString())), r && !e && (n ??= { ...t }, n.$sourceText = t.$cstNode?.text), a) {
|
|
10484
|
+
n ??= { ...t };
|
|
10485
|
+
let e = this.commentProvider.getComment(t);
|
|
10486
|
+
e && (n.$comment = e.replace(/\r/g, ""));
|
|
10540
10487
|
}
|
|
10541
|
-
return t;
|
|
10542
|
-
}
|
|
10488
|
+
return n ?? t;
|
|
10489
|
+
} else return t;
|
|
10543
10490
|
}
|
|
10544
10491
|
addAstNodeRegionWithAssignmentsTo(e) {
|
|
10545
10492
|
let t = (e) => ({
|
|
@@ -11270,7 +11217,9 @@ var ip = class {
|
|
|
11270
11217
|
case n.Last:
|
|
11271
11218
|
this.addItemLast(i);
|
|
11272
11219
|
break;
|
|
11273
|
-
default:
|
|
11220
|
+
default:
|
|
11221
|
+
this.addItemLast(i);
|
|
11222
|
+
break;
|
|
11274
11223
|
}
|
|
11275
11224
|
this._map.set(e, i), this._size++;
|
|
11276
11225
|
}
|
|
@@ -11307,8 +11256,7 @@ var ip = class {
|
|
|
11307
11256
|
done: !1
|
|
11308
11257
|
};
|
|
11309
11258
|
return t = t.next, e;
|
|
11310
|
-
}
|
|
11311
|
-
return {
|
|
11259
|
+
} else return {
|
|
11312
11260
|
value: void 0,
|
|
11313
11261
|
done: !0
|
|
11314
11262
|
};
|
|
@@ -11327,8 +11275,7 @@ var ip = class {
|
|
|
11327
11275
|
done: !1
|
|
11328
11276
|
};
|
|
11329
11277
|
return t = t.next, e;
|
|
11330
|
-
}
|
|
11331
|
-
return {
|
|
11278
|
+
} else return {
|
|
11332
11279
|
value: void 0,
|
|
11333
11280
|
done: !0
|
|
11334
11281
|
};
|
|
@@ -11347,8 +11294,7 @@ var ip = class {
|
|
|
11347
11294
|
done: !1
|
|
11348
11295
|
};
|
|
11349
11296
|
return t = t.next, e;
|
|
11350
|
-
}
|
|
11351
|
-
return {
|
|
11297
|
+
} else return {
|
|
11352
11298
|
value: void 0,
|
|
11353
11299
|
done: !0
|
|
11354
11300
|
};
|
|
@@ -12078,8 +12024,7 @@ var ip = class {
|
|
|
12078
12024
|
if (a !== void 0) {
|
|
12079
12025
|
a.cancel(), Ne(e);
|
|
12080
12026
|
return;
|
|
12081
|
-
}
|
|
12082
|
-
A.add(t);
|
|
12027
|
+
} else A.add(t);
|
|
12083
12028
|
}
|
|
12084
12029
|
ge(oe, e);
|
|
12085
12030
|
} finally {
|
|
@@ -12177,8 +12122,7 @@ var ip = class {
|
|
|
12177
12122
|
let t = e.params.id;
|
|
12178
12123
|
A.delete(t), Ne(e);
|
|
12179
12124
|
return;
|
|
12180
|
-
}
|
|
12181
|
-
{
|
|
12125
|
+
} else {
|
|
12182
12126
|
let r = D.get(e.method);
|
|
12183
12127
|
r && (n = r.handler, t = r.type);
|
|
12184
12128
|
}
|
|
@@ -12307,6 +12251,7 @@ var ip = class {
|
|
|
12307
12251
|
n = [];
|
|
12308
12252
|
for (let e = 0; e < t.length && e < r; e++) n.push(ze(t[e]));
|
|
12309
12253
|
if (t.length < r) for (let e = t.length; e < r; e++) n.push(null);
|
|
12254
|
+
break;
|
|
12310
12255
|
}
|
|
12311
12256
|
return n;
|
|
12312
12257
|
}
|
|
@@ -12329,6 +12274,7 @@ var ip = class {
|
|
|
12329
12274
|
default:
|
|
12330
12275
|
if (s === r.ParameterStructures.byName) throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);
|
|
12331
12276
|
a = t.slice(o, c).map((e) => ze(e));
|
|
12277
|
+
break;
|
|
12332
12278
|
}
|
|
12333
12279
|
} else {
|
|
12334
12280
|
let n = t;
|
|
@@ -12387,6 +12333,7 @@ var ip = class {
|
|
|
12387
12333
|
default:
|
|
12388
12334
|
if (u === r.ParameterStructures.byName) throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);
|
|
12389
12335
|
a = t.slice(l, d).map((e) => ze(e));
|
|
12336
|
+
break;
|
|
12390
12337
|
}
|
|
12391
12338
|
} else {
|
|
12392
12339
|
let n = t;
|
|
@@ -14598,7 +14545,7 @@ function gm(e, t) {
|
|
|
14598
14545
|
let i = mm(e);
|
|
14599
14546
|
return new xm(r, i, t, J.create(n.range.start, i.range.end));
|
|
14600
14547
|
}
|
|
14601
|
-
{
|
|
14548
|
+
else {
|
|
14602
14549
|
let e = n.range;
|
|
14603
14550
|
return new xm(r, new wm([], e), t, e);
|
|
14604
14551
|
}
|
|
@@ -14624,8 +14571,7 @@ function ym(e, t) {
|
|
|
14624
14571
|
if (typeof e == "string" || typeof e == "object") {
|
|
14625
14572
|
let n = typeof e == "string" ? er(e) : e.source;
|
|
14626
14573
|
return RegExp(t ? `^\\s*${n}` : `\\s*${n}\\s*$`);
|
|
14627
|
-
}
|
|
14628
|
-
return e;
|
|
14574
|
+
} else return e;
|
|
14629
14575
|
}
|
|
14630
14576
|
var bm = class {
|
|
14631
14577
|
constructor(e, t) {
|
|
@@ -14750,7 +14696,7 @@ var Dm = class {
|
|
|
14750
14696
|
if (r && r.nameSegment) {
|
|
14751
14697
|
let e = r.nameSegment.range.start.line + 1, t = r.nameSegment.range.start.character + 1;
|
|
14752
14698
|
return `[${n}](${r.documentUri.with({ fragment: `L${e},${t}` }).toString()})`;
|
|
14753
|
-
}
|
|
14699
|
+
} else return;
|
|
14754
14700
|
}
|
|
14755
14701
|
documentationTagRenderer(e, t) {}
|
|
14756
14702
|
findNameInLocalSymbols(e, t) {
|
|
@@ -15033,8 +14979,7 @@ function zm(e, t, n, r) {
|
|
|
15033
14979
|
if (e[t] instanceof Error) throw Error("Construction failure. Please make sure that your dependencies are constructable. Cause: " + e[t]);
|
|
15034
14980
|
if (e[t] === Rm) throw Error("Cycle detected. Please make \"" + String(t) + "\" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies");
|
|
15035
14981
|
return e[t];
|
|
15036
|
-
}
|
|
15037
|
-
if (t in n) {
|
|
14982
|
+
} else if (t in n) {
|
|
15038
14983
|
let i = n[t];
|
|
15039
14984
|
e[t] = Rm;
|
|
15040
14985
|
try {
|
|
@@ -15043,13 +14988,13 @@ function zm(e, t, n, r) {
|
|
|
15043
14988
|
throw e[t] = n instanceof Error ? n : void 0, n;
|
|
15044
14989
|
}
|
|
15045
14990
|
return e[t];
|
|
15046
|
-
}
|
|
14991
|
+
} else return;
|
|
15047
14992
|
}
|
|
15048
14993
|
function Bm(e, t) {
|
|
15049
14994
|
if (t) {
|
|
15050
14995
|
for (let [n, r] of Object.entries(t)) if (r != null) if (typeof r == "object") {
|
|
15051
14996
|
let t = e[n];
|
|
15052
|
-
|
|
14997
|
+
typeof t == "object" && t ? e[n] = Bm(t, r) : e[n] = Bm({}, r);
|
|
15053
14998
|
} else e[n] = r;
|
|
15054
14999
|
}
|
|
15055
15000
|
return e;
|