@plumile/ui 0.1.113 → 0.1.114
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/lib/esm/_virtual/_rolldown/runtime.js +5 -5
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +1 -0
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7EHR7CIX.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js +37 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-LIHQZDEY.js → chunk-BR22UD5L.js} +18 -21
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +32 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +56 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20648 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +33 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-WXDBUCRP.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-BLDUP644.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js.map +1 -1
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/layout.js +105 -105
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/index.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/init-order.js +6 -6
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/bk.js +53 -53
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/index.js +5 -5
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +26 -26
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/util.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/util.js +54 -54
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/graph.js +45 -45
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/json.js +18 -18
- package/lib/esm/node_modules/lodash-es/_arrayLikeKeys.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseAssign.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseClone.js +24 -24
- package/lib/esm/node_modules/lodash-es/_baseForOwn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseGetAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseIsEqualDeep.js +12 -12
- package/lib/esm/node_modules/lodash-es/_baseIteratee.js +4 -4
- package/lib/esm/node_modules/lodash-es/_baseMatchesProperty.js +9 -9
- package/lib/esm/node_modules/lodash-es/_baseMerge.js +6 -6
- package/lib/esm/node_modules/lodash-es/_baseMergeDeep.js +15 -15
- package/lib/esm/node_modules/lodash-es/_baseOrderBy.js +14 -14
- package/lib/esm/node_modules/lodash-es/_baseSet.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseSetToString.js +5 -5
- package/lib/esm/node_modules/lodash-es/_baseToString.js +11 -11
- package/lib/esm/node_modules/lodash-es/_baseUniq.js +7 -7
- package/lib/esm/node_modules/lodash-es/_copySymbols.js +3 -3
- package/lib/esm/node_modules/lodash-es/_createSet.js +6 -6
- package/lib/esm/node_modules/lodash-es/_equalByTag.js +18 -18
- package/lib/esm/node_modules/lodash-es/_flatRest.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_getAllKeysIn.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getSymbolsIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_hasPath.js +5 -5
- package/lib/esm/node_modules/lodash-es/_initCloneObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/_isFlattenable.js +3 -3
- package/lib/esm/node_modules/lodash-es/_isIterateeCall.js +6 -6
- package/lib/esm/node_modules/lodash-es/_mapCacheClear.js +6 -6
- package/lib/esm/node_modules/lodash-es/findIndex.js +4 -4
- package/lib/esm/node_modules/lodash-es/forEach.js +3 -3
- package/lib/esm/node_modules/lodash-es/forIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/isEmpty.js +8 -8
- package/lib/esm/node_modules/lodash-es/isPlainObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/isString.js +3 -3
- package/lib/esm/node_modules/lodash-es/keys.js +4 -4
- package/lib/esm/node_modules/lodash-es/keysIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/map.js +3 -3
- package/lib/esm/node_modules/lodash-es/mapValues.js +5 -5
- package/lib/esm/node_modules/lodash-es/max.js +3 -3
- package/lib/esm/node_modules/lodash-es/min.js +3 -3
- package/lib/esm/node_modules/lodash-es/minBy.js +3 -3
- package/lib/esm/node_modules/lodash-es/reduce.js +5 -5
- package/lib/esm/node_modules/lodash-es/size.js +4 -4
- package/lib/esm/node_modules/lodash-es/sortBy.js +6 -6
- package/lib/esm/node_modules/lodash-es/union.js +6 -6
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +146 -146
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js.map +1 -1
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js +374 -374
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js.map +1 -1
- package/package.json +2 -2
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -27
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js +0 -155
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -45
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -89
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -39
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -600
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -29
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js +0 -13
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js +0 -12
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -14
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +0 -40
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -35
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1210
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -36
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
- package/lib/esm/node_modules/chevrotain/lib/src/api.js +0 -10
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -14
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js +0 -6
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -17
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -53
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -81
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -37
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -279
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -27
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -32
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -18
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -269
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -8
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -45
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -245
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -34
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -60
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -118
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -50
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -170
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -47
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -111
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -25
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -316
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -291
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -147
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -96
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -15
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js +0 -439
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -13
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -257
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -157
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -19
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js +0 -68
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -43
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -365
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js +0 -197
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js +0 -35
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/index.js +0 -1
- package/lib/esm/node_modules/langium/lib/default-module.js +0 -89
- package/lib/esm/node_modules/langium/lib/default-module.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/dependency-injection.js +0 -62
- package/lib/esm/node_modules/langium/lib/dependency-injection.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js +0 -15
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js +0 -40
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js +0 -307
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js +0 -900
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js +0 -17
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js +0 -13
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js +0 -11
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js +0 -164
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js +0 -15
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js +0 -397
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/lexer.js +0 -54
- package/lib/esm/node_modules/langium/lib/parser/lexer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js +0 -278
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js +0 -65
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js +0 -82
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/linker.js +0 -195
- package/lib/esm/node_modules/langium/lib/references/linker.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/name-provider.js +0 -17
- package/lib/esm/node_modules/langium/lib/references/name-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/references.js +0 -80
- package/lib/esm/node_modules/langium/lib/references/references.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js +0 -39
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js +0 -38
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope.js +0 -46
- package/lib/esm/node_modules/langium/lib/references/scope.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js +0 -129
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js +0 -149
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/service-registry.js +0 -41
- package/lib/esm/node_modules/langium/lib/service-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/syntax-tree.js +0 -74
- package/lib/esm/node_modules/langium/lib/syntax-tree.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js +0 -124
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/caching.js +0 -84
- package/lib/esm/node_modules/langium/lib/utils/caching.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/collections.js +0 -89
- package/lib/esm/node_modules/langium/lib/utils/collections.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js +0 -77
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/disposable.js +0 -12
- package/lib/esm/node_modules/langium/lib/utils/disposable.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/errors.js +0 -13
- package/lib/esm/node_modules/langium/lib/utils/errors.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/event.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/event.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js +0 -26
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js +0 -221
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js +0 -31
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js +0 -146
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/stream.js +0 -331
- package/lib/esm/node_modules/langium/lib/utils/stream.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js +0 -111
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js +0 -213
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js +0 -90
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js +0 -61
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js +0 -32
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js +0 -55
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js +0 -200
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/documents.js +0 -146
- package/lib/esm/node_modules/langium/lib/workspace/documents.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js +0 -37
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js +0 -53
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js +0 -46
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js +0 -70
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/flatMap.js +0 -10
- package/lib/esm/node_modules/lodash-es/flatMap.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/uniqBy.js +0 -10
- package/lib/esm/node_modules/lodash-es/uniqBy.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -32
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -40
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -16
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -37
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -39
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -678
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -130
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -28
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +0 -11
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -56
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -124
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js +0 -341
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -651
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -17
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -239
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -97
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -133
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -89
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -165
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -48
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -62
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -142
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1088
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js +0 -377
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js.map +0 -1
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import { assignMandatoryProperties as e, getContainerOfType as t, linkContentToContainer as n } from "../utils/ast-utils.js";
|
|
2
|
-
import { isAssignment as r, isCrossReference as i, isInfixRule as a, isKeyword as o, isParserRule as s } from "../languages/generated/ast.js";
|
|
3
|
-
import { getTypeName as c, isDataTypeRule as l } from "../utils/grammar-utils.js";
|
|
4
|
-
import { defaultParserErrorProvider as u } from "../../../chevrotain/lib/src/parse/errors_public.js";
|
|
5
|
-
import { LLkLookaheadStrategy as d } from "../../../chevrotain/lib/src/parse/grammar/llk_lookahead.js";
|
|
6
|
-
import { EmbeddedActionsParser as f } from "../../../chevrotain/lib/src/parse/parser/parser.js";
|
|
7
|
-
import "../../../chevrotain/lib/src/api.js";
|
|
8
|
-
import { LLStarLookaheadStrategy as p } from "../../../chevrotain-allstar/lib/all-star-lookahead.js";
|
|
9
|
-
import "../../../chevrotain-allstar/lib/index.js";
|
|
10
|
-
import { CstNodeBuilder as m } from "./cst-node-builder.js";
|
|
11
|
-
//#region ../../node_modules/langium/lib/parser/langium-parser.js
|
|
12
|
-
var h = Symbol("Datatype");
|
|
13
|
-
function g(e) {
|
|
14
|
-
return e.$type === h;
|
|
15
|
-
}
|
|
16
|
-
var _ = "", v = (e) => e.endsWith(_) ? e : e + _, y = class {
|
|
17
|
-
constructor(e, t) {
|
|
18
|
-
this._unorderedGroups = /* @__PURE__ */ new Map(), this.allRules = /* @__PURE__ */ new Map(), this.lexer = e.parser.Lexer;
|
|
19
|
-
let n = this.lexer.definition, r = e.LanguageMetaData.mode === "production";
|
|
20
|
-
e.shared.profilers.LangiumProfiler?.isActive("parsing") ? this.wrapper = new E(n, {
|
|
21
|
-
...e.parser.ParserConfig,
|
|
22
|
-
skipValidations: r,
|
|
23
|
-
errorMessageProvider: e.parser.ParserErrorMessageProvider
|
|
24
|
-
}, t, e.shared.profilers.LangiumProfiler.createTask("parsing", e.LanguageMetaData.languageId)) : this.wrapper = new T(n, {
|
|
25
|
-
...e.parser.ParserConfig,
|
|
26
|
-
skipValidations: r,
|
|
27
|
-
errorMessageProvider: e.parser.ParserErrorMessageProvider
|
|
28
|
-
}, t);
|
|
29
|
-
}
|
|
30
|
-
alternatives(e, t) {
|
|
31
|
-
this.wrapper.wrapOr(e, t);
|
|
32
|
-
}
|
|
33
|
-
optional(e, t) {
|
|
34
|
-
this.wrapper.wrapOption(e, t);
|
|
35
|
-
}
|
|
36
|
-
many(e, t) {
|
|
37
|
-
this.wrapper.wrapMany(e, t);
|
|
38
|
-
}
|
|
39
|
-
atLeastOne(e, t) {
|
|
40
|
-
this.wrapper.wrapAtLeastOne(e, t);
|
|
41
|
-
}
|
|
42
|
-
getRule(e) {
|
|
43
|
-
return this.allRules.get(e);
|
|
44
|
-
}
|
|
45
|
-
isRecording() {
|
|
46
|
-
return this.wrapper.IS_RECORDING;
|
|
47
|
-
}
|
|
48
|
-
get unorderedGroups() {
|
|
49
|
-
return this._unorderedGroups;
|
|
50
|
-
}
|
|
51
|
-
getRuleStack() {
|
|
52
|
-
return this.wrapper.RULE_STACK;
|
|
53
|
-
}
|
|
54
|
-
finalize() {
|
|
55
|
-
this.wrapper.wrapSelfAnalysis();
|
|
56
|
-
}
|
|
57
|
-
}, b = class extends y {
|
|
58
|
-
get current() {
|
|
59
|
-
return this.stack[this.stack.length - 1];
|
|
60
|
-
}
|
|
61
|
-
constructor(e) {
|
|
62
|
-
super(e, !1), this.nodeBuilder = new m(), this.stack = [], this.assignmentMap = /* @__PURE__ */ new Map(), this.operatorPrecedence = /* @__PURE__ */ new Map(), this.linker = e.references.Linker, this.converter = e.parser.ValueConverter, this.astReflection = e.shared.AstReflection;
|
|
63
|
-
}
|
|
64
|
-
rule(e, t) {
|
|
65
|
-
let n = this.computeRuleType(e), r;
|
|
66
|
-
a(e) && (r = e.name, this.registerPrecedenceMap(e));
|
|
67
|
-
let i = this.wrapper.DEFINE_RULE(v(e.name), this.startImplementation(n, r, t).bind(this));
|
|
68
|
-
return this.allRules.set(e.name, i), s(e) && e.entry && (this.mainRule = i), i;
|
|
69
|
-
}
|
|
70
|
-
registerPrecedenceMap(e) {
|
|
71
|
-
let t = e.name, n = /* @__PURE__ */ new Map();
|
|
72
|
-
for (let t = 0; t < e.operators.precedences.length; t++) {
|
|
73
|
-
let r = e.operators.precedences[t];
|
|
74
|
-
for (let e of r.operators) n.set(e.value, {
|
|
75
|
-
precedence: t,
|
|
76
|
-
rightAssoc: r.associativity === "right"
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
this.operatorPrecedence.set(t, n);
|
|
80
|
-
}
|
|
81
|
-
computeRuleType(e) {
|
|
82
|
-
return a(e) ? c(e) : e.fragment ? void 0 : l(e) ? h : c(e);
|
|
83
|
-
}
|
|
84
|
-
parse(e, t = {}) {
|
|
85
|
-
this.nodeBuilder.buildRootNode(e);
|
|
86
|
-
let r = this.lexerResult = this.lexer.tokenize(e);
|
|
87
|
-
this.wrapper.input = r.tokens;
|
|
88
|
-
let i = t.rule ? this.allRules.get(t.rule) : this.mainRule;
|
|
89
|
-
if (!i) throw Error(t.rule ? `No rule found with name '${t.rule}'` : "No main rule available.");
|
|
90
|
-
let a = this.doParse(i);
|
|
91
|
-
return this.nodeBuilder.addHiddenNodes(r.hidden), this.unorderedGroups.clear(), this.lexerResult = void 0, n(a, { deep: !0 }), {
|
|
92
|
-
value: a,
|
|
93
|
-
lexerErrors: r.errors,
|
|
94
|
-
lexerReport: r.report,
|
|
95
|
-
parserErrors: this.wrapper.errors
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
doParse(e) {
|
|
99
|
-
let t = this.wrapper.rule(e);
|
|
100
|
-
if (this.stack.length > 0 && (t = this.construct()), t === void 0) throw Error("No result from parser");
|
|
101
|
-
if (this.stack.length > 0) throw Error("Parser stack is not empty after parsing");
|
|
102
|
-
return t;
|
|
103
|
-
}
|
|
104
|
-
startImplementation(e, t, n) {
|
|
105
|
-
return (r) => {
|
|
106
|
-
let i = !this.isRecording() && e !== void 0;
|
|
107
|
-
if (i) {
|
|
108
|
-
let n = { $type: e };
|
|
109
|
-
this.stack.push(n), e === h ? n.value = "" : t !== void 0 && (n.$infixName = t);
|
|
110
|
-
}
|
|
111
|
-
return n(r), i ? this.construct() : void 0;
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
extractHiddenTokens(e) {
|
|
115
|
-
let t = this.lexerResult.hidden;
|
|
116
|
-
if (!t.length) return [];
|
|
117
|
-
let n = e.startOffset;
|
|
118
|
-
for (let e = 0; e < t.length; e++) if (t[e].startOffset > n) return t.splice(0, e);
|
|
119
|
-
return t.splice(0, t.length);
|
|
120
|
-
}
|
|
121
|
-
consume(e, t, n) {
|
|
122
|
-
let r = this.wrapper.wrapConsume(e, t);
|
|
123
|
-
if (!this.isRecording() && this.isValidToken(r)) {
|
|
124
|
-
let e = this.extractHiddenTokens(r);
|
|
125
|
-
this.nodeBuilder.addHiddenNodes(e);
|
|
126
|
-
let t = this.nodeBuilder.buildLeafNode(r, n), { assignment: i, crossRef: a } = this.getAssignment(n), s = this.current;
|
|
127
|
-
if (i) {
|
|
128
|
-
let e = o(n) ? r.image : this.converter.convert(r.image, t);
|
|
129
|
-
this.assign(i.operator, i.feature, e, t, a);
|
|
130
|
-
} else if (g(s)) {
|
|
131
|
-
let e = r.image;
|
|
132
|
-
o(n) || (e = this.converter.convert(e, t).toString()), s.value += e;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
isValidToken(e) {
|
|
137
|
-
return !e.isInsertedInRecovery && !isNaN(e.startOffset) && typeof e.endOffset == "number" && !isNaN(e.endOffset);
|
|
138
|
-
}
|
|
139
|
-
subrule(e, t, n, r, i) {
|
|
140
|
-
let a;
|
|
141
|
-
!this.isRecording() && !n && (a = this.nodeBuilder.buildCompositeNode(r));
|
|
142
|
-
let o;
|
|
143
|
-
try {
|
|
144
|
-
o = this.wrapper.wrapSubrule(e, t, i);
|
|
145
|
-
} finally {
|
|
146
|
-
this.isRecording() || (o === void 0 && !n && (o = this.construct()), o !== void 0 && a && a.length > 0 && this.performSubruleAssignment(o, r, a));
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
performSubruleAssignment(e, t, n) {
|
|
150
|
-
let { assignment: r, crossRef: i } = this.getAssignment(t);
|
|
151
|
-
if (r) this.assign(r.operator, r.feature, e, n, i);
|
|
152
|
-
else if (!r) {
|
|
153
|
-
let t = this.current;
|
|
154
|
-
if (g(t)) t.value += e.toString();
|
|
155
|
-
else if (typeof e == "object" && e) {
|
|
156
|
-
let n = this.assignWithoutOverride(e, t);
|
|
157
|
-
this.stack.pop(), this.stack.push(n);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
action(e, t) {
|
|
162
|
-
if (!this.isRecording()) {
|
|
163
|
-
let n = this.current;
|
|
164
|
-
if (t.feature && t.operator) {
|
|
165
|
-
n = this.construct(), this.nodeBuilder.removeNode(n.$cstNode), this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);
|
|
166
|
-
let r = { $type: e };
|
|
167
|
-
this.stack.push(r), this.assign(t.operator, t.feature, n, n.$cstNode);
|
|
168
|
-
} else n.$type = e;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
construct() {
|
|
172
|
-
if (this.isRecording()) return;
|
|
173
|
-
let t = this.stack.pop();
|
|
174
|
-
return this.nodeBuilder.construct(t), "$infixName" in t ? this.constructInfix(t, this.operatorPrecedence.get(t.$infixName)) : g(t) ? this.converter.convert(t.value, t.$cstNode) : (e(this.astReflection, t), t);
|
|
175
|
-
}
|
|
176
|
-
constructInfix(e, t) {
|
|
177
|
-
let n = e.parts;
|
|
178
|
-
if (!Array.isArray(n) || n.length === 0) return;
|
|
179
|
-
let r = e.operators;
|
|
180
|
-
if (!Array.isArray(r) || n.length < 2) return n[0];
|
|
181
|
-
let i = 0, a = -1;
|
|
182
|
-
for (let e = 0; e < r.length; e++) {
|
|
183
|
-
let n = r[e], o = t.get(n) ?? {
|
|
184
|
-
precedence: Infinity,
|
|
185
|
-
rightAssoc: !1
|
|
186
|
-
};
|
|
187
|
-
o.precedence > a ? (a = o.precedence, i = e) : o.precedence === a && (o.rightAssoc || (i = e));
|
|
188
|
-
}
|
|
189
|
-
let o = r.slice(0, i), s = r.slice(i + 1), c = n.slice(0, i + 1), l = n.slice(i + 1), u = {
|
|
190
|
-
$infixName: e.$infixName,
|
|
191
|
-
$type: e.$type,
|
|
192
|
-
$cstNode: e.$cstNode,
|
|
193
|
-
parts: c,
|
|
194
|
-
operators: o
|
|
195
|
-
}, d = {
|
|
196
|
-
$infixName: e.$infixName,
|
|
197
|
-
$type: e.$type,
|
|
198
|
-
$cstNode: e.$cstNode,
|
|
199
|
-
parts: l,
|
|
200
|
-
operators: s
|
|
201
|
-
}, f = this.constructInfix(u, t), p = this.constructInfix(d, t);
|
|
202
|
-
return {
|
|
203
|
-
$type: e.$type,
|
|
204
|
-
$cstNode: e.$cstNode,
|
|
205
|
-
left: f,
|
|
206
|
-
operator: r[i],
|
|
207
|
-
right: p
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
getAssignment(e) {
|
|
211
|
-
if (!this.assignmentMap.has(e)) {
|
|
212
|
-
let n = t(e, r);
|
|
213
|
-
this.assignmentMap.set(e, {
|
|
214
|
-
assignment: n,
|
|
215
|
-
crossRef: n && i(n.terminal) ? n.terminal.isMulti ? "multi" : "single" : void 0
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
return this.assignmentMap.get(e);
|
|
219
|
-
}
|
|
220
|
-
assign(e, t, n, r, i) {
|
|
221
|
-
let a = this.current, o;
|
|
222
|
-
switch (o = i === "single" && typeof n == "string" ? this.linker.buildReference(a, t, r, n) : i === "multi" && typeof n == "string" ? this.linker.buildMultiReference(a, t, r, n) : n, e) {
|
|
223
|
-
case "=":
|
|
224
|
-
a[t] = o;
|
|
225
|
-
break;
|
|
226
|
-
case "?=":
|
|
227
|
-
a[t] = !0;
|
|
228
|
-
break;
|
|
229
|
-
case "+=": Array.isArray(a[t]) || (a[t] = []), a[t].push(o);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
assignWithoutOverride(e, t) {
|
|
233
|
-
for (let [n, r] of Object.entries(t)) {
|
|
234
|
-
let t = e[n];
|
|
235
|
-
t === void 0 ? e[n] = r : Array.isArray(t) && Array.isArray(r) && (r.push(...t), e[n] = r);
|
|
236
|
-
}
|
|
237
|
-
let n = e.$cstNode;
|
|
238
|
-
return n && (n.astNode = void 0, e.$cstNode = void 0), e;
|
|
239
|
-
}
|
|
240
|
-
get definitionErrors() {
|
|
241
|
-
return this.wrapper.definitionErrors;
|
|
242
|
-
}
|
|
243
|
-
}, x = class {
|
|
244
|
-
buildMismatchTokenMessage(e) {
|
|
245
|
-
return u.buildMismatchTokenMessage(e);
|
|
246
|
-
}
|
|
247
|
-
buildNotAllInputParsedMessage(e) {
|
|
248
|
-
return u.buildNotAllInputParsedMessage(e);
|
|
249
|
-
}
|
|
250
|
-
buildNoViableAltMessage(e) {
|
|
251
|
-
return u.buildNoViableAltMessage(e);
|
|
252
|
-
}
|
|
253
|
-
buildEarlyExitMessage(e) {
|
|
254
|
-
return u.buildEarlyExitMessage(e);
|
|
255
|
-
}
|
|
256
|
-
}, S = class extends x {
|
|
257
|
-
buildMismatchTokenMessage({ expected: e, actual: t }) {
|
|
258
|
-
return `Expecting ${e.LABEL ? "`" + e.LABEL + "`" : e.name.endsWith(":KW") ? `keyword '${e.name.substring(0, e.name.length - 3)}'` : `token of type '${e.name}'`} but found \`${t.image}\`.`;
|
|
259
|
-
}
|
|
260
|
-
buildNotAllInputParsedMessage({ firstRedundant: e }) {
|
|
261
|
-
return `Expecting end of file but found \`${e.image}\`.`;
|
|
262
|
-
}
|
|
263
|
-
}, C = class extends y {
|
|
264
|
-
constructor(e) {
|
|
265
|
-
super(e, !0), this.tokens = [], this.elementStack = [], this.lastElementStack = [], this.nextTokenIndex = 0, this.stackSize = 0;
|
|
266
|
-
}
|
|
267
|
-
action() {}
|
|
268
|
-
construct() {}
|
|
269
|
-
parse(e) {
|
|
270
|
-
this.resetState();
|
|
271
|
-
let t = this.lexer.tokenize(e, { mode: "partial" });
|
|
272
|
-
return this.tokens = t.tokens, this.wrapper.input = [...this.tokens], this.mainRule.call(this.wrapper, {}), this.unorderedGroups.clear(), {
|
|
273
|
-
tokens: this.tokens,
|
|
274
|
-
elementStack: [...this.lastElementStack],
|
|
275
|
-
tokenIndex: this.nextTokenIndex
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
rule(e, t) {
|
|
279
|
-
let n = this.wrapper.DEFINE_RULE(v(e.name), this.startImplementation(t).bind(this));
|
|
280
|
-
return this.allRules.set(e.name, n), e.entry && (this.mainRule = n), n;
|
|
281
|
-
}
|
|
282
|
-
resetState() {
|
|
283
|
-
this.elementStack = [], this.lastElementStack = [], this.nextTokenIndex = 0, this.stackSize = 0;
|
|
284
|
-
}
|
|
285
|
-
startImplementation(e) {
|
|
286
|
-
return (t) => {
|
|
287
|
-
let n = this.keepStackSize();
|
|
288
|
-
try {
|
|
289
|
-
e(t);
|
|
290
|
-
} finally {
|
|
291
|
-
this.resetStackSize(n);
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
removeUnexpectedElements() {
|
|
296
|
-
this.elementStack.splice(this.stackSize);
|
|
297
|
-
}
|
|
298
|
-
keepStackSize() {
|
|
299
|
-
let e = this.elementStack.length;
|
|
300
|
-
return this.stackSize = e, e;
|
|
301
|
-
}
|
|
302
|
-
resetStackSize(e) {
|
|
303
|
-
this.removeUnexpectedElements(), this.stackSize = e;
|
|
304
|
-
}
|
|
305
|
-
consume(e, t, n) {
|
|
306
|
-
this.wrapper.wrapConsume(e, t), this.isRecording() || (this.lastElementStack = [...this.elementStack, n], this.nextTokenIndex = this.currIdx + 1);
|
|
307
|
-
}
|
|
308
|
-
subrule(e, t, n, r, i) {
|
|
309
|
-
this.before(r), this.wrapper.wrapSubrule(e, t, i), this.after(r);
|
|
310
|
-
}
|
|
311
|
-
before(e) {
|
|
312
|
-
this.isRecording() || this.elementStack.push(e);
|
|
313
|
-
}
|
|
314
|
-
after(e) {
|
|
315
|
-
if (!this.isRecording()) {
|
|
316
|
-
let t = this.elementStack.lastIndexOf(e);
|
|
317
|
-
t >= 0 && this.elementStack.splice(t);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
get currIdx() {
|
|
321
|
-
return this.wrapper.currIdx;
|
|
322
|
-
}
|
|
323
|
-
}, w = {
|
|
324
|
-
recoveryEnabled: !0,
|
|
325
|
-
nodeLocationTracking: "full",
|
|
326
|
-
skipValidations: !0,
|
|
327
|
-
errorMessageProvider: new S()
|
|
328
|
-
}, T = class extends f {
|
|
329
|
-
constructor(e, t, n) {
|
|
330
|
-
let r = t && "maxLookahead" in t;
|
|
331
|
-
super(e, {
|
|
332
|
-
...w,
|
|
333
|
-
lookaheadStrategy: r ? new d({ maxLookahead: t.maxLookahead }) : new p({
|
|
334
|
-
logging: t.skipValidations ? () => {} : void 0,
|
|
335
|
-
incomplete: n
|
|
336
|
-
}),
|
|
337
|
-
...t
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
get IS_RECORDING() {
|
|
341
|
-
return this.RECORDING_PHASE;
|
|
342
|
-
}
|
|
343
|
-
DEFINE_RULE(e, t, n) {
|
|
344
|
-
return this.RULE(e, t, n);
|
|
345
|
-
}
|
|
346
|
-
wrapSelfAnalysis() {
|
|
347
|
-
this.performSelfAnalysis();
|
|
348
|
-
}
|
|
349
|
-
wrapConsume(e, t) {
|
|
350
|
-
return this.consume(e, t, void 0);
|
|
351
|
-
}
|
|
352
|
-
wrapSubrule(e, t, n) {
|
|
353
|
-
return this.subrule(e, t, { ARGS: [n] });
|
|
354
|
-
}
|
|
355
|
-
wrapOr(e, t) {
|
|
356
|
-
this.or(e, t);
|
|
357
|
-
}
|
|
358
|
-
wrapOption(e, t) {
|
|
359
|
-
this.option(e, t);
|
|
360
|
-
}
|
|
361
|
-
wrapMany(e, t) {
|
|
362
|
-
this.many(e, t);
|
|
363
|
-
}
|
|
364
|
-
wrapAtLeastOne(e, t) {
|
|
365
|
-
this.atLeastOne(e, t);
|
|
366
|
-
}
|
|
367
|
-
rule(e) {
|
|
368
|
-
return e.call(this, {});
|
|
369
|
-
}
|
|
370
|
-
}, E = class extends T {
|
|
371
|
-
constructor(e, t, n, r) {
|
|
372
|
-
super(e, t, n), this.task = r;
|
|
373
|
-
}
|
|
374
|
-
rule(e) {
|
|
375
|
-
this.task.start(), this.task.startSubTask(this.ruleName(e));
|
|
376
|
-
try {
|
|
377
|
-
return super.rule(e);
|
|
378
|
-
} finally {
|
|
379
|
-
this.task.stopSubTask(this.ruleName(e)), this.task.stop();
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
ruleName(e) {
|
|
383
|
-
return e.ruleName;
|
|
384
|
-
}
|
|
385
|
-
subrule(e, t, n) {
|
|
386
|
-
this.task.startSubTask(this.ruleName(t));
|
|
387
|
-
try {
|
|
388
|
-
return super.subrule(e, t, n);
|
|
389
|
-
} finally {
|
|
390
|
-
this.task.stopSubTask(this.ruleName(t));
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
};
|
|
394
|
-
//#endregion
|
|
395
|
-
export { C as LangiumCompletionParser, b as LangiumParser, S as LangiumParserErrorMessageProvider };
|
|
396
|
-
|
|
397
|
-
//# sourceMappingURL=langium-parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"langium-parser.js","names":[],"sources":["../../../../../../../../node_modules/langium/lib/parser/langium-parser.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2021 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isInfixRule } from '../languages/generated/ast.js';\nimport { defaultParserErrorProvider, EmbeddedActionsParser, LLkLookaheadStrategy } from 'chevrotain';\nimport { LLStarLookaheadStrategy } from 'chevrotain-allstar';\nimport { isAssignment, isCrossReference, isKeyword, isParserRule } from '../languages/generated/ast.js';\nimport { getTypeName, isDataTypeRule } from '../utils/grammar-utils.js';\nimport { assignMandatoryProperties, getContainerOfType, linkContentToContainer } from '../utils/ast-utils.js';\nimport { CstNodeBuilder } from './cst-node-builder.js';\nexport const DatatypeSymbol = Symbol('Datatype');\nfunction isDataTypeNode(node) {\n return node.$type === DatatypeSymbol;\n}\nconst ruleSuffix = '\\u200B';\nconst withRuleSuffix = (name) => name.endsWith(ruleSuffix) ? name : name + ruleSuffix;\nexport class AbstractLangiumParser {\n constructor(services, incomplete) {\n this._unorderedGroups = new Map();\n this.allRules = new Map();\n this.lexer = services.parser.Lexer;\n const tokens = this.lexer.definition;\n const production = services.LanguageMetaData.mode === 'production';\n if (services.shared.profilers.LangiumProfiler?.isActive('parsing')) {\n this.wrapper = new ProfilerWrapper(tokens, {\n ...services.parser.ParserConfig,\n skipValidations: production,\n errorMessageProvider: services.parser.ParserErrorMessageProvider\n }, incomplete, services.shared.profilers.LangiumProfiler.createTask('parsing', services.LanguageMetaData.languageId));\n }\n else {\n this.wrapper = new ChevrotainWrapper(tokens, {\n ...services.parser.ParserConfig,\n skipValidations: production,\n errorMessageProvider: services.parser.ParserErrorMessageProvider\n }, incomplete);\n }\n }\n alternatives(idx, choices) {\n this.wrapper.wrapOr(idx, choices);\n }\n optional(idx, callback) {\n this.wrapper.wrapOption(idx, callback);\n }\n many(idx, callback) {\n this.wrapper.wrapMany(idx, callback);\n }\n atLeastOne(idx, callback) {\n this.wrapper.wrapAtLeastOne(idx, callback);\n }\n getRule(name) {\n return this.allRules.get(name);\n }\n isRecording() {\n return this.wrapper.IS_RECORDING;\n }\n get unorderedGroups() {\n return this._unorderedGroups;\n }\n getRuleStack() {\n return this.wrapper.RULE_STACK;\n }\n finalize() {\n this.wrapper.wrapSelfAnalysis();\n }\n}\nexport class LangiumParser extends AbstractLangiumParser {\n get current() {\n return this.stack[this.stack.length - 1];\n }\n constructor(services) {\n super(services, false);\n this.nodeBuilder = new CstNodeBuilder();\n this.stack = [];\n this.assignmentMap = new Map();\n this.operatorPrecedence = new Map();\n this.linker = services.references.Linker;\n this.converter = services.parser.ValueConverter;\n this.astReflection = services.shared.AstReflection;\n }\n rule(rule, impl) {\n const type = this.computeRuleType(rule);\n let infixName = undefined;\n if (isInfixRule(rule)) {\n infixName = rule.name;\n this.registerPrecedenceMap(rule);\n }\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(type, infixName, impl).bind(this));\n this.allRules.set(rule.name, ruleMethod);\n if (isParserRule(rule) && rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n registerPrecedenceMap(rule) {\n const name = rule.name;\n const map = new Map();\n for (let i = 0; i < rule.operators.precedences.length; i++) {\n const precedence = rule.operators.precedences[i];\n for (const keyword of precedence.operators) {\n map.set(keyword.value, {\n precedence: i,\n rightAssoc: precedence.associativity === 'right'\n });\n }\n }\n this.operatorPrecedence.set(name, map);\n }\n computeRuleType(rule) {\n if (isInfixRule(rule)) {\n return getTypeName(rule);\n }\n else if (rule.fragment) {\n return undefined;\n }\n else if (isDataTypeRule(rule)) {\n return DatatypeSymbol;\n }\n else {\n return getTypeName(rule);\n }\n }\n parse(input, options = {}) {\n this.nodeBuilder.buildRootNode(input);\n const lexerResult = this.lexerResult = this.lexer.tokenize(input);\n this.wrapper.input = lexerResult.tokens;\n const ruleMethod = options.rule ? this.allRules.get(options.rule) : this.mainRule;\n if (!ruleMethod) {\n throw new Error(options.rule ? `No rule found with name '${options.rule}'` : 'No main rule available.');\n }\n const result = this.doParse(ruleMethod);\n this.nodeBuilder.addHiddenNodes(lexerResult.hidden);\n this.unorderedGroups.clear();\n this.lexerResult = undefined;\n linkContentToContainer(result, { deep: true });\n return {\n value: result,\n lexerErrors: lexerResult.errors,\n lexerReport: lexerResult.report,\n parserErrors: this.wrapper.errors\n };\n }\n doParse(rule) {\n let result = this.wrapper.rule(rule);\n if (this.stack.length > 0) {\n // In case the parser throws on the entry rule, `construct` is not called\n // We need to call it manually here\n result = this.construct();\n }\n // Perform some sanity checking\n if (result === undefined) {\n throw new Error('No result from parser');\n }\n else if (this.stack.length > 0) {\n throw new Error('Parser stack is not empty after parsing');\n }\n return result;\n }\n startImplementation($type, infixName, implementation) {\n return (args) => {\n // Only create a new AST node in case the calling rule is not a fragment rule\n const createNode = !this.isRecording() && $type !== undefined;\n if (createNode) {\n const node = { $type };\n this.stack.push(node);\n if ($type === DatatypeSymbol) {\n node.value = '';\n }\n else if (infixName !== undefined) {\n node.$infixName = infixName;\n }\n }\n // Execute the actual rule implementation\n // The `implementation` never returns anything and only manipulates the parser state.\n implementation(args);\n // Once the rule implementation is done, we need to construct the AST node\n // If the implementation throws (likely a recognition error), we relay the construction to the `subrule` method\n return createNode ? this.construct() : undefined;\n };\n }\n extractHiddenTokens(token) {\n const hiddenTokens = this.lexerResult.hidden;\n if (!hiddenTokens.length) {\n return [];\n }\n const offset = token.startOffset;\n for (let i = 0; i < hiddenTokens.length; i++) {\n const token = hiddenTokens[i];\n if (token.startOffset > offset) {\n return hiddenTokens.splice(0, i);\n }\n }\n return hiddenTokens.splice(0, hiddenTokens.length);\n }\n consume(idx, tokenType, feature) {\n const token = this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording() && this.isValidToken(token)) {\n // Before inserting the current token into the CST, we want add the hidden tokens (i.e. comments)\n // These are located directly before the current token, but are not part of the token stream.\n // Adding the hidden tokens to the CST requires searching through the CST and finding the correct position.\n // Performing this work here is more efficient than doing it later on.\n const hiddenTokens = this.extractHiddenTokens(token);\n this.nodeBuilder.addHiddenNodes(hiddenTokens);\n const leafNode = this.nodeBuilder.buildLeafNode(token, feature);\n const { assignment, crossRef } = this.getAssignment(feature);\n const current = this.current;\n if (assignment) {\n const convertedValue = isKeyword(feature) ? token.image : this.converter.convert(token.image, leafNode);\n this.assign(assignment.operator, assignment.feature, convertedValue, leafNode, crossRef);\n }\n else if (isDataTypeNode(current)) {\n let text = token.image;\n if (!isKeyword(feature)) {\n text = this.converter.convert(text, leafNode).toString();\n }\n current.value += text;\n }\n }\n }\n /**\n * Most consumed parser tokens are valid. However there are two cases in which they are not valid:\n *\n * 1. They were inserted during error recovery by the parser. These tokens don't really exist and should not be further processed\n * 2. They contain invalid token ranges. This might include the special EOF token, or other tokens produced by invalid token builders.\n */\n isValidToken(token) {\n return !token.isInsertedInRecovery && !isNaN(token.startOffset) && typeof token.endOffset === 'number' && !isNaN(token.endOffset);\n }\n subrule(idx, rule, fragment, feature, args) {\n let cstNode;\n if (!this.isRecording() && !fragment) {\n // We only want to create a new CST node if the subrule actually creates a new AST node.\n // In other cases like calls of fragment rules the current CST/AST is populated further.\n // Note that skipping this initialization and leaving cstNode unassigned also skips the subrule assignment later on.\n // This is intended, as fragment rules only enrich the current AST node\n cstNode = this.nodeBuilder.buildCompositeNode(feature);\n }\n let result;\n try {\n result = this.wrapper.wrapSubrule(idx, rule, args);\n }\n finally {\n if (!this.isRecording()) {\n // Calling `subrule` on chevrotain parsers can result in a recognition error\n // This likely means that we encounter a syntax error in the input.\n // In this case, the result of the subrule is `undefined` and we need to call `construct` manually.\n if (result === undefined && !fragment) {\n result = this.construct();\n }\n // We want to perform the subrule assignment regardless of the recognition error\n // But only if the subrule call actually consumed any tokens\n if (result !== undefined && cstNode && cstNode.length > 0) {\n this.performSubruleAssignment(result, feature, cstNode);\n }\n }\n // We don't have a catch block in here because we want to propagate the recognition error to the caller\n // This results in much better error recovery and error messages from chevrotain\n }\n }\n performSubruleAssignment(result, feature, cstNode) {\n const { assignment, crossRef } = this.getAssignment(feature);\n if (assignment) {\n this.assign(assignment.operator, assignment.feature, result, cstNode, crossRef);\n }\n else if (!assignment) {\n // If we call a subrule without an assignment we either:\n // 1. append the result of the subrule (data type rule)\n // 2. override the current object with the newly parsed object\n // If the current element is an AST node and the result of the subrule\n // is a data type rule, we can safely discard the results.\n const current = this.current;\n if (isDataTypeNode(current)) {\n current.value += result.toString();\n }\n else if (typeof result === 'object' && result) {\n const object = this.assignWithoutOverride(result, current);\n const newItem = object;\n this.stack.pop();\n this.stack.push(newItem);\n }\n }\n }\n action($type, action) {\n if (!this.isRecording()) {\n let last = this.current;\n if (action.feature && action.operator) {\n last = this.construct();\n this.nodeBuilder.removeNode(last.$cstNode);\n const node = this.nodeBuilder.buildCompositeNode(action);\n node.content.push(last.$cstNode);\n const newItem = { $type };\n this.stack.push(newItem);\n this.assign(action.operator, action.feature, last, last.$cstNode);\n }\n else {\n last.$type = $type;\n }\n }\n }\n construct() {\n if (this.isRecording()) {\n return undefined;\n }\n const obj = this.stack.pop();\n this.nodeBuilder.construct(obj);\n if ('$infixName' in obj) {\n return this.constructInfix(obj, this.operatorPrecedence.get(obj.$infixName));\n }\n else if (isDataTypeNode(obj)) {\n return this.converter.convert(obj.value, obj.$cstNode);\n }\n else {\n assignMandatoryProperties(this.astReflection, obj);\n }\n return obj;\n }\n constructInfix(obj, precedence) {\n const parts = obj.parts;\n if (!Array.isArray(parts) || parts.length === 0) {\n // Likely the result of a syntax error, simply return undefined\n return undefined;\n }\n const operators = obj.operators;\n if (!Array.isArray(operators) || parts.length < 2) {\n // Captured just a single, non-binary expression\n // Simply return the expression as is.\n return parts[0];\n }\n // Find the operator with the lowest precedence (highest value in precedence map)\n let lowestPrecedenceIdx = 0;\n let lowestPrecedenceValue = -1;\n for (let i = 0; i < operators.length; i++) {\n const operator = operators[i];\n const opPrecedence = precedence.get(operator) ?? {\n precedence: Infinity,\n rightAssoc: false\n };\n // For equal precedence, use associativity to determine which operator to pick\n if (opPrecedence.precedence > lowestPrecedenceValue) {\n // Always pick operators with lower precedence (higher precedence value)\n lowestPrecedenceValue = opPrecedence.precedence;\n lowestPrecedenceIdx = i;\n }\n else if (opPrecedence.precedence === lowestPrecedenceValue) {\n // Check associativity when precedence is equal\n if (!opPrecedence.rightAssoc) {\n // For left associative operators (default), pick the leftmost one\n // This means choosing the rightmost equal-precedence operator when working backwards\n lowestPrecedenceIdx = i;\n }\n // For right associative operators with equal precedence,\n // we keep the previous (rightmost) index\n }\n }\n // Split the expression at the lowest precedence operator\n const leftOperators = operators.slice(0, lowestPrecedenceIdx);\n const rightOperators = operators.slice(lowestPrecedenceIdx + 1);\n const leftParts = parts.slice(0, lowestPrecedenceIdx + 1);\n const rightParts = parts.slice(lowestPrecedenceIdx + 1);\n // Create sub-expressions\n const leftInfix = {\n $infixName: obj.$infixName,\n $type: obj.$type,\n $cstNode: obj.$cstNode,\n parts: leftParts,\n operators: leftOperators\n };\n const rightInfix = {\n $infixName: obj.$infixName,\n $type: obj.$type,\n $cstNode: obj.$cstNode,\n parts: rightParts,\n operators: rightOperators\n };\n // Recursively build the left and right subtrees\n const leftTree = this.constructInfix(leftInfix, precedence);\n const rightTree = this.constructInfix(rightInfix, precedence);\n // Create the final binary expression\n return {\n $type: obj.$type,\n $cstNode: obj.$cstNode,\n left: leftTree,\n operator: operators[lowestPrecedenceIdx],\n right: rightTree\n };\n }\n getAssignment(feature) {\n if (!this.assignmentMap.has(feature)) {\n const assignment = getContainerOfType(feature, isAssignment);\n this.assignmentMap.set(feature, {\n assignment: assignment,\n crossRef: assignment && isCrossReference(assignment.terminal) ? (assignment.terminal.isMulti ? 'multi' : 'single') : undefined\n });\n }\n return this.assignmentMap.get(feature);\n }\n assign(operator, feature, value, cstNode, crossRef) {\n const obj = this.current;\n let item;\n if (crossRef === 'single' && typeof value === 'string') {\n item = this.linker.buildReference(obj, feature, cstNode, value);\n }\n else if (crossRef === 'multi' && typeof value === 'string') {\n item = this.linker.buildMultiReference(obj, feature, cstNode, value);\n }\n else {\n item = value;\n }\n switch (operator) {\n case '=': {\n obj[feature] = item;\n break;\n }\n case '?=': {\n obj[feature] = true;\n break;\n }\n case '+=': {\n if (!Array.isArray(obj[feature])) {\n obj[feature] = [];\n }\n obj[feature].push(item);\n }\n }\n }\n assignWithoutOverride(target, source) {\n for (const [name, existingValue] of Object.entries(source)) {\n const newValue = target[name];\n if (newValue === undefined) {\n target[name] = existingValue;\n }\n else if (Array.isArray(newValue) && Array.isArray(existingValue)) {\n existingValue.push(...newValue);\n target[name] = existingValue;\n }\n }\n // The target was parsed from a unassigned subrule\n // After the subrule construction, it received a cst node\n // This CST node will later be overriden by the cst node builder\n // To prevent references to stale AST nodes in the CST,\n // we need to remove the reference here\n const targetCstNode = target.$cstNode;\n if (targetCstNode) {\n targetCstNode.astNode = undefined;\n target.$cstNode = undefined;\n }\n return target;\n }\n get definitionErrors() {\n return this.wrapper.definitionErrors;\n }\n}\nexport class AbstractParserErrorMessageProvider {\n buildMismatchTokenMessage(options) {\n return defaultParserErrorProvider.buildMismatchTokenMessage(options);\n }\n buildNotAllInputParsedMessage(options) {\n return defaultParserErrorProvider.buildNotAllInputParsedMessage(options);\n }\n buildNoViableAltMessage(options) {\n return defaultParserErrorProvider.buildNoViableAltMessage(options);\n }\n buildEarlyExitMessage(options) {\n return defaultParserErrorProvider.buildEarlyExitMessage(options);\n }\n}\nexport class LangiumParserErrorMessageProvider extends AbstractParserErrorMessageProvider {\n buildMismatchTokenMessage({ expected, actual }) {\n const expectedMsg = expected.LABEL\n ? '`' + expected.LABEL + '`'\n : expected.name.endsWith(':KW')\n ? `keyword '${expected.name.substring(0, expected.name.length - 3)}'`\n : `token of type '${expected.name}'`;\n return `Expecting ${expectedMsg} but found \\`${actual.image}\\`.`;\n }\n buildNotAllInputParsedMessage({ firstRedundant }) {\n return `Expecting end of file but found \\`${firstRedundant.image}\\`.`;\n }\n}\nexport class LangiumCompletionParser extends AbstractLangiumParser {\n constructor(services) {\n super(services, true);\n this.tokens = [];\n this.elementStack = [];\n this.lastElementStack = [];\n this.nextTokenIndex = 0;\n this.stackSize = 0;\n }\n action() {\n // NOOP\n }\n construct() {\n // NOOP\n return undefined;\n }\n parse(input) {\n this.resetState();\n const tokens = this.lexer.tokenize(input, { mode: 'partial' });\n this.tokens = tokens.tokens;\n this.wrapper.input = [...this.tokens];\n this.mainRule.call(this.wrapper, {});\n this.unorderedGroups.clear();\n return {\n tokens: this.tokens,\n elementStack: [...this.lastElementStack],\n tokenIndex: this.nextTokenIndex\n };\n }\n rule(rule, impl) {\n const ruleMethod = this.wrapper.DEFINE_RULE(withRuleSuffix(rule.name), this.startImplementation(impl).bind(this));\n this.allRules.set(rule.name, ruleMethod);\n if (rule.entry) {\n this.mainRule = ruleMethod;\n }\n return ruleMethod;\n }\n resetState() {\n this.elementStack = [];\n this.lastElementStack = [];\n this.nextTokenIndex = 0;\n this.stackSize = 0;\n }\n startImplementation(implementation) {\n return (args) => {\n const size = this.keepStackSize();\n try {\n implementation(args);\n }\n finally {\n this.resetStackSize(size);\n }\n };\n }\n removeUnexpectedElements() {\n this.elementStack.splice(this.stackSize);\n }\n keepStackSize() {\n const size = this.elementStack.length;\n this.stackSize = size;\n return size;\n }\n resetStackSize(size) {\n this.removeUnexpectedElements();\n this.stackSize = size;\n }\n consume(idx, tokenType, feature) {\n this.wrapper.wrapConsume(idx, tokenType);\n if (!this.isRecording()) {\n this.lastElementStack = [...this.elementStack, feature];\n this.nextTokenIndex = this.currIdx + 1;\n }\n }\n subrule(idx, rule, fragment, feature, args) {\n this.before(feature);\n this.wrapper.wrapSubrule(idx, rule, args);\n this.after(feature);\n }\n before(element) {\n if (!this.isRecording()) {\n this.elementStack.push(element);\n }\n }\n after(element) {\n if (!this.isRecording()) {\n const index = this.elementStack.lastIndexOf(element);\n if (index >= 0) {\n this.elementStack.splice(index);\n }\n }\n }\n get currIdx() {\n return this.wrapper.currIdx;\n }\n}\nconst defaultConfig = {\n recoveryEnabled: true,\n nodeLocationTracking: 'full',\n skipValidations: true,\n errorMessageProvider: new LangiumParserErrorMessageProvider()\n};\n/**\n * This class wraps the embedded actions parser of chevrotain and exposes protected methods.\n * This way, we can build the `LangiumParser` as a composition.\n */\nclass ChevrotainWrapper extends EmbeddedActionsParser {\n constructor(tokens, config, incomplete) {\n const useDefaultLookahead = config && 'maxLookahead' in config;\n super(tokens, {\n ...defaultConfig,\n lookaheadStrategy: useDefaultLookahead\n ? new LLkLookaheadStrategy({ maxLookahead: config.maxLookahead })\n : new LLStarLookaheadStrategy({\n // If validations are skipped, don't log the lookahead warnings\n logging: config.skipValidations ? () => { } : undefined,\n incomplete,\n }),\n ...config,\n });\n }\n get IS_RECORDING() {\n return this.RECORDING_PHASE;\n }\n DEFINE_RULE(name, impl, config) {\n return this.RULE(name, impl, config);\n }\n wrapSelfAnalysis() {\n this.performSelfAnalysis();\n }\n wrapConsume(idx, tokenType) {\n return this.consume(idx, tokenType, undefined);\n }\n wrapSubrule(idx, rule, args) {\n return this.subrule(idx, rule, {\n ARGS: [args]\n });\n }\n wrapOr(idx, choices) {\n this.or(idx, choices);\n }\n wrapOption(idx, callback) {\n this.option(idx, callback);\n }\n wrapMany(idx, callback) {\n this.many(idx, callback);\n }\n wrapAtLeastOne(idx, callback) {\n this.atLeastOne(idx, callback);\n }\n rule(rule) {\n return rule.call(this, {});\n }\n}\nclass ProfilerWrapper extends ChevrotainWrapper {\n constructor(tokens, config, incomplete, task) {\n super(tokens, config, incomplete);\n this.task = task;\n }\n rule(rule) {\n this.task.start();\n this.task.startSubTask(this.ruleName(rule));\n try {\n return super.rule(rule);\n }\n finally {\n this.task.stopSubTask(this.ruleName(rule));\n this.task.stop();\n }\n }\n ruleName(rule) {\n return rule.ruleName;\n }\n subrule(idx, ruleToCall, options) {\n this.task.startSubTask(this.ruleName(ruleToCall));\n try {\n return super.subrule(idx, ruleToCall, options);\n }\n finally {\n this.task.stopSubTask(this.ruleName(ruleToCall));\n }\n }\n}\n//# sourceMappingURL=langium-parser.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;AAaA,IAAa,IAAiB,OAAO,WAAW;AAChD,SAAS,EAAe,GAAM;CAC1B,OAAO,EAAK,UAAU;;AAE1B,IAAM,IAAa,KACb,KAAkB,MAAS,EAAK,SAAS,EAAW,GAAG,IAAO,IAAO,GAC9D,IAAb,MAAmC;CAC/B,YAAY,GAAU,GAAY;EAG9B,AAFA,KAAK,mCAAmB,IAAI,KAAK,EACjC,KAAK,2BAAW,IAAI,KAAK,EACzB,KAAK,QAAQ,EAAS,OAAO;EAC7B,IAAM,IAAS,KAAK,MAAM,YACpB,IAAa,EAAS,iBAAiB,SAAS;EACtD,AAAI,EAAS,OAAO,UAAU,iBAAiB,SAAS,UAAU,GAC9D,KAAK,UAAU,IAAI,EAAgB,GAAQ;GACvC,GAAG,EAAS,OAAO;GACnB,iBAAiB;GACjB,sBAAsB,EAAS,OAAO;GACzC,EAAE,GAAY,EAAS,OAAO,UAAU,gBAAgB,WAAW,WAAW,EAAS,iBAAiB,WAAW,CAAC,GAGrH,KAAK,UAAU,IAAI,EAAkB,GAAQ;GACzC,GAAG,EAAS,OAAO;GACnB,iBAAiB;GACjB,sBAAsB,EAAS,OAAO;GACzC,EAAE,EAAW;;CAGtB,aAAa,GAAK,GAAS;EACvB,KAAK,QAAQ,OAAO,GAAK,EAAQ;;CAErC,SAAS,GAAK,GAAU;EACpB,KAAK,QAAQ,WAAW,GAAK,EAAS;;CAE1C,KAAK,GAAK,GAAU;EAChB,KAAK,QAAQ,SAAS,GAAK,EAAS;;CAExC,WAAW,GAAK,GAAU;EACtB,KAAK,QAAQ,eAAe,GAAK,EAAS;;CAE9C,QAAQ,GAAM;EACV,O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;YAE1C;GACJ,KAAK,KAAK,YAAY,KAAK,SAAS,EAAW,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { defaultLexerErrorProvider as e } from "../../../chevrotain/lib/src/scan/lexer_errors_public.js";
|
|
2
|
-
import { Lexer as t } from "../../../chevrotain/lib/src/scan/lexer_public.js";
|
|
3
|
-
import "../../../chevrotain/lib/src/api.js";
|
|
4
|
-
//#region ../../node_modules/langium/lib/parser/lexer.js
|
|
5
|
-
var n = class {
|
|
6
|
-
buildUnexpectedCharactersMessage(t, n, r, i, a) {
|
|
7
|
-
return e.buildUnexpectedCharactersMessage(t, n, r, i, a);
|
|
8
|
-
}
|
|
9
|
-
buildUnableToPopLexerModeMessage(t) {
|
|
10
|
-
return e.buildUnableToPopLexerModeMessage(t);
|
|
11
|
-
}
|
|
12
|
-
}, r = { mode: "full" }, i = class {
|
|
13
|
-
constructor(e) {
|
|
14
|
-
this.errorMessageProvider = e.parser.LexerErrorMessageProvider, this.tokenBuilder = e.parser.TokenBuilder;
|
|
15
|
-
let n = this.tokenBuilder.buildTokens(e.Grammar, { caseInsensitive: e.LanguageMetaData.caseInsensitive });
|
|
16
|
-
this.tokenTypes = this.toTokenTypeDictionary(n);
|
|
17
|
-
let r = s(n) ? Object.values(n) : n, i = e.LanguageMetaData.mode === "production";
|
|
18
|
-
this.chevrotainLexer = new t(r, {
|
|
19
|
-
positionTracking: "full",
|
|
20
|
-
skipValidations: i,
|
|
21
|
-
errorMessageProvider: this.errorMessageProvider
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
get definition() {
|
|
25
|
-
return this.tokenTypes;
|
|
26
|
-
}
|
|
27
|
-
tokenize(e, t = r) {
|
|
28
|
-
let n = this.chevrotainLexer.tokenize(e);
|
|
29
|
-
return {
|
|
30
|
-
tokens: n.tokens,
|
|
31
|
-
errors: n.errors,
|
|
32
|
-
hidden: n.groups.hidden ?? [],
|
|
33
|
-
report: this.tokenBuilder.flushLexingReport?.(e)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
toTokenTypeDictionary(e) {
|
|
37
|
-
if (s(e)) return e;
|
|
38
|
-
let t = o(e) ? Object.values(e.modes).flat() : e, n = {};
|
|
39
|
-
return t.forEach((e) => n[e.name] = e), n;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
function a(e) {
|
|
43
|
-
return Array.isArray(e) && (e.length === 0 || "name" in e[0]);
|
|
44
|
-
}
|
|
45
|
-
function o(e) {
|
|
46
|
-
return e && "modes" in e && "defaultMode" in e;
|
|
47
|
-
}
|
|
48
|
-
function s(e) {
|
|
49
|
-
return !a(e) && !o(e);
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { i as DefaultLexer, n as DefaultLexerErrorMessageProvider };
|
|
53
|
-
|
|
54
|
-
//# sourceMappingURL=lexer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lexer.js","names":["ChevrotainLexer"],"sources":["../../../../../../../../node_modules/langium/lib/parser/lexer.js"],"sourcesContent":["/******************************************************************************\n * Copyright 2022 TypeFox GmbH\n * This program and the accompanying materials are made available under the\n * terms of the MIT License, which is available in the project root.\n ******************************************************************************/\nimport { Lexer as ChevrotainLexer, defaultLexerErrorProvider } from 'chevrotain';\nexport class DefaultLexerErrorMessageProvider {\n buildUnexpectedCharactersMessage(fullText, startOffset, length, line, column) {\n return defaultLexerErrorProvider.buildUnexpectedCharactersMessage(fullText, startOffset, length, line, column);\n }\n buildUnableToPopLexerModeMessage(token) {\n return defaultLexerErrorProvider.buildUnableToPopLexerModeMessage(token);\n }\n}\nexport const DEFAULT_TOKENIZE_OPTIONS = { mode: 'full' };\nexport class DefaultLexer {\n constructor(services) {\n this.errorMessageProvider = services.parser.LexerErrorMessageProvider;\n this.tokenBuilder = services.parser.TokenBuilder;\n const tokens = this.tokenBuilder.buildTokens(services.Grammar, {\n caseInsensitive: services.LanguageMetaData.caseInsensitive\n });\n this.tokenTypes = this.toTokenTypeDictionary(tokens);\n const lexerTokens = isTokenTypeDictionary(tokens) ? Object.values(tokens) : tokens;\n const production = services.LanguageMetaData.mode === 'production';\n this.chevrotainLexer = new ChevrotainLexer(lexerTokens, {\n positionTracking: 'full',\n skipValidations: production,\n errorMessageProvider: this.errorMessageProvider\n });\n }\n get definition() {\n return this.tokenTypes;\n }\n tokenize(text, _options = DEFAULT_TOKENIZE_OPTIONS) {\n const chevrotainResult = this.chevrotainLexer.tokenize(text);\n return {\n tokens: chevrotainResult.tokens,\n errors: chevrotainResult.errors,\n hidden: chevrotainResult.groups.hidden ?? [],\n report: this.tokenBuilder.flushLexingReport?.(text)\n };\n }\n toTokenTypeDictionary(buildTokens) {\n if (isTokenTypeDictionary(buildTokens))\n return buildTokens;\n const tokens = isIMultiModeLexerDefinition(buildTokens) ? Object.values(buildTokens.modes).flat() : buildTokens;\n const res = {};\n tokens.forEach(token => res[token.name] = token);\n return res;\n }\n}\n/**\n * Returns a check whether the given TokenVocabulary is TokenType array\n */\nexport function isTokenTypeArray(tokenVocabulary) {\n return Array.isArray(tokenVocabulary) && (tokenVocabulary.length === 0 || 'name' in tokenVocabulary[0]);\n}\n/**\n * Returns a check whether the given TokenVocabulary is IMultiModeLexerDefinition\n */\nexport function isIMultiModeLexerDefinition(tokenVocabulary) {\n return tokenVocabulary && 'modes' in tokenVocabulary && 'defaultMode' in tokenVocabulary;\n}\n/**\n * Returns a check whether the given TokenVocabulary is TokenTypeDictionary\n */\nexport function isTokenTypeDictionary(tokenVocabulary) {\n return !isTokenTypeArray(tokenVocabulary) && !isIMultiModeLexerDefinition(tokenVocabulary);\n}\n//# sourceMappingURL=lexer.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AAMA,IAAa,IAAb,MAA8C;CAC1C,iCAAiC,GAAU,GAAa,GAAQ,GAAM,GAAQ;EAC1E,OAAO,EAA0B,iCAAiC,GAAU,GAAa,GAAQ,GAAM,EAAO;;CAElH,iCAAiC,GAAO;EACpC,OAAO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