@loopstack/loopstack-studio 0.25.0 → 0.25.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/components/ai-elements/message.js +2 -2
- package/dist/components/ai-elements/reasoning.js +9 -9
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +2 -5
- package/dist/node_modules/@chevrotain/gast/lib/src/model.js +69 -72
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-7HQA4BMR.js → architecture-YZFGNWBL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-TQ3KTPDO.js → chunk-2KRD3SAO.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-4F5CHEZ2.js → chunk-67CJDMHE.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-UMXZTB3W.js → chunk-7N4EOEYR.js} +5 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-PL6DKKU2.js → chunk-AA7GKIK3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +23 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-SJTYNZTY.js → chunk-FOC6F5B3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1197 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FRFDVMJY.js → chunk-KGLVRYIC.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-B2363JML.js → chunk-LIHQZDEY.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +29 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-G5XIXVHT.js → gitGraph-7Q5UKJZL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +27 -17
- package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +903 -0
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +76 -75
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +30 -28
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +31 -40
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +23 -26
- package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +181 -205
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +11 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +8 -9
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +176 -183
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +17 -19
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +153 -160
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +10 -12
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +36 -38
- package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +37 -45
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +12 -14
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +80 -86
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +6 -2
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +39 -41
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +7 -8
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +69 -70
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +215 -205
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +76 -76
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +29 -39
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +252 -274
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +93 -106
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +61 -61
- package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +31 -41
- package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +15 -18
- package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +226 -226
- package/dist/node_modules/chevrotain-allstar/lib/atn.js +17 -17
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +17 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
- package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
- package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +61 -61
- package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
- package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
- package/dist/node_modules/dompurify/dist/purify.es.js +67 -67
- package/dist/node_modules/katex/dist/katex.js +1256 -1209
- package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -0
- package/dist/node_modules/lodash-es/_baseClone.js +2 -2
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
- package/dist/node_modules/lodash-es/_baseToString.js +1 -1
- package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
- package/dist/node_modules/lodash-es/_createSet.js +1 -1
- package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
- package/dist/node_modules/lodash-es/findIndex.js +2 -2
- package/dist/node_modules/lodash-es/flatMap.js +1 -1
- package/dist/node_modules/lodash-es/forEach.js +1 -1
- package/dist/node_modules/lodash-es/max.js +1 -1
- package/dist/node_modules/lodash-es/min.js +1 -1
- package/dist/node_modules/lodash-es/minBy.js +1 -1
- package/dist/node_modules/lodash-es/reduce.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +691 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-VD42YOAC.js → blockDiagram-DXYQGD6D.js} +183 -157
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +65 -63
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +47 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EXTU4WIE.js → chunk-426QAEUC.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +533 -393
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3638 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-S3R3BYOJ.js → chunk-5PVQY5BW.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-HN2XXSSU.js → chunk-BSJP7CBP.js} +20 -14
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-QN33PNHL.js → chunk-EDXVE4YY.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +568 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2320 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-DI55MBZ5.js → chunk-OYMX7WX6.js} +35 -21
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +272 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ATLVNIR6.js → chunk-X2U36JSP.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-MI3HLSF2.js → chunk-XPW4576I.js} +11 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +60 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +30 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-2ON5EDUG.js → classDiagram-6PBFFD2Q.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-WZHVMYZB.js → classDiagram-v2-HSJHXN6E.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-6UL2VRFP.js → dagre-KV5264BT.js} +8 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +99 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-PSM6KHXK.js → diagram-G4DWMVQ6.js} +20 -23
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +211 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-S2PKOQOG.js → diagram-TYMM5635.js} +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +486 -386
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +915 -898
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-JELNMOA3.js → ganttDiagram-T4ZO3ILL.js} +59 -29
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +728 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +17 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +714 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-XKPGCS4Q.js → journeyDiagram-VCZTEJTY.js} +32 -32
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +13 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +105 -59
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +117 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +49 -19
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-TZEHDZUN.js → sankeyDiagram-XADWPNL6.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4155 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FKZM4ZOC.js → stateDiagram-FHFEXIEX.js} +12 -12
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-4FDKWEC3.js → stateDiagram-v2-QKLJ7IA2.js} +11 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1071 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +959 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +574 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-PRI3JC2R.js → xychartDiagram-5P7HB3ND.js} +38 -35
- package/dist/node_modules/mermaid/dist/mermaid.core.js +235 -192
- package/dist/node_modules/nanoid/url-alphabet/index.js +1 -1
- package/dist/node_modules/remend/dist/index.js +333 -264
- package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2498 -0
- package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +35 -0
- package/dist/node_modules/streamdown/dist/index.js +1 -1
- package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +672 -667
- package/dist/pages/DashboardPage.js +3 -3
- package/package.json +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
- package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
- package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
- package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
- package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
- package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
- package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
- package/dist/node_modules/lodash-es/_baseSome.js +0 -9
- package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
- package/dist/node_modules/lodash-es/assign.js +0 -14
- package/dist/node_modules/lodash-es/compact.js +0 -9
- package/dist/node_modules/lodash-es/difference.js +0 -8
- package/dist/node_modules/lodash-es/drop.js +0 -8
- package/dist/node_modules/lodash-es/dropRight.js +0 -8
- package/dist/node_modules/lodash-es/every.js +0 -11
- package/dist/node_modules/lodash-es/groupBy.js +0 -6
- package/dist/node_modules/lodash-es/head.js +0 -5
- package/dist/node_modules/lodash-es/includes.js +0 -13
- package/dist/node_modules/lodash-es/indexOf.js +0 -11
- package/dist/node_modules/lodash-es/isRegExp.js +0 -5
- package/dist/node_modules/lodash-es/negate.js +0 -16
- package/dist/node_modules/lodash-es/pickBy.js +0 -15
- package/dist/node_modules/lodash-es/reject.js +0 -10
- package/dist/node_modules/lodash-es/some.js +0 -11
- package/dist/node_modules/lodash-es/uniq.js +0 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
- package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
- package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
- package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import isEmpty_default from "../../../../../../lodash-es/isEmpty.js";
|
|
2
|
-
import flatten_default from "../../../../../../lodash-es/flatten.js";
|
|
3
|
-
import clone_default from "../../../../../../lodash-es/clone.js";
|
|
4
|
-
import dropRight_default from "../../../../../../lodash-es/dropRight.js";
|
|
5
|
-
import find_default from "../../../../../../lodash-es/find.js";
|
|
6
|
-
import map_default from "../../../../../../lodash-es/map.js";
|
|
7
|
-
import has_default from "../../../../../../lodash-es/has.js";
|
|
8
|
-
import includes_default from "../../../../../../lodash-es/includes.js";
|
|
9
1
|
import { IN } from "../../constants.js";
|
|
10
2
|
import { EOF, createTokenInstance, tokenMatcher } from "../../../scan/tokens_public.js";
|
|
3
|
+
import { NextAfterTokenWalker } from "../../grammar/interpreter.js";
|
|
11
4
|
import { MismatchedTokenException } from "../../exceptions_public.js";
|
|
12
5
|
import { DEFAULT_PARSER_CONFIG } from "../parser.js";
|
|
13
6
|
const EOF_FOLLOW_KEY = {}, IN_RULE_RECOVERY_EXCEPTION = "InRuleRecoveryException";
|
|
@@ -17,11 +10,11 @@ var InRuleRecoveryException = class extends Error {
|
|
|
17
10
|
}
|
|
18
11
|
}, Recoverable = class {
|
|
19
12
|
initRecoverable(e) {
|
|
20
|
-
this.firstAfterRepMap = {}, this.resyncFollows = {}, this.recoveryEnabled =
|
|
13
|
+
this.firstAfterRepMap = {}, this.resyncFollows = {}, this.recoveryEnabled = Object.hasOwn(e, "recoveryEnabled") ? e.recoveryEnabled : DEFAULT_PARSER_CONFIG.recoveryEnabled, this.recoveryEnabled && (this.attemptInRepetitionRecovery = attemptInRepetitionRecovery);
|
|
21
14
|
}
|
|
22
15
|
getTokenToInsert(e) {
|
|
23
|
-
let
|
|
24
|
-
return
|
|
16
|
+
let t = createTokenInstance(e, "", NaN, NaN, NaN, NaN, NaN, NaN);
|
|
17
|
+
return t.isInsertedInRecovery = !0, t;
|
|
25
18
|
}
|
|
26
19
|
canTokenTypeBeInsertedInRecovery(e) {
|
|
27
20
|
return !0;
|
|
@@ -29,116 +22,123 @@ var InRuleRecoveryException = class extends Error {
|
|
|
29
22
|
canTokenTypeBeDeletedInRecovery(e) {
|
|
30
23
|
return !0;
|
|
31
24
|
}
|
|
32
|
-
tryInRepetitionRecovery(e,
|
|
33
|
-
let
|
|
34
|
-
let e = this.LA(0),
|
|
35
|
-
expected:
|
|
36
|
-
actual:
|
|
25
|
+
tryInRepetitionRecovery(e, t, n, r) {
|
|
26
|
+
let i = this.findReSyncTokenType(), o = this.exportLexerState(), s = [], c = !1, l = this.LA_FAST(1), u = this.LA_FAST(1), d = () => {
|
|
27
|
+
let e = this.LA(0), t = new MismatchedTokenException(this.errorMessageProvider.buildMismatchTokenMessage({
|
|
28
|
+
expected: r,
|
|
29
|
+
actual: l,
|
|
37
30
|
previous: e,
|
|
38
31
|
ruleName: this.getCurrRuleFullName()
|
|
39
|
-
}),
|
|
40
|
-
|
|
32
|
+
}), l, this.LA(0));
|
|
33
|
+
t.resyncedTokens = s.slice(0, -1), this.SAVE_ERROR(t);
|
|
41
34
|
};
|
|
42
|
-
for (; !
|
|
43
|
-
|
|
35
|
+
for (; !c;) if (this.tokenMatcher(u, r)) {
|
|
36
|
+
d();
|
|
44
37
|
return;
|
|
45
|
-
} else if (
|
|
46
|
-
|
|
38
|
+
} else if (n.call(this)) {
|
|
39
|
+
d(), e.apply(this, t);
|
|
47
40
|
return;
|
|
48
|
-
} else this.tokenMatcher(
|
|
49
|
-
this.importLexerState(
|
|
41
|
+
} else this.tokenMatcher(u, i) ? c = !0 : (u = this.SKIP_TOKEN(), this.addToResyncTokens(u, s));
|
|
42
|
+
this.importLexerState(o);
|
|
50
43
|
}
|
|
51
|
-
shouldInRepetitionRecoveryBeTried(e,
|
|
52
|
-
return !(
|
|
44
|
+
shouldInRepetitionRecoveryBeTried(e, t, n) {
|
|
45
|
+
return !(n === !1 || this.tokenMatcher(this.LA_FAST(1), e) || this.isBackTracking() || this.canPerformInRuleRecovery(e, this.getFollowsForInRuleRecovery(e, t)));
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
return
|
|
47
|
+
getNextPossibleTokenTypes(e) {
|
|
48
|
+
let t = e.ruleStack[0], n = this.getGAstProductions()[t];
|
|
49
|
+
return new NextAfterTokenWalker(n, e).startWalking();
|
|
57
50
|
}
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
getFollowsForInRuleRecovery(e, t) {
|
|
52
|
+
let n = this.getCurrentGrammarPath(e, t);
|
|
53
|
+
return this.getNextPossibleTokenTypes(n);
|
|
54
|
+
}
|
|
55
|
+
tryInRuleRecovery(e, t) {
|
|
56
|
+
if (this.canRecoverWithSingleTokenInsertion(e, t)) return this.getTokenToInsert(e);
|
|
60
57
|
if (this.canRecoverWithSingleTokenDeletion(e)) {
|
|
61
58
|
let e = this.SKIP_TOKEN();
|
|
62
59
|
return this.consumeToken(), e;
|
|
63
60
|
}
|
|
64
61
|
throw new InRuleRecoveryException("sad sad panda");
|
|
65
62
|
}
|
|
66
|
-
canPerformInRuleRecovery(e,
|
|
67
|
-
return this.canRecoverWithSingleTokenInsertion(e,
|
|
63
|
+
canPerformInRuleRecovery(e, t) {
|
|
64
|
+
return this.canRecoverWithSingleTokenInsertion(e, t) || this.canRecoverWithSingleTokenDeletion(e);
|
|
68
65
|
}
|
|
69
|
-
canRecoverWithSingleTokenInsertion(
|
|
70
|
-
if (!this.canTokenTypeBeInsertedInRecovery(
|
|
71
|
-
let
|
|
72
|
-
return
|
|
66
|
+
canRecoverWithSingleTokenInsertion(e, t) {
|
|
67
|
+
if (!this.canTokenTypeBeInsertedInRecovery(e) || t.length === 0) return !1;
|
|
68
|
+
let n = this.LA_FAST(1);
|
|
69
|
+
return t.find((e) => this.tokenMatcher(n, e)) !== void 0;
|
|
73
70
|
}
|
|
74
71
|
canRecoverWithSingleTokenDeletion(e) {
|
|
75
72
|
return this.canTokenTypeBeDeletedInRecovery(e) ? this.tokenMatcher(this.LA(2), e) : !1;
|
|
76
73
|
}
|
|
77
74
|
isInCurrentRuleReSyncSet(e) {
|
|
78
|
-
let
|
|
79
|
-
return
|
|
75
|
+
let t = this.getCurrFollowKey();
|
|
76
|
+
return this.getFollowSetFromFollowKey(t).includes(e);
|
|
80
77
|
}
|
|
81
78
|
findReSyncTokenType() {
|
|
82
|
-
let e = this.flattenFollowSet(),
|
|
79
|
+
let e = this.flattenFollowSet(), t = this.LA_FAST(1), n = 2;
|
|
83
80
|
for (;;) {
|
|
84
|
-
let
|
|
85
|
-
if (
|
|
86
|
-
|
|
81
|
+
let i = e.find((e) => tokenMatcher(t, e));
|
|
82
|
+
if (i !== void 0) return i;
|
|
83
|
+
t = this.LA(n), n++;
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
getCurrFollowKey() {
|
|
90
|
-
if (this.
|
|
91
|
-
let e = this.
|
|
87
|
+
if (this.RULE_STACK_IDX === 0) return EOF_FOLLOW_KEY;
|
|
88
|
+
let e = this.currRuleShortName, t = this.getLastExplicitRuleOccurrenceIndex(), n = this.getPreviousExplicitRuleShortName();
|
|
92
89
|
return {
|
|
93
90
|
ruleName: this.shortRuleNameToFullName(e),
|
|
94
|
-
idxInCallingRule:
|
|
95
|
-
inRule: this.shortRuleNameToFullName(
|
|
91
|
+
idxInCallingRule: t,
|
|
92
|
+
inRule: this.shortRuleNameToFullName(n)
|
|
96
93
|
};
|
|
97
94
|
}
|
|
98
95
|
buildFullFollowKeyStack() {
|
|
99
|
-
let e = this.RULE_STACK,
|
|
100
|
-
|
|
101
|
-
ruleName: this.shortRuleNameToFullName(
|
|
102
|
-
idxInCallingRule:
|
|
103
|
-
inRule: this.shortRuleNameToFullName(e[
|
|
104
|
-
}
|
|
96
|
+
let e = this.RULE_STACK, t = this.RULE_OCCURRENCE_STACK, n = this.RULE_STACK_IDX + 1, r = Array(n);
|
|
97
|
+
for (let i = 0; i < n; i++) i === 0 ? r[i] = EOF_FOLLOW_KEY : r[i] = {
|
|
98
|
+
ruleName: this.shortRuleNameToFullName(e[i]),
|
|
99
|
+
idxInCallingRule: t[i],
|
|
100
|
+
inRule: this.shortRuleNameToFullName(e[i - 1])
|
|
101
|
+
};
|
|
102
|
+
return r;
|
|
105
103
|
}
|
|
106
104
|
flattenFollowSet() {
|
|
107
|
-
return
|
|
105
|
+
return this.buildFullFollowKeyStack().map((e) => this.getFollowSetFromFollowKey(e)).flat();
|
|
108
106
|
}
|
|
109
|
-
getFollowSetFromFollowKey(
|
|
110
|
-
if (
|
|
111
|
-
let
|
|
112
|
-
return this.resyncFollows[
|
|
107
|
+
getFollowSetFromFollowKey(n) {
|
|
108
|
+
if (n === EOF_FOLLOW_KEY) return [EOF];
|
|
109
|
+
let r = n.ruleName + n.idxInCallingRule + IN + n.inRule;
|
|
110
|
+
return this.resyncFollows[r];
|
|
113
111
|
}
|
|
114
|
-
addToResyncTokens(e,
|
|
115
|
-
return this.tokenMatcher(e, EOF) ||
|
|
112
|
+
addToResyncTokens(e, n) {
|
|
113
|
+
return this.tokenMatcher(e, EOF) || n.push(e), n;
|
|
116
114
|
}
|
|
117
115
|
reSyncTo(e) {
|
|
118
|
-
let
|
|
119
|
-
for (; this.tokenMatcher(
|
|
120
|
-
return
|
|
116
|
+
let t = [], n = this.LA_FAST(1);
|
|
117
|
+
for (; this.tokenMatcher(n, e) === !1;) n = this.SKIP_TOKEN(), this.addToResyncTokens(n, t);
|
|
118
|
+
return t.slice(0, -1);
|
|
121
119
|
}
|
|
122
|
-
attemptInRepetitionRecovery(e,
|
|
123
|
-
getCurrentGrammarPath(e,
|
|
120
|
+
attemptInRepetitionRecovery(e, t, n, r, i, a, o) {}
|
|
121
|
+
getCurrentGrammarPath(e, t) {
|
|
124
122
|
return {
|
|
125
123
|
ruleStack: this.getHumanReadableRuleStack(),
|
|
126
|
-
occurrenceStack:
|
|
124
|
+
occurrenceStack: this.RULE_OCCURRENCE_STACK.slice(0, this.RULE_OCCURRENCE_STACK_IDX + 1),
|
|
127
125
|
lastTok: e,
|
|
128
|
-
lastTokOccurrence:
|
|
126
|
+
lastTokOccurrence: t
|
|
129
127
|
};
|
|
130
128
|
}
|
|
131
129
|
getHumanReadableRuleStack() {
|
|
132
|
-
|
|
130
|
+
let e = this.RULE_STACK_IDX + 1, t = Array(e);
|
|
131
|
+
for (let n = 0; n < e; n++) t[n] = this.shortRuleNameToFullName(this.RULE_STACK[n]);
|
|
132
|
+
return t;
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
|
-
function attemptInRepetitionRecovery(e,
|
|
136
|
-
let
|
|
137
|
-
if (
|
|
138
|
-
let e = this.getCurrRuleFullName(),
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
let
|
|
142
|
-
this.
|
|
135
|
+
function attemptInRepetitionRecovery(e, n, r, i, a, o, s) {
|
|
136
|
+
let c = this.getKeyForAutomaticLookahead(i, a), l = this.firstAfterRepMap[c];
|
|
137
|
+
if (l === void 0) {
|
|
138
|
+
let e = this.getCurrRuleFullName(), t = this.getGAstProductions()[e];
|
|
139
|
+
l = new o(t, a).startWalking(), this.firstAfterRepMap[c] = l;
|
|
140
|
+
}
|
|
141
|
+
let u = l.token, d = l.occurrence, f = l.isEndOfRule;
|
|
142
|
+
this.RULE_STACK_IDX === 0 && f && u === void 0 && (u = EOF, d = 1), !(u === void 0 || d === void 0) && this.shouldInRepetitionRecoveryBeTried(u, d, s) && this.tryInRepetitionRecovery(e, n, r, u);
|
|
143
143
|
}
|
|
144
144
|
export { IN_RULE_RECOVERY_EXCEPTION, Recoverable };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import noop_default from "../../../../../../lodash-es/noop.js";
|
|
2
|
-
import keys_default from "../../../../../../lodash-es/keys.js";
|
|
3
|
-
import has_default from "../../../../../../lodash-es/has.js";
|
|
4
|
-
import isUndefined_default from "../../../../../../lodash-es/isUndefined.js";
|
|
5
1
|
import { addNoneTerminalToCst, addTerminalToCst, setNodeLocationFull, setNodeLocationOnlyOffset } from "../../cst/cst.js";
|
|
6
2
|
import { createBaseSemanticVisitorConstructor, createBaseVisitorConstructorWithDefaults } from "../../cst/cst_visitor.js";
|
|
7
3
|
import { DEFAULT_PARSER_CONFIG } from "../parser.js";
|
|
8
4
|
var TreeBuilder = class {
|
|
9
|
-
initTreeBuilder(
|
|
10
|
-
if (this.CST_STACK = [], this.outputCst =
|
|
11
|
-
else if (/full/i.test(this.nodeLocationTracking)) this.recoveryEnabled ? (this.setNodeLocationFromToken = setNodeLocationFull, this.setNodeLocationFromNode = setNodeLocationFull, this.cstPostRule =
|
|
12
|
-
else if (/onlyOffset/i.test(this.nodeLocationTracking)) this.recoveryEnabled ? (this.setNodeLocationFromToken = setNodeLocationOnlyOffset, this.setNodeLocationFromNode = setNodeLocationOnlyOffset, this.cstPostRule =
|
|
13
|
-
else if (/none/i.test(this.nodeLocationTracking)) this.setNodeLocationFromToken =
|
|
14
|
-
else throw Error(`Invalid <nodeLocationTracking> config option: "${
|
|
5
|
+
initTreeBuilder(e) {
|
|
6
|
+
if (this.CST_STACK = [], this.outputCst = e.outputCst, this.nodeLocationTracking = Object.hasOwn(e, "nodeLocationTracking") ? e.nodeLocationTracking : DEFAULT_PARSER_CONFIG.nodeLocationTracking, !this.outputCst) this.cstInvocationStateUpdate = () => {}, this.cstFinallyStateUpdate = () => {}, this.cstPostTerminal = () => {}, this.cstPostNonTerminal = () => {}, this.cstPostRule = () => {};
|
|
7
|
+
else if (/full/i.test(this.nodeLocationTracking)) this.recoveryEnabled ? (this.setNodeLocationFromToken = setNodeLocationFull, this.setNodeLocationFromNode = setNodeLocationFull, this.cstPostRule = () => {}, this.setInitialNodeLocation = this.setInitialNodeLocationFullRecovery) : (this.setNodeLocationFromToken = () => {}, this.setNodeLocationFromNode = () => {}, this.cstPostRule = this.cstPostRuleFull, this.setInitialNodeLocation = this.setInitialNodeLocationFullRegular);
|
|
8
|
+
else if (/onlyOffset/i.test(this.nodeLocationTracking)) this.recoveryEnabled ? (this.setNodeLocationFromToken = setNodeLocationOnlyOffset, this.setNodeLocationFromNode = setNodeLocationOnlyOffset, this.cstPostRule = () => {}, this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRecovery) : (this.setNodeLocationFromToken = () => {}, this.setNodeLocationFromNode = () => {}, this.cstPostRule = this.cstPostRuleOnlyOffset, this.setInitialNodeLocation = this.setInitialNodeLocationOnlyOffsetRegular);
|
|
9
|
+
else if (/none/i.test(this.nodeLocationTracking)) this.setNodeLocationFromToken = () => {}, this.setNodeLocationFromNode = () => {}, this.cstPostRule = () => {}, this.setInitialNodeLocation = () => {};
|
|
10
|
+
else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);
|
|
15
11
|
}
|
|
16
12
|
setInitialNodeLocationOnlyOffsetRecovery(e) {
|
|
17
13
|
e.location = {
|
|
@@ -21,7 +17,7 @@ var TreeBuilder = class {
|
|
|
21
17
|
}
|
|
22
18
|
setInitialNodeLocationOnlyOffsetRegular(e) {
|
|
23
19
|
e.location = {
|
|
24
|
-
startOffset: this.
|
|
20
|
+
startOffset: this.LA_FAST(1).startOffset,
|
|
25
21
|
endOffset: NaN
|
|
26
22
|
};
|
|
27
23
|
}
|
|
@@ -36,67 +32,61 @@ var TreeBuilder = class {
|
|
|
36
32
|
};
|
|
37
33
|
}
|
|
38
34
|
setInitialNodeLocationFullRegular(e) {
|
|
39
|
-
let
|
|
35
|
+
let a = this.LA_FAST(1);
|
|
40
36
|
e.location = {
|
|
41
|
-
startOffset:
|
|
42
|
-
startLine:
|
|
43
|
-
startColumn:
|
|
37
|
+
startOffset: a.startOffset,
|
|
38
|
+
startLine: a.startLine,
|
|
39
|
+
startColumn: a.startColumn,
|
|
44
40
|
endOffset: NaN,
|
|
45
41
|
endLine: NaN,
|
|
46
42
|
endColumn: NaN
|
|
47
43
|
};
|
|
48
44
|
}
|
|
49
45
|
cstInvocationStateUpdate(e) {
|
|
50
|
-
let
|
|
46
|
+
let a = {
|
|
51
47
|
name: e,
|
|
52
48
|
children: Object.create(null)
|
|
53
49
|
};
|
|
54
|
-
this.setInitialNodeLocation(
|
|
50
|
+
this.setInitialNodeLocation(a), this.CST_STACK.push(a);
|
|
55
51
|
}
|
|
56
52
|
cstFinallyStateUpdate() {
|
|
57
53
|
this.CST_STACK.pop();
|
|
58
54
|
}
|
|
59
55
|
cstPostRuleFull(e) {
|
|
60
|
-
let
|
|
61
|
-
|
|
56
|
+
let a = this.LA(0), o = e.location;
|
|
57
|
+
o.startOffset <= a.startOffset ? (o.endOffset = a.endOffset, o.endLine = a.endLine, o.endColumn = a.endColumn) : (o.startOffset = NaN, o.startLine = NaN, o.startColumn = NaN);
|
|
62
58
|
}
|
|
63
59
|
cstPostRuleOnlyOffset(e) {
|
|
64
|
-
let
|
|
65
|
-
|
|
60
|
+
let a = this.LA(0), o = e.location;
|
|
61
|
+
o.startOffset <= a.startOffset ? o.endOffset = a.endOffset : o.startOffset = NaN;
|
|
66
62
|
}
|
|
67
|
-
cstPostTerminal(e,
|
|
68
|
-
let
|
|
69
|
-
addTerminalToCst(
|
|
63
|
+
cstPostTerminal(e, o) {
|
|
64
|
+
let s = this.CST_STACK[this.CST_STACK.length - 1];
|
|
65
|
+
addTerminalToCst(s, o, e), this.setNodeLocationFromToken(s.location, o);
|
|
70
66
|
}
|
|
71
|
-
cstPostNonTerminal(
|
|
72
|
-
let
|
|
73
|
-
addNoneTerminalToCst(
|
|
67
|
+
cstPostNonTerminal(a, o) {
|
|
68
|
+
let s = this.CST_STACK[this.CST_STACK.length - 1];
|
|
69
|
+
addNoneTerminalToCst(s, o, a), this.setNodeLocationFromNode(s.location, a.location);
|
|
74
70
|
}
|
|
75
71
|
getBaseCstVisitorConstructor() {
|
|
76
|
-
if (
|
|
77
|
-
let e = createBaseSemanticVisitorConstructor(this.className,
|
|
72
|
+
if (this.baseCstVisitorConstructor === void 0) {
|
|
73
|
+
let e = createBaseSemanticVisitorConstructor(this.className, Object.keys(this.gastProductionsCache));
|
|
78
74
|
return this.baseCstVisitorConstructor = e, e;
|
|
79
75
|
}
|
|
80
76
|
return this.baseCstVisitorConstructor;
|
|
81
77
|
}
|
|
82
78
|
getBaseCstVisitorConstructorWithDefaults() {
|
|
83
|
-
if (
|
|
84
|
-
let e = createBaseVisitorConstructorWithDefaults(this.className,
|
|
79
|
+
if (this.baseCstVisitorWithDefaultsConstructor === void 0) {
|
|
80
|
+
let e = createBaseVisitorConstructorWithDefaults(this.className, Object.keys(this.gastProductionsCache), this.getBaseCstVisitorConstructor());
|
|
85
81
|
return this.baseCstVisitorWithDefaultsConstructor = e, e;
|
|
86
82
|
}
|
|
87
83
|
return this.baseCstVisitorWithDefaultsConstructor;
|
|
88
84
|
}
|
|
89
|
-
getLastExplicitRuleShortName() {
|
|
90
|
-
let e = this.RULE_STACK;
|
|
91
|
-
return e[e.length - 1];
|
|
92
|
-
}
|
|
93
85
|
getPreviousExplicitRuleShortName() {
|
|
94
|
-
|
|
95
|
-
return e[e.length - 2];
|
|
86
|
+
return this.RULE_STACK[this.RULE_STACK_IDX - 1];
|
|
96
87
|
}
|
|
97
88
|
getLastExplicitRuleOccurrenceIndex() {
|
|
98
|
-
|
|
99
|
-
return e[e.length - 1];
|
|
89
|
+
return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX];
|
|
100
90
|
}
|
|
101
91
|
};
|
|
102
92
|
export { TreeBuilder };
|