@plumile/ui 0.1.112 → 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.
Files changed (427) hide show
  1. package/lib/esm/_virtual/_rolldown/runtime.js +5 -5
  2. package/lib/esm/atomic/molecules/markdown/components/MarkdownArticleContainer.css.js +0 -1
  3. package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +1 -0
  4. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7EHR7CIX.js +3 -0
  5. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js +37 -0
  6. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js.map +1 -0
  7. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js +25 -0
  8. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js.map +1 -0
  9. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-LIHQZDEY.js → chunk-BR22UD5L.js} +18 -21
  10. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js.map +1 -0
  11. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js +25 -0
  12. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js.map +1 -0
  13. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js +25 -0
  14. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js.map +1 -0
  15. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +32 -0
  16. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js.map +1 -0
  17. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +56 -0
  18. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js.map +1 -0
  19. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20648 -0
  20. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js.map +1 -0
  21. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +25 -0
  22. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js.map +1 -0
  23. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js +25 -0
  24. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js.map +1 -0
  25. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +33 -0
  26. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js.map +1 -0
  27. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
  28. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-WXDBUCRP.js +3 -0
  29. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
  30. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
  31. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
  32. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
  33. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-BLDUP644.js +3 -0
  34. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
  35. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
  36. package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
  37. package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js.map +1 -1
  38. package/lib/esm/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +8 -8
  39. package/lib/esm/node_modules/dagre-d3-es/src/dagre/layout.js +105 -105
  40. package/lib/esm/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +12 -12
  41. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +8 -8
  42. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/index.js +12 -12
  43. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/init-order.js +6 -6
  44. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +7 -7
  45. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +9 -9
  46. package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort.js +7 -7
  47. package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/bk.js +53 -53
  48. package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/index.js +5 -5
  49. package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +26 -26
  50. package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/util.js +9 -9
  51. package/lib/esm/node_modules/dagre-d3-es/src/dagre/util.js +54 -54
  52. package/lib/esm/node_modules/dagre-d3-es/src/graphlib/graph.js +45 -45
  53. package/lib/esm/node_modules/dagre-d3-es/src/graphlib/json.js +18 -18
  54. package/lib/esm/node_modules/lodash-es/_arrayLikeKeys.js +8 -8
  55. package/lib/esm/node_modules/lodash-es/_baseAssign.js +3 -3
  56. package/lib/esm/node_modules/lodash-es/_baseClone.js +24 -24
  57. package/lib/esm/node_modules/lodash-es/_baseForOwn.js +3 -3
  58. package/lib/esm/node_modules/lodash-es/_baseGetAllKeys.js +3 -3
  59. package/lib/esm/node_modules/lodash-es/_baseIsEqualDeep.js +12 -12
  60. package/lib/esm/node_modules/lodash-es/_baseIteratee.js +4 -4
  61. package/lib/esm/node_modules/lodash-es/_baseMatchesProperty.js +9 -9
  62. package/lib/esm/node_modules/lodash-es/_baseMerge.js +6 -6
  63. package/lib/esm/node_modules/lodash-es/_baseMergeDeep.js +15 -15
  64. package/lib/esm/node_modules/lodash-es/_baseOrderBy.js +14 -14
  65. package/lib/esm/node_modules/lodash-es/_baseSet.js +8 -8
  66. package/lib/esm/node_modules/lodash-es/_baseSetToString.js +5 -5
  67. package/lib/esm/node_modules/lodash-es/_baseToString.js +11 -11
  68. package/lib/esm/node_modules/lodash-es/_baseUniq.js +7 -7
  69. package/lib/esm/node_modules/lodash-es/_copySymbols.js +3 -3
  70. package/lib/esm/node_modules/lodash-es/_createSet.js +6 -6
  71. package/lib/esm/node_modules/lodash-es/_equalByTag.js +18 -18
  72. package/lib/esm/node_modules/lodash-es/_flatRest.js +4 -4
  73. package/lib/esm/node_modules/lodash-es/_getAllKeys.js +3 -3
  74. package/lib/esm/node_modules/lodash-es/_getAllKeysIn.js +4 -4
  75. package/lib/esm/node_modules/lodash-es/_getSymbolsIn.js +3 -3
  76. package/lib/esm/node_modules/lodash-es/_hasPath.js +5 -5
  77. package/lib/esm/node_modules/lodash-es/_initCloneObject.js +4 -4
  78. package/lib/esm/node_modules/lodash-es/_isFlattenable.js +3 -3
  79. package/lib/esm/node_modules/lodash-es/_isIterateeCall.js +6 -6
  80. package/lib/esm/node_modules/lodash-es/_mapCacheClear.js +6 -6
  81. package/lib/esm/node_modules/lodash-es/findIndex.js +4 -4
  82. package/lib/esm/node_modules/lodash-es/forEach.js +3 -3
  83. package/lib/esm/node_modules/lodash-es/forIn.js +3 -3
  84. package/lib/esm/node_modules/lodash-es/isEmpty.js +8 -8
  85. package/lib/esm/node_modules/lodash-es/isPlainObject.js +4 -4
  86. package/lib/esm/node_modules/lodash-es/isString.js +3 -3
  87. package/lib/esm/node_modules/lodash-es/keys.js +4 -4
  88. package/lib/esm/node_modules/lodash-es/keysIn.js +3 -3
  89. package/lib/esm/node_modules/lodash-es/map.js +3 -3
  90. package/lib/esm/node_modules/lodash-es/mapValues.js +5 -5
  91. package/lib/esm/node_modules/lodash-es/max.js +3 -3
  92. package/lib/esm/node_modules/lodash-es/min.js +3 -3
  93. package/lib/esm/node_modules/lodash-es/minBy.js +3 -3
  94. package/lib/esm/node_modules/lodash-es/reduce.js +5 -5
  95. package/lib/esm/node_modules/lodash-es/size.js +4 -4
  96. package/lib/esm/node_modules/lodash-es/sortBy.js +6 -6
  97. package/lib/esm/node_modules/lodash-es/union.js +6 -6
  98. package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +146 -146
  99. package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js.map +1 -1
  100. package/lib/esm/node_modules/mermaid/dist/mermaid.core.js +374 -374
  101. package/lib/esm/node_modules/mermaid/dist/mermaid.core.js.map +1 -1
  102. package/package.json +6 -6
  103. package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -27
  104. package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js.map +0 -1
  105. package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js +0 -155
  106. package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js.map +0 -1
  107. package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -45
  108. package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js.map +0 -1
  109. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
  110. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -89
  111. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map +0 -1
  112. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -39
  113. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map +0 -1
  114. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -600
  115. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map +0 -1
  116. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -29
  117. package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map +0 -1
  118. package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js +0 -13
  119. package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js.map +0 -1
  120. package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js +0 -12
  121. package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js.map +0 -1
  122. package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -14
  123. package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map +0 -1
  124. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +0 -3
  125. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +0 -28
  126. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js.map +0 -1
  127. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +0 -28
  128. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js.map +0 -1
  129. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +0 -40
  130. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js.map +0 -1
  131. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -35
  132. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js.map +0 -1
  133. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -28
  134. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js.map +0 -1
  135. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +0 -28
  136. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js.map +0 -1
  137. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1210
  138. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js.map +0 -1
  139. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +0 -28
  140. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js.map +0 -1
  141. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js.map +0 -1
  142. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -36
  143. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js.map +0 -1
  144. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +0 -3
  145. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
  146. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
  147. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
  148. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
  149. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +0 -3
  150. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
  151. package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
  152. package/lib/esm/node_modules/chevrotain/lib/src/api.js +0 -10
  153. package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -14
  154. package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js.map +0 -1
  155. package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js +0 -6
  156. package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js.map +0 -1
  157. package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -17
  158. package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js.map +0 -1
  159. package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -53
  160. package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js.map +0 -1
  161. package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -81
  162. package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js.map +0 -1
  163. package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -37
  164. package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js.map +0 -1
  165. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -279
  166. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js.map +0 -1
  167. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -27
  168. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js.map +0 -1
  169. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -32
  170. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js.map +0 -1
  171. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -18
  172. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js.map +0 -1
  173. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -269
  174. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js.map +0 -1
  175. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -8
  176. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js.map +0 -1
  177. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -45
  178. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js.map +0 -1
  179. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -245
  180. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js.map +0 -1
  181. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -34
  182. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js.map +0 -1
  183. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -60
  184. package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js.map +0 -1
  185. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -118
  186. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js.map +0 -1
  187. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -50
  188. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js.map +0 -1
  189. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -170
  190. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js.map +0 -1
  191. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -47
  192. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js.map +0 -1
  193. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -111
  194. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js.map +0 -1
  195. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -25
  196. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js.map +0 -1
  197. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -316
  198. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js.map +0 -1
  199. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -291
  200. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js.map +0 -1
  201. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -147
  202. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js.map +0 -1
  203. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -96
  204. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js.map +0 -1
  205. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -15
  206. package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js.map +0 -1
  207. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js +0 -439
  208. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js.map +0 -1
  209. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -13
  210. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js.map +0 -1
  211. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -257
  212. package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js.map +0 -1
  213. package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -157
  214. package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js.map +0 -1
  215. package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -19
  216. package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js.map +0 -1
  217. package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js +0 -68
  218. package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js.map +0 -1
  219. package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -43
  220. package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js.map +0 -1
  221. package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -365
  222. package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map +0 -1
  223. package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js +0 -197
  224. package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js.map +0 -1
  225. package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js +0 -35
  226. package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js.map +0 -1
  227. package/lib/esm/node_modules/chevrotain-allstar/lib/index.js +0 -1
  228. package/lib/esm/node_modules/langium/lib/default-module.js +0 -89
  229. package/lib/esm/node_modules/langium/lib/default-module.js.map +0 -1
  230. package/lib/esm/node_modules/langium/lib/dependency-injection.js +0 -62
  231. package/lib/esm/node_modules/langium/lib/dependency-injection.js.map +0 -1
  232. package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js +0 -15
  233. package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js.map +0 -1
  234. package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js +0 -40
  235. package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js.map +0 -1
  236. package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js +0 -307
  237. package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js.map +0 -1
  238. package/lib/esm/node_modules/langium/lib/languages/generated/ast.js +0 -900
  239. package/lib/esm/node_modules/langium/lib/languages/generated/ast.js.map +0 -1
  240. package/lib/esm/node_modules/langium/lib/languages/grammar-config.js +0 -17
  241. package/lib/esm/node_modules/langium/lib/languages/grammar-config.js.map +0 -1
  242. package/lib/esm/node_modules/langium/lib/parser/async-parser.js +0 -13
  243. package/lib/esm/node_modules/langium/lib/parser/async-parser.js.map +0 -1
  244. package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js +0 -11
  245. package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js.map +0 -1
  246. package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js +0 -164
  247. package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js.map +0 -1
  248. package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js +0 -15
  249. package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js.map +0 -1
  250. package/lib/esm/node_modules/langium/lib/parser/langium-parser.js +0 -397
  251. package/lib/esm/node_modules/langium/lib/parser/langium-parser.js.map +0 -1
  252. package/lib/esm/node_modules/langium/lib/parser/lexer.js +0 -54
  253. package/lib/esm/node_modules/langium/lib/parser/lexer.js.map +0 -1
  254. package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js +0 -278
  255. package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js.map +0 -1
  256. package/lib/esm/node_modules/langium/lib/parser/token-builder.js +0 -65
  257. package/lib/esm/node_modules/langium/lib/parser/token-builder.js.map +0 -1
  258. package/lib/esm/node_modules/langium/lib/parser/value-converter.js +0 -82
  259. package/lib/esm/node_modules/langium/lib/parser/value-converter.js.map +0 -1
  260. package/lib/esm/node_modules/langium/lib/references/linker.js +0 -195
  261. package/lib/esm/node_modules/langium/lib/references/linker.js.map +0 -1
  262. package/lib/esm/node_modules/langium/lib/references/name-provider.js +0 -17
  263. package/lib/esm/node_modules/langium/lib/references/name-provider.js.map +0 -1
  264. package/lib/esm/node_modules/langium/lib/references/references.js +0 -80
  265. package/lib/esm/node_modules/langium/lib/references/references.js.map +0 -1
  266. package/lib/esm/node_modules/langium/lib/references/scope-computation.js +0 -39
  267. package/lib/esm/node_modules/langium/lib/references/scope-computation.js.map +0 -1
  268. package/lib/esm/node_modules/langium/lib/references/scope-provider.js +0 -38
  269. package/lib/esm/node_modules/langium/lib/references/scope-provider.js.map +0 -1
  270. package/lib/esm/node_modules/langium/lib/references/scope.js +0 -46
  271. package/lib/esm/node_modules/langium/lib/references/scope.js.map +0 -1
  272. package/lib/esm/node_modules/langium/lib/serializer/hydrator.js +0 -129
  273. package/lib/esm/node_modules/langium/lib/serializer/hydrator.js.map +0 -1
  274. package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js +0 -149
  275. package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js.map +0 -1
  276. package/lib/esm/node_modules/langium/lib/service-registry.js +0 -41
  277. package/lib/esm/node_modules/langium/lib/service-registry.js.map +0 -1
  278. package/lib/esm/node_modules/langium/lib/syntax-tree.js +0 -74
  279. package/lib/esm/node_modules/langium/lib/syntax-tree.js.map +0 -1
  280. package/lib/esm/node_modules/langium/lib/utils/ast-utils.js +0 -124
  281. package/lib/esm/node_modules/langium/lib/utils/ast-utils.js.map +0 -1
  282. package/lib/esm/node_modules/langium/lib/utils/caching.js +0 -84
  283. package/lib/esm/node_modules/langium/lib/utils/caching.js.map +0 -1
  284. package/lib/esm/node_modules/langium/lib/utils/cancellation.js +0 -9
  285. package/lib/esm/node_modules/langium/lib/utils/cancellation.js.map +0 -1
  286. package/lib/esm/node_modules/langium/lib/utils/collections.js +0 -89
  287. package/lib/esm/node_modules/langium/lib/utils/collections.js.map +0 -1
  288. package/lib/esm/node_modules/langium/lib/utils/cst-utils.js +0 -77
  289. package/lib/esm/node_modules/langium/lib/utils/cst-utils.js.map +0 -1
  290. package/lib/esm/node_modules/langium/lib/utils/disposable.js +0 -12
  291. package/lib/esm/node_modules/langium/lib/utils/disposable.js.map +0 -1
  292. package/lib/esm/node_modules/langium/lib/utils/errors.js +0 -13
  293. package/lib/esm/node_modules/langium/lib/utils/errors.js.map +0 -1
  294. package/lib/esm/node_modules/langium/lib/utils/event.js +0 -9
  295. package/lib/esm/node_modules/langium/lib/utils/event.js.map +0 -1
  296. package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js +0 -26
  297. package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js.map +0 -1
  298. package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js +0 -221
  299. package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js.map +0 -1
  300. package/lib/esm/node_modules/langium/lib/utils/promise-utils.js +0 -31
  301. package/lib/esm/node_modules/langium/lib/utils/promise-utils.js.map +0 -1
  302. package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js +0 -146
  303. package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js.map +0 -1
  304. package/lib/esm/node_modules/langium/lib/utils/stream.js +0 -331
  305. package/lib/esm/node_modules/langium/lib/utils/stream.js.map +0 -1
  306. package/lib/esm/node_modules/langium/lib/utils/uri-utils.js +0 -111
  307. package/lib/esm/node_modules/langium/lib/utils/uri-utils.js.map +0 -1
  308. package/lib/esm/node_modules/langium/lib/validation/document-validator.js +0 -213
  309. package/lib/esm/node_modules/langium/lib/validation/document-validator.js.map +0 -1
  310. package/lib/esm/node_modules/langium/lib/validation/validation-registry.js +0 -90
  311. package/lib/esm/node_modules/langium/lib/validation/validation-registry.js.map +0 -1
  312. package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js +0 -61
  313. package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js.map +0 -1
  314. package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js +0 -32
  315. package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js.map +0 -1
  316. package/lib/esm/node_modules/langium/lib/workspace/configuration.js +0 -55
  317. package/lib/esm/node_modules/langium/lib/workspace/configuration.js.map +0 -1
  318. package/lib/esm/node_modules/langium/lib/workspace/document-builder.js +0 -200
  319. package/lib/esm/node_modules/langium/lib/workspace/document-builder.js.map +0 -1
  320. package/lib/esm/node_modules/langium/lib/workspace/documents.js +0 -146
  321. package/lib/esm/node_modules/langium/lib/workspace/documents.js.map +0 -1
  322. package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js +0 -37
  323. package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js.map +0 -1
  324. package/lib/esm/node_modules/langium/lib/workspace/index-manager.js +0 -53
  325. package/lib/esm/node_modules/langium/lib/workspace/index-manager.js.map +0 -1
  326. package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js +0 -46
  327. package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js.map +0 -1
  328. package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js +0 -70
  329. package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js.map +0 -1
  330. package/lib/esm/node_modules/lodash-es/flatMap.js +0 -10
  331. package/lib/esm/node_modules/lodash-es/flatMap.js.map +0 -1
  332. package/lib/esm/node_modules/lodash-es/uniqBy.js +0 -10
  333. package/lib/esm/node_modules/lodash-es/uniqBy.js.map +0 -1
  334. package/lib/esm/node_modules/vscode-jsonrpc/browser.js +0 -11
  335. package/lib/esm/node_modules/vscode-jsonrpc/browser.js.map +0 -1
  336. package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -56
  337. package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/main.js.map +0 -1
  338. package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -124
  339. package/lib/esm/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +0 -1
  340. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/api.js +0 -341
  341. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/api.js.map +0 -1
  342. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
  343. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
  344. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -651
  345. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/connection.js.map +0 -1
  346. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -17
  347. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +0 -1
  348. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
  349. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
  350. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
  351. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
  352. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -239
  353. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +0 -1
  354. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -97
  355. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +0 -1
  356. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -133
  357. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +0 -1
  358. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -89
  359. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +0 -1
  360. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -165
  361. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/messages.js.map +0 -1
  362. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
  363. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
  364. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -48
  365. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +0 -1
  366. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -62
  367. package/lib/esm/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +0 -1
  368. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -32
  369. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js.map +0 -1
  370. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -40
  371. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js.map +0 -1
  372. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -16
  373. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js.map +0 -1
  374. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -35
  375. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js.map +0 -1
  376. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -23
  377. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js.map +0 -1
  378. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -19
  379. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js.map +0 -1
  380. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -15
  381. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js.map +0 -1
  382. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -15
  383. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js.map +0 -1
  384. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -37
  385. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js.map +0 -1
  386. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -39
  387. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js.map +0 -1
  388. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -19
  389. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js.map +0 -1
  390. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -15
  391. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js.map +0 -1
  392. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -23
  393. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js.map +0 -1
  394. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -15
  395. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js.map +0 -1
  396. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -19
  397. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js.map +0 -1
  398. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -678
  399. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js.map +0 -1
  400. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -15
  401. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js.map +0 -1
  402. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -23
  403. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js.map +0 -1
  404. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -130
  405. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js.map +0 -1
  406. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -28
  407. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js.map +0 -1
  408. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -15
  409. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js.map +0 -1
  410. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -35
  411. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js.map +0 -1
  412. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -15
  413. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js.map +0 -1
  414. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -15
  415. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js.map +0 -1
  416. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -23
  417. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js.map +0 -1
  418. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -19
  419. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js.map +0 -1
  420. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
  421. package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js.map +0 -1
  422. package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -142
  423. package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js.map +0 -1
  424. package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1088
  425. package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js.map +0 -1
  426. package/lib/esm/node_modules/vscode-uri/lib/esm/index.js +0 -377
  427. package/lib/esm/node_modules/vscode-uri/lib/esm/index.js.map +0 -1
@@ -1,278 +0,0 @@
1
- import { stream as e } from "../utils/stream.js";
2
- import { isAbstractParserRule as t, isAction as n, isAlternatives as r, isAssignment as i, isBooleanLiteral as a, isConjunction as o, isCrossReference as s, isDisjunction as c, isEndOfFile as l, isGroup as u, isInfixRule as d, isKeyword as f, isNegation as p, isParameterReference as m, isParserRule as h, isRuleCall as g, isTerminalRule as _, isUnorderedGroup as v } from "../languages/generated/ast.js";
3
- import { ErrorWithLocation as y, assertUnreachable as b } from "../utils/errors.js";
4
- import { findNameAssignment as x, getAllReachableRules as S, getTypeName as C } from "../utils/grammar-utils.js";
5
- import { EOF as w } from "../../../chevrotain/lib/src/scan/tokens_public.js";
6
- import { EMPTY_ALT as T } from "../../../chevrotain/lib/src/parse/parser/parser.js";
7
- import "../../../chevrotain/lib/src/api.js";
8
- //#region ../../node_modules/langium/lib/parser/parser-builder-base.js
9
- function E(e, t, n) {
10
- return D({
11
- parser: t,
12
- tokens: n,
13
- ruleNames: /* @__PURE__ */ new Map()
14
- }, e), t;
15
- }
16
- function D(t, n) {
17
- let r = S(n, !1), i = e(n.rules).filter(h).filter((e) => r.has(e));
18
- for (let e of i) {
19
- let n = {
20
- ...t,
21
- consume: 1,
22
- optional: 1,
23
- subrule: 1,
24
- many: 1,
25
- or: 1
26
- };
27
- t.parser.rule(e, k(n, e.definition));
28
- }
29
- let a = e(n.rules).filter(d).filter((e) => r.has(e));
30
- for (let e of a) t.parser.rule(e, O(t, e));
31
- }
32
- function O(e, t) {
33
- let n = t.call.rule.ref;
34
- if (!n) throw Error("Could not resolve reference to infix operator rule: " + t.call.rule.$refText);
35
- if (_(n)) throw Error("Cannot use terminal rule in infix expression");
36
- let r = t.operators.precedences.flatMap((e) => e.operators), i = {
37
- $type: "Group",
38
- elements: []
39
- }, a = {
40
- $container: i,
41
- $type: "Assignment",
42
- feature: "parts",
43
- operator: "+=",
44
- terminal: t.call
45
- }, o = {
46
- $container: i,
47
- $type: "Group",
48
- elements: [],
49
- cardinality: "*"
50
- };
51
- i.elements.push(a, o);
52
- let s = {
53
- $container: o,
54
- $type: "Assignment",
55
- feature: "operators",
56
- operator: "+=",
57
- terminal: {
58
- $type: "Alternatives",
59
- elements: r
60
- }
61
- }, c = {
62
- ...a,
63
- $container: o
64
- };
65
- o.elements.push(s, c);
66
- let l = r.map((t) => e.tokens[t.value]).map((t, n) => ({ ALT: () => e.parser.consume(n, t, s) })), u;
67
- return (t) => {
68
- u ??= V(e, n), e.parser.subrule(0, u, !1, a, t), e.parser.many(0, { DEF: () => {
69
- e.parser.alternatives(0, l), e.parser.subrule(1, u, !1, c, t);
70
- } });
71
- };
72
- }
73
- function k(e, t, a = !1) {
74
- let o;
75
- if (f(t)) o = z(e, t);
76
- else if (n(t)) o = A(e, t);
77
- else if (i(t)) o = k(e, t.terminal);
78
- else if (s(t)) o = R(e, t);
79
- else if (g(t)) o = j(e, t);
80
- else if (r(t)) o = P(e, t);
81
- else if (v(t)) o = F(e, t);
82
- else if (u(t)) o = I(e, t);
83
- else if (l(t)) {
84
- let n = e.consume++;
85
- o = () => e.parser.consume(n, w, t);
86
- } else throw new y(t.$cstNode, `Unexpected element type: ${t.$type}`);
87
- return B(e, a ? void 0 : L(t), o, t.cardinality);
88
- }
89
- function A(e, t) {
90
- let n = C(t);
91
- return () => e.parser.action(n, t);
92
- }
93
- function j(e, n) {
94
- let r = n.rule.ref;
95
- if (t(r)) {
96
- let t = e.subrule++, i = h(r) && r.fragment, a = n.arguments.length > 0 ? M(r, n.arguments) : () => ({}), o;
97
- return (s) => {
98
- o ??= V(e, r), e.parser.subrule(t, o, i, n, a(s));
99
- };
100
- } else if (_(r)) {
101
- let t = e.consume++, i = U(e, r.name);
102
- return () => e.parser.consume(t, i, n);
103
- } else if (r) b(r);
104
- else throw new y(n.$cstNode, `Undefined rule: ${n.rule.$refText}`);
105
- }
106
- function M(e, t) {
107
- if (t.some((e) => e.calledByName)) {
108
- let e = t.map((e) => ({
109
- parameterName: e.parameter?.ref?.name,
110
- predicate: N(e.value)
111
- }));
112
- return (t) => {
113
- let n = {};
114
- for (let { parameterName: r, predicate: i } of e) r && (n[r] = i(t));
115
- return n;
116
- };
117
- } else {
118
- let n = t.map((e) => N(e.value));
119
- return (t) => {
120
- let r = {};
121
- for (let i = 0; i < n.length; i++) if (i < e.parameters.length) {
122
- let a = e.parameters[i].name, o = n[i];
123
- r[a] = o(t);
124
- }
125
- return r;
126
- };
127
- }
128
- }
129
- function N(e) {
130
- if (c(e)) {
131
- let t = N(e.left), n = N(e.right);
132
- return (e) => t(e) || n(e);
133
- } else if (o(e)) {
134
- let t = N(e.left), n = N(e.right);
135
- return (e) => t(e) && n(e);
136
- } else if (p(e)) {
137
- let t = N(e.value);
138
- return (e) => !t(e);
139
- } else if (m(e)) {
140
- let t = e.parameter.ref.name;
141
- return (e) => e !== void 0 && e[t] === !0;
142
- } else if (a(e)) {
143
- let t = !!e.true;
144
- return () => t;
145
- }
146
- b(e);
147
- }
148
- function P(e, t) {
149
- if (t.elements.length === 1) return k(e, t.elements[0]);
150
- {
151
- let n = [];
152
- for (let r of t.elements) {
153
- let t = { ALT: k(e, r, !0) }, i = L(r);
154
- i && (t.GATE = N(i)), n.push(t);
155
- }
156
- let r = e.or++;
157
- return (t) => e.parser.alternatives(r, n.map((e) => {
158
- let n = { ALT: () => e.ALT(t) }, r = e.GATE;
159
- return r && (n.GATE = () => r(t)), n;
160
- }));
161
- }
162
- }
163
- function F(e, t) {
164
- if (t.elements.length === 1) return k(e, t.elements[0]);
165
- let n = [];
166
- for (let r of t.elements) {
167
- let t = { ALT: k(e, r, !0) }, i = L(r);
168
- i && (t.GATE = N(i)), n.push(t);
169
- }
170
- let r = e.or++, i = (e, t) => `uGroup_${e}_${t.getRuleStack().join("-")}`, a = B(e, L(t), (t) => e.parser.alternatives(r, n.map((n, a) => {
171
- let o = { ALT: () => !0 }, s = e.parser;
172
- o.ALT = () => {
173
- if (n.ALT(t), !s.isRecording()) {
174
- let e = i(r, s);
175
- s.unorderedGroups.get(e) || s.unorderedGroups.set(e, []);
176
- let t = s.unorderedGroups.get(e);
177
- t?.[a] === void 0 && (t[a] = !0);
178
- }
179
- };
180
- let c = n.GATE;
181
- return c ? o.GATE = () => c(t) : o.GATE = () => !s.unorderedGroups.get(i(r, s))?.[a], o;
182
- })), "*");
183
- return (t) => {
184
- a(t), e.parser.isRecording() || e.parser.unorderedGroups.delete(i(r, e.parser));
185
- };
186
- }
187
- function I(e, t) {
188
- let n = t.elements.map((t) => k(e, t));
189
- return (e) => n.forEach((t) => t(e));
190
- }
191
- function L(e) {
192
- if (u(e)) return e.guardCondition;
193
- }
194
- function R(e, t, n = t.terminal) {
195
- if (!n) {
196
- if (!t.type.ref) throw Error("Could not resolve reference to type: " + t.type.$refText);
197
- let n = x(t.type.ref)?.terminal;
198
- if (!n) throw Error("Could not find name assignment for type: " + C(t.type.ref));
199
- return R(e, t, n);
200
- } else if (g(n) && h(n.rule.ref)) {
201
- let r = n.rule.ref, i = e.subrule++, a;
202
- return (n) => {
203
- a ??= V(e, r), e.parser.subrule(i, a, !1, t, n);
204
- };
205
- } else if (g(n) && _(n.rule.ref)) {
206
- let r = e.consume++, i = U(e, n.rule.ref.name);
207
- return () => e.parser.consume(r, i, t);
208
- } else if (f(n)) {
209
- let r = e.consume++, i = U(e, n.value);
210
- return () => e.parser.consume(r, i, t);
211
- } else throw Error("Could not build cross reference parser");
212
- }
213
- function z(e, t) {
214
- let n = e.consume++, r = e.tokens[t.value];
215
- if (!r) throw Error("Could not find token for keyword: " + t.value);
216
- return () => e.parser.consume(n, r, t);
217
- }
218
- function B(e, t, n, r) {
219
- let i = t && N(t);
220
- if (!r) if (i) {
221
- let t = e.or++;
222
- return (r) => e.parser.alternatives(t, [{
223
- ALT: () => n(r),
224
- GATE: () => i(r)
225
- }, {
226
- ALT: T(),
227
- GATE: () => !i(r)
228
- }]);
229
- } else return n;
230
- if (r === "*") {
231
- let t = e.many++;
232
- return (r) => e.parser.many(t, {
233
- DEF: () => n(r),
234
- GATE: i ? () => i(r) : void 0
235
- });
236
- } else if (r === "+") {
237
- let t = e.many++;
238
- if (i) {
239
- let r = e.or++;
240
- return (a) => e.parser.alternatives(r, [{
241
- ALT: () => e.parser.atLeastOne(t, { DEF: () => n(a) }),
242
- GATE: () => i(a)
243
- }, {
244
- ALT: T(),
245
- GATE: () => !i(a)
246
- }]);
247
- } else return (r) => e.parser.atLeastOne(t, { DEF: () => n(r) });
248
- } else if (r === "?") {
249
- let t = e.optional++;
250
- return (r) => e.parser.optional(t, {
251
- DEF: () => n(r),
252
- GATE: i ? () => i(r) : void 0
253
- });
254
- } else b(r);
255
- }
256
- function V(e, t) {
257
- let n = H(e, t), r = e.parser.getRule(n);
258
- if (!r) throw Error(`Rule "${n}" not found."`);
259
- return r;
260
- }
261
- function H(e, n) {
262
- if (t(n)) return n.name;
263
- if (e.ruleNames.has(n)) return e.ruleNames.get(n);
264
- {
265
- let t = n, i = t.$container, a = n.$type;
266
- for (; !h(i);) (u(i) || r(i) || v(i)) && (a = i.elements.indexOf(t).toString() + ":" + a), t = i, i = i.$container;
267
- return a = i.name + ":" + a, e.ruleNames.set(n, a), a;
268
- }
269
- }
270
- function U(e, t) {
271
- let n = e.tokens[t];
272
- if (!n) throw Error(`Token "${t}" not found."`);
273
- return n;
274
- }
275
- //#endregion
276
- export { E as createParser };
277
-
278
- //# sourceMappingURL=parser-builder-base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser-builder-base.js","names":["rule"],"sources":["../../../../../../../../node_modules/langium/lib/parser/parser-builder-base.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 { EMPTY_ALT, EOF } from 'chevrotain';\nimport { isAction, isAlternatives, isEndOfFile, isAssignment, isConjunction, isCrossReference, isDisjunction, isGroup, isKeyword, isNegation, isParameterReference, isParserRule, isRuleCall, isTerminalRule, isUnorderedGroup, isBooleanLiteral, isInfixRule, isAbstractParserRule } from '../languages/generated/ast.js';\nimport { assertUnreachable, ErrorWithLocation } from '../utils/errors.js';\nimport { stream } from '../utils/stream.js';\nimport { findNameAssignment, getAllReachableRules, getTypeName } from '../utils/grammar-utils.js';\nexport function createParser(grammar, parser, tokens) {\n const parserContext = {\n parser,\n tokens,\n ruleNames: new Map()\n };\n buildRules(parserContext, grammar);\n return parser;\n}\nfunction buildRules(parserContext, grammar) {\n const reachable = getAllReachableRules(grammar, false);\n const parserRules = stream(grammar.rules).filter(isParserRule).filter(rule => reachable.has(rule));\n for (const rule of parserRules) {\n const ctx = {\n ...parserContext,\n consume: 1,\n optional: 1,\n subrule: 1,\n many: 1,\n or: 1\n };\n parserContext.parser.rule(rule, buildElement(ctx, rule.definition));\n }\n const infixRules = stream(grammar.rules).filter(isInfixRule).filter(rule => reachable.has(rule));\n for (const rule of infixRules) {\n parserContext.parser.rule(rule, buildInfixRule(parserContext, rule));\n }\n}\nfunction buildInfixRule(ctx, rule) {\n const expressionRule = rule.call.rule.ref;\n if (!expressionRule) {\n throw new Error('Could not resolve reference to infix operator rule: ' + rule.call.rule.$refText);\n }\n if (isTerminalRule(expressionRule)) {\n throw new Error('Cannot use terminal rule in infix expression');\n }\n // We need to construct a bunch of synthetic grammar AST nodes here\n // This ensures that the CST and completion engine get populated as expected\n const allKeywords = rule.operators.precedences.flatMap(e => e.operators);\n // The outer group represents the first expression call and the whole (optional) loop\n const outerGroup = {\n $type: 'Group',\n elements: []\n };\n const part1Assignment = {\n $container: outerGroup,\n $type: 'Assignment',\n feature: 'parts',\n operator: '+=',\n terminal: rule.call\n };\n // The inner group represents the loop that contains the operator and expression call\n // It can be infinitely repeated\n const innerGroup = {\n $container: outerGroup,\n $type: 'Group',\n elements: [],\n cardinality: '*'\n };\n outerGroup.elements.push(part1Assignment, innerGroup);\n // Store all operator keywords in one alternative/assignment\n const alternatives = {\n $type: 'Alternatives',\n elements: allKeywords\n };\n const operatorAssignment = {\n $container: innerGroup,\n $type: 'Assignment',\n feature: 'operators',\n operator: '+=',\n terminal: alternatives\n };\n // We need a second assignment of the called expression here\n const part2Assignment = {\n ...part1Assignment,\n $container: innerGroup\n };\n innerGroup.elements.push(operatorAssignment, part2Assignment);\n const tokens = allKeywords.map(e => ctx.tokens[e.value]);\n const orAlts = tokens.map((token, index) => ({\n ALT: () => ctx.parser.consume(index, token, operatorAssignment)\n }));\n let subrule;\n return (args) => {\n subrule ?? (subrule = getRule(ctx, expressionRule));\n ctx.parser.subrule(0, subrule, false, part1Assignment, args);\n ctx.parser.many(0, {\n DEF: () => {\n ctx.parser.alternatives(0, orAlts);\n ctx.parser.subrule(1, subrule, false, part2Assignment, args);\n }\n });\n };\n}\nfunction buildElement(ctx, element, ignoreGuard = false) {\n let method;\n if (isKeyword(element)) {\n method = buildKeyword(ctx, element);\n }\n else if (isAction(element)) {\n method = buildAction(ctx, element);\n }\n else if (isAssignment(element)) {\n method = buildElement(ctx, element.terminal);\n }\n else if (isCrossReference(element)) {\n method = buildCrossReference(ctx, element);\n }\n else if (isRuleCall(element)) {\n method = buildRuleCall(ctx, element);\n }\n else if (isAlternatives(element)) {\n method = buildAlternatives(ctx, element);\n }\n else if (isUnorderedGroup(element)) {\n method = buildUnorderedGroup(ctx, element);\n }\n else if (isGroup(element)) {\n method = buildGroup(ctx, element);\n }\n else if (isEndOfFile(element)) {\n const idx = ctx.consume++;\n method = () => ctx.parser.consume(idx, EOF, element);\n }\n else {\n throw new ErrorWithLocation(element.$cstNode, `Unexpected element type: ${element.$type}`);\n }\n return wrap(ctx, ignoreGuard ? undefined : getGuardCondition(element), method, element.cardinality);\n}\nfunction buildAction(ctx, action) {\n const actionType = getTypeName(action);\n return () => ctx.parser.action(actionType, action);\n}\nfunction buildRuleCall(ctx, ruleCall) {\n const rule = ruleCall.rule.ref;\n if (isAbstractParserRule(rule)) {\n const idx = ctx.subrule++;\n const fragment = isParserRule(rule) && rule.fragment;\n const predicate = ruleCall.arguments.length > 0 ? buildRuleCallPredicate(rule, ruleCall.arguments) : () => ({});\n let subrule;\n return (args) => {\n subrule ?? (subrule = getRule(ctx, rule));\n ctx.parser.subrule(idx, subrule, fragment, ruleCall, predicate(args));\n };\n }\n else if (isTerminalRule(rule)) {\n const idx = ctx.consume++;\n const method = getToken(ctx, rule.name);\n return () => ctx.parser.consume(idx, method, ruleCall);\n }\n else if (!rule) {\n throw new ErrorWithLocation(ruleCall.$cstNode, `Undefined rule: ${ruleCall.rule.$refText}`);\n }\n else {\n assertUnreachable(rule);\n }\n}\nfunction buildRuleCallPredicate(rule, namedArgs) {\n const hasNamedArguments = namedArgs.some(arg => arg.calledByName);\n if (hasNamedArguments) {\n const namedPredicates = namedArgs.map(arg => ({\n parameterName: arg.parameter?.ref?.name,\n predicate: buildPredicate(arg.value)\n }));\n return (args) => {\n const ruleArgs = {};\n for (const { parameterName, predicate } of namedPredicates) {\n if (parameterName) {\n ruleArgs[parameterName] = predicate(args);\n }\n }\n return ruleArgs;\n };\n }\n else {\n const predicates = namedArgs.map(arg => buildPredicate(arg.value));\n return (args) => {\n const ruleArgs = {};\n for (let i = 0; i < predicates.length; i++) {\n if (i < rule.parameters.length) {\n const parameterName = rule.parameters[i].name;\n const predicate = predicates[i];\n ruleArgs[parameterName] = predicate(args);\n }\n }\n return ruleArgs;\n };\n }\n}\nfunction buildPredicate(condition) {\n if (isDisjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) || right(args));\n }\n else if (isConjunction(condition)) {\n const left = buildPredicate(condition.left);\n const right = buildPredicate(condition.right);\n return (args) => (left(args) && right(args));\n }\n else if (isNegation(condition)) {\n const value = buildPredicate(condition.value);\n return (args) => !value(args);\n }\n else if (isParameterReference(condition)) {\n const name = condition.parameter.ref.name;\n return (args) => args !== undefined && args[name] === true;\n }\n else if (isBooleanLiteral(condition)) {\n const value = Boolean(condition.true);\n return () => value;\n }\n assertUnreachable(condition);\n}\nfunction buildAlternatives(ctx, alternatives) {\n if (alternatives.elements.length === 1) {\n return buildElement(ctx, alternatives.elements[0]);\n }\n else {\n const methods = [];\n for (const element of alternatives.elements) {\n const predicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, methods.map(method => {\n const alt = {\n ALT: () => method.ALT(args)\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n }\n return alt;\n }));\n }\n}\nfunction buildUnorderedGroup(ctx, group) {\n if (group.elements.length === 1) {\n return buildElement(ctx, group.elements[0]);\n }\n const methods = [];\n for (const element of group.elements) {\n const predicatedMethod = {\n // Since we handle the guard condition in the alternative already\n // We can ignore the group guard condition inside\n ALT: buildElement(ctx, element, true)\n };\n const guard = getGuardCondition(element);\n if (guard) {\n predicatedMethod.GATE = buildPredicate(guard);\n }\n methods.push(predicatedMethod);\n }\n const orIdx = ctx.or++;\n const idFunc = (groupIdx, lParser) => {\n const stackId = lParser.getRuleStack().join('-');\n return `uGroup_${groupIdx}_${stackId}`;\n };\n const alternatives = (args) => ctx.parser.alternatives(orIdx, methods.map((method, idx) => {\n const alt = { ALT: () => true };\n const parser = ctx.parser;\n alt.ALT = () => {\n method.ALT(args);\n if (!parser.isRecording()) {\n const key = idFunc(orIdx, parser);\n if (!parser.unorderedGroups.get(key)) {\n // init after clear state\n parser.unorderedGroups.set(key, []);\n }\n const groupState = parser.unorderedGroups.get(key);\n if (typeof groupState?.[idx] === 'undefined') {\n // Not accessed yet\n groupState[idx] = true;\n }\n }\n };\n const gate = method.GATE;\n if (gate) {\n alt.GATE = () => gate(args);\n }\n else {\n alt.GATE = () => {\n const trackedAlternatives = parser.unorderedGroups.get(idFunc(orIdx, parser));\n const allow = !trackedAlternatives?.[idx];\n return allow;\n };\n }\n return alt;\n }));\n const wrapped = wrap(ctx, getGuardCondition(group), alternatives, '*');\n return (args) => {\n wrapped(args);\n if (!ctx.parser.isRecording()) {\n ctx.parser.unorderedGroups.delete(idFunc(orIdx, ctx.parser));\n }\n };\n}\nfunction buildGroup(ctx, group) {\n const methods = group.elements.map(e => buildElement(ctx, e));\n return (args) => methods.forEach(method => method(args));\n}\nfunction getGuardCondition(element) {\n if (isGroup(element)) {\n return element.guardCondition;\n }\n return undefined;\n}\nfunction buildCrossReference(ctx, crossRef, terminal = crossRef.terminal) {\n if (!terminal) {\n if (!crossRef.type.ref) {\n throw new Error('Could not resolve reference to type: ' + crossRef.type.$refText);\n }\n const assignment = findNameAssignment(crossRef.type.ref);\n const assignTerminal = assignment?.terminal;\n if (!assignTerminal) {\n throw new Error('Could not find name assignment for type: ' + getTypeName(crossRef.type.ref));\n }\n return buildCrossReference(ctx, crossRef, assignTerminal);\n }\n else if (isRuleCall(terminal) && isParserRule(terminal.rule.ref)) {\n // The terminal is a data type rule here. Everything else will result in a validation error.\n const rule = terminal.rule.ref;\n const idx = ctx.subrule++;\n let subrule;\n return (args) => {\n subrule ?? (subrule = getRule(ctx, rule));\n ctx.parser.subrule(idx, subrule, false, crossRef, args);\n };\n }\n else if (isRuleCall(terminal) && isTerminalRule(terminal.rule.ref)) {\n const idx = ctx.consume++;\n const terminalRule = getToken(ctx, terminal.rule.ref.name);\n return () => ctx.parser.consume(idx, terminalRule, crossRef);\n }\n else if (isKeyword(terminal)) {\n const idx = ctx.consume++;\n const keyword = getToken(ctx, terminal.value);\n return () => ctx.parser.consume(idx, keyword, crossRef);\n }\n else {\n throw new Error('Could not build cross reference parser');\n }\n}\nfunction buildKeyword(ctx, keyword) {\n const idx = ctx.consume++;\n const token = ctx.tokens[keyword.value];\n if (!token) {\n throw new Error('Could not find token for keyword: ' + keyword.value);\n }\n return () => ctx.parser.consume(idx, token, keyword);\n}\nfunction wrap(ctx, guard, method, cardinality) {\n const gate = guard && buildPredicate(guard);\n if (!cardinality) {\n if (gate) {\n const idx = ctx.or++;\n return (args) => ctx.parser.alternatives(idx, [\n {\n ALT: () => method(args),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n }\n else {\n return method;\n }\n }\n if (cardinality === '*') {\n const idx = ctx.many++;\n return (args) => ctx.parser.many(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n }\n else if (cardinality === '+') {\n const idx = ctx.many++;\n if (gate) {\n const orIdx = ctx.or++;\n // In the case of a guard condition for the `+` group\n // We combine it with an empty alternative\n // If the condition returns true, it needs to parse at least a single iteration\n // If its false, it is not allowed to parse anything\n return (args) => ctx.parser.alternatives(orIdx, [\n {\n ALT: () => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args)\n }),\n GATE: () => gate(args)\n },\n {\n ALT: EMPTY_ALT(),\n GATE: () => !gate(args)\n }\n ]);\n }\n else {\n return (args) => ctx.parser.atLeastOne(idx, {\n DEF: () => method(args),\n });\n }\n }\n else if (cardinality === '?') {\n const idx = ctx.optional++;\n return (args) => ctx.parser.optional(idx, {\n DEF: () => method(args),\n GATE: gate ? () => gate(args) : undefined\n });\n }\n else {\n assertUnreachable(cardinality);\n }\n}\nfunction getRule(ctx, element) {\n const name = getRuleName(ctx, element);\n const rule = ctx.parser.getRule(name);\n if (!rule)\n throw new Error(`Rule \"${name}\" not found.\"`);\n return rule;\n}\nfunction getRuleName(ctx, element) {\n if (isAbstractParserRule(element)) {\n return element.name;\n }\n else if (ctx.ruleNames.has(element)) {\n return ctx.ruleNames.get(element);\n }\n else {\n let item = element;\n let parent = item.$container;\n let ruleName = element.$type;\n while (!isParserRule(parent)) {\n if (isGroup(parent) || isAlternatives(parent) || isUnorderedGroup(parent)) {\n const index = parent.elements.indexOf(item);\n ruleName = index.toString() + ':' + ruleName;\n }\n item = parent;\n parent = parent.$container;\n }\n const rule = parent;\n ruleName = rule.name + ':' + ruleName;\n ctx.ruleNames.set(element, ruleName);\n return ruleName;\n }\n}\nfunction getToken(ctx, name) {\n const token = ctx.tokens[name];\n if (!token)\n throw new Error(`Token \"${name}\" not found.\"`);\n return token;\n}\n//# sourceMappingURL=parser-builder-base.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAUA,SAAgB,EAAa,GAAS,GAAQ,GAAQ;CAOlD,OADA,EAAW;EAJP;EACA;EACA,2BAAW,IAAI,KAAK;EAEA,EAAE,EAAQ,EAC3B;;AAEX,SAAS,EAAW,GAAe,GAAS;CACxC,IAAM,IAAY,EAAqB,GAAS,GAAM,EAChD,IAAc,EAAO,EAAQ,MAAM,CAAC,OAAO,EAAa,CAAC,QAAO,MAAQ,EAAU,IAAI,EAAK,CAAC;CAClG,KAAK,IAAM,KAAQ,GAAa;EAC5B,IAAM,IAAM;GACR,GAAG;GACH,SAAS;GACT,UAAU;GACV,SAAS;GACT,MAAM;GACN,IAAI;GACP;EACD,EAAc,OAAO,KAAK,GAAM,EAAa,GAAK,EAAK,WAAW,CAAC;;CAEvE,IAAM,IAAa,EAAO,EAAQ,MAAM,CAAC,OAAO,EAAY,CAAC,QAAO,MAAQ,EAAU,IAAI,EAAK,CAAC;CAChG,KAAK,IAAM,KAAQ,GACf,EAAc,OAAO,KAAK,GAAM,EAAe,GAAe,EAAK,CAAC;;AAG5E,SAAS,EAAe,GAAK,GAAM;CAC/B,IAAM,IAAiB,EAAK,KAAK,KAAK;CACtC,IAAI,CAAC,GACD,MAAU,MAAM,yDAAyD,EAAK,KAAK,KAAK,SAAS;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U,MAAM,UAAU,EAAK,eAAe;CAClD,OAAO"}
@@ -1,65 +0,0 @@
1
- import { stream as e } from "../utils/stream.js";
2
- import { streamAllContents as t } from "../utils/ast-utils.js";
3
- import { isAbstractParserRule as n, isKeyword as r, isTerminalRule as i } from "../languages/generated/ast.js";
4
- import { escapeRegExp as a, isWhitespace as o, partialMatches as s } from "../utils/regexp-utils.js";
5
- import { getAllReachableRules as c, terminalRegex as l } from "../utils/grammar-utils.js";
6
- import { Lexer as u } from "../../../chevrotain/lib/src/scan/lexer_public.js";
7
- import "../../../chevrotain/lib/src/api.js";
8
- //#region ../../node_modules/langium/lib/parser/token-builder.js
9
- var d = class {
10
- constructor() {
11
- this.diagnostics = [];
12
- }
13
- buildTokens(t, n) {
14
- let r = e(c(t, !1)), i = this.buildTerminalTokens(r), a = this.buildKeywordTokens(r, i, n);
15
- return a.push(...i), a;
16
- }
17
- flushLexingReport(e) {
18
- return { diagnostics: this.popDiagnostics() };
19
- }
20
- popDiagnostics() {
21
- let e = [...this.diagnostics];
22
- return this.diagnostics = [], e;
23
- }
24
- buildTerminalTokens(e) {
25
- return e.filter(i).filter((e) => !e.fragment).map((e) => this.buildTerminalToken(e)).toArray();
26
- }
27
- buildTerminalToken(e) {
28
- let t = l(e), n = this.requiresCustomPattern(t) ? this.regexPatternFunction(t) : t, r = {
29
- name: e.name,
30
- PATTERN: n
31
- };
32
- return typeof n == "function" && (r.LINE_BREAKS = !0), e.hidden && (r.GROUP = o(t) ? u.SKIPPED : "hidden"), r;
33
- }
34
- requiresCustomPattern(e) {
35
- return !!(e.flags.includes("u") || e.flags.includes("s"));
36
- }
37
- regexPatternFunction(e) {
38
- let t = new RegExp(e, e.flags + "y");
39
- return (e, n) => (t.lastIndex = n, t.exec(e));
40
- }
41
- buildKeywordTokens(e, i, a) {
42
- return e.filter(n).flatMap((e) => t(e).filter(r)).distinct((e) => e.value).toArray().sort((e, t) => t.value.length - e.value.length).map((e) => this.buildKeywordToken(e, i, !!a?.caseInsensitive));
43
- }
44
- buildKeywordToken(e, t, n) {
45
- let r = this.buildKeywordPattern(e, n), i = {
46
- name: e.value,
47
- PATTERN: r,
48
- LONGER_ALT: this.findLongerAlt(e, t)
49
- };
50
- return typeof r == "function" && (i.LINE_BREAKS = !0), i;
51
- }
52
- buildKeywordPattern(e, t) {
53
- return t ? new RegExp(a(e.value), "i") : e.value;
54
- }
55
- findLongerAlt(e, t) {
56
- return t.reduce((t, n) => {
57
- let r = n?.PATTERN;
58
- return r?.source && s("^" + r.source + "$", e.value) && t.push(n), t;
59
- }, []);
60
- }
61
- };
62
- //#endregion
63
- export { d as DefaultTokenBuilder };
64
-
65
- //# sourceMappingURL=token-builder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token-builder.js","names":[],"sources":["../../../../../../../../node_modules/langium/lib/parser/token-builder.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 ******************************************************************************/\nimport { Lexer } from 'chevrotain';\nimport { isAbstractParserRule, isKeyword, isTerminalRule } from '../languages/generated/ast.js';\nimport { streamAllContents } from '../utils/ast-utils.js';\nimport { getAllReachableRules, terminalRegex } from '../utils/grammar-utils.js';\nimport { escapeRegExp, isWhitespace, partialMatches } from '../utils/regexp-utils.js';\nimport { stream } from '../utils/stream.js';\nexport class DefaultTokenBuilder {\n constructor() {\n /**\n * The list of diagnostics stored during the lexing process of a single text.\n */\n this.diagnostics = [];\n }\n buildTokens(grammar, options) {\n const reachableRules = stream(getAllReachableRules(grammar, false));\n const terminalTokens = this.buildTerminalTokens(reachableRules);\n const tokens = this.buildKeywordTokens(reachableRules, terminalTokens, options);\n // Add all terminals tokens to the end in the order they were defined\n // Chevrotain documentation recommends to add Whitespace-like tokens at the start\n // However, assuming the lexer is able to optimize the tokens, it should not matter\n tokens.push(...terminalTokens);\n // We don't need to add the EOF token explicitly.\n // It is automatically available at the end of the token stream.\n return tokens;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n flushLexingReport(text) {\n return { diagnostics: this.popDiagnostics() };\n }\n popDiagnostics() {\n const diagnostics = [...this.diagnostics];\n this.diagnostics = [];\n return diagnostics;\n }\n buildTerminalTokens(rules) {\n return rules.filter(isTerminalRule).filter(e => !e.fragment)\n .map(terminal => this.buildTerminalToken(terminal)).toArray();\n }\n buildTerminalToken(terminal) {\n const regex = terminalRegex(terminal);\n const pattern = this.requiresCustomPattern(regex) ? this.regexPatternFunction(regex) : regex;\n const tokenType = {\n name: terminal.name,\n PATTERN: pattern,\n };\n if (typeof pattern === 'function') {\n tokenType.LINE_BREAKS = true;\n }\n if (terminal.hidden) {\n // Only skip tokens that are able to accept whitespace\n tokenType.GROUP = isWhitespace(regex) ? Lexer.SKIPPED : 'hidden';\n }\n return tokenType;\n }\n requiresCustomPattern(regex) {\n if (regex.flags.includes('u') || regex.flags.includes('s')) {\n // Unicode and dotall regexes are not supported by Chevrotain.\n return true;\n }\n else {\n return false;\n }\n }\n regexPatternFunction(regex) {\n const stickyRegex = new RegExp(regex, regex.flags + 'y');\n return (text, offset) => {\n stickyRegex.lastIndex = offset;\n const execResult = stickyRegex.exec(text);\n return execResult;\n };\n }\n buildKeywordTokens(rules, terminalTokens, options) {\n return rules\n // We filter by parser rules, since keywords in terminal rules get transformed into regex and are not actual tokens\n .filter(isAbstractParserRule)\n .flatMap(rule => streamAllContents(rule).filter(isKeyword))\n .distinct(e => e.value).toArray()\n // Sort keywords by descending length\n .sort((a, b) => b.value.length - a.value.length)\n .map(keyword => this.buildKeywordToken(keyword, terminalTokens, Boolean(options?.caseInsensitive)));\n }\n buildKeywordToken(keyword, terminalTokens, caseInsensitive) {\n const keywordPattern = this.buildKeywordPattern(keyword, caseInsensitive);\n const tokenType = {\n name: keyword.value,\n PATTERN: keywordPattern,\n LONGER_ALT: this.findLongerAlt(keyword, terminalTokens)\n };\n if (typeof keywordPattern === 'function') {\n tokenType.LINE_BREAKS = true;\n }\n return tokenType;\n }\n buildKeywordPattern(keyword, caseInsensitive) {\n return caseInsensitive ?\n new RegExp(escapeRegExp(keyword.value), 'i') :\n keyword.value;\n }\n findLongerAlt(keyword, terminalTokens) {\n return terminalTokens.reduce((longerAlts, token) => {\n const pattern = token?.PATTERN;\n if (pattern?.source && partialMatches('^' + pattern.source + '$', keyword.value)) {\n longerAlts.push(token);\n }\n return longerAlts;\n }, []);\n }\n}\n//# sourceMappingURL=token-builder.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAWA,IAAa,IAAb,MAAiC;CAC7B,cAAc;EAIV,KAAK,cAAc,EAAE;;CAEzB,YAAY,GAAS,GAAS;EAC1B,IAAM,IAAiB,EAAO,EAAqB,GAAS,GAAM,CAAC,EAC7D,IAAiB,KAAK,oBAAoB,EAAe,EACzD,IAAS,KAAK,mBAAmB,GAAgB,GAAgB,EAAQ;EAO/E,OAHA,EAAO,KAAK,GAAG,EAAe,EAGvB;;CAGX,kBAAkB,GAAM;EACpB,OAAO,EAAE,aAAa,KAAK,gBAAgB,EAAE;;CAEjD,iBAAiB;EACb,IAAM,IAAc,CAAC,GAAG,KAAK,YAAY;EAEzC,OADA,KAAK,cAAc,EAAE,EACd;;CAEX,oBAAoB,GAAO;EACvB,OAAO,EAAM,OAAO,EAAe,CAAC,QAAO,MAAK,CAAC,EAAE,SAAS,CACvD,KAAI,MAAY,KAAK,mBAAmB,EAAS,CAAC,CAAC,SAAS;;CAErE,mBAAmB,GAAU;EACzB,IAAM,IAAQ,EAAc,EAAS,EAC/B,IAAU,KAAK,sBAAsB,EAAM,GAAG,KAAK,qBAAqB,EAAM,GAAG,GACjF,IAAY;GACd,MAAM,EAAS;GACf,SAAS;GACZ;EAQD,OAPI,OAAO,KAAY,eACnB,EAAU,cAAc,KAExB,EAAS,WAET,EAAU,QAAQ,EAAa,EAAM,GAAG,EAAM,UAAU,WAErD;;CAEX,sBAAsB,GAAO;EAMrB,OALJ,GAAI,EAAM,MAAM,SAAS,IAAI,IAAI,EAAM,MAAM,SAAS,IAAI;;CAQ9D,qBAAqB,GAAO;EACxB,IAAM,IAAc,IAAI,OAAO,GAAO,EAAM,QAAQ,IAAI;EACxD,QAAQ,GAAM,OACV,EAAY,YAAY,GACL,EAAY,KAAK,EACnB;;CAGzB,mBAAmB,GAAO,GAAgB,GAAS;EAC/C,OAAO,EAEF,OAAO,EAAqB,CAC5B,SAAQ,MAAQ,EAAkB,EAAK,CAAC,OAAO,EAAU,CAAC,CAC1D,UAAS,MAAK,EAAE,MAAM,CAAC,SAAS,CAEhC,MAAM,GAAG,MAAM,EAAE,MAAM,SAAS,EAAE,MAAM,OAAO,CAC/C,KAAI,MAAW,KAAK,kBAAkB,GAAS,GAAgB,EAAQ,GAAS,gBAAiB,CAAC;;CAE3G,kBAAkB,GAAS,GAAgB,GAAiB;EACxD,IAAM,IAAiB,KAAK,oBAAoB,GAAS,EAAgB,EACnE,IAAY;GACd,MAAM,EAAQ;GACd,SAAS;GACT,YAAY,KAAK,cAAc,GAAS,EAAe;GAC1D;EAID,OAHI,OAAO,KAAmB,eAC1B,EAAU,cAAc,KAErB;;CAEX,oBAAoB,GAAS,GAAiB;EAC1C,OAAO,IACH,IAAI,OAAO,EAAa,EAAQ,MAAM,EAAE,IAAI,GAC5C,EAAQ;;CAEhB,cAAc,GAAS,GAAgB;EACnC,OAAO,EAAe,QAAQ,GAAY,MAAU;GAChD,IAAM,IAAU,GAAO;GAIvB,OAHI,GAAS,UAAU,EAAe,MAAM,EAAQ,SAAS,KAAK,EAAQ,MAAM,IAC5E,EAAW,KAAK,EAAM,EAEnB;KACR,EAAE,CAAC"}
@@ -1,82 +0,0 @@
1
- import { isCrossReference as e, isRuleCall as t } from "../languages/generated/ast.js";
2
- import { getCrossReferenceTerminal as n, getRuleType as r } from "../utils/grammar-utils.js";
3
- //#region ../../node_modules/langium/lib/parser/value-converter.js
4
- var i = class {
5
- convert(r, i) {
6
- let a = i.grammarSource;
7
- if (e(a) && (a = n(a)), t(a)) {
8
- let e = a.rule.ref;
9
- if (!e) throw Error("This cst node was not parsed by a rule.");
10
- return this.runConverter(e, r, i);
11
- }
12
- return r;
13
- }
14
- runConverter(e, t, n) {
15
- switch (e.name.toUpperCase()) {
16
- case "INT": return a.convertInt(t);
17
- case "STRING": return a.convertString(t);
18
- case "ID": return a.convertID(t);
19
- }
20
- switch (r(e)?.toLowerCase()) {
21
- case "number": return a.convertNumber(t);
22
- case "boolean": return a.convertBoolean(t);
23
- case "bigint": return a.convertBigint(t);
24
- case "date": return a.convertDate(t);
25
- default: return t;
26
- }
27
- }
28
- }, a;
29
- (function(e) {
30
- function t(e) {
31
- let t = "";
32
- for (let r = 1; r < e.length - 1; r++) {
33
- let i = e.charAt(r);
34
- if (i === "\\") {
35
- let i = e.charAt(++r);
36
- t += n(i);
37
- } else t += i;
38
- }
39
- return t;
40
- }
41
- e.convertString = t;
42
- function n(e) {
43
- switch (e) {
44
- case "b": return "\b";
45
- case "f": return "\f";
46
- case "n": return "\n";
47
- case "r": return "\r";
48
- case "t": return " ";
49
- case "v": return "\v";
50
- case "0": return "\0";
51
- default: return e;
52
- }
53
- }
54
- function r(e) {
55
- return e.charAt(0) === "^" ? e.substring(1) : e;
56
- }
57
- e.convertID = r;
58
- function i(e) {
59
- return parseInt(e);
60
- }
61
- e.convertInt = i;
62
- function a(e) {
63
- return BigInt(e);
64
- }
65
- e.convertBigint = a;
66
- function o(e) {
67
- return new Date(e);
68
- }
69
- e.convertDate = o;
70
- function s(e) {
71
- return Number(e);
72
- }
73
- e.convertNumber = s;
74
- function c(e) {
75
- return e.toLowerCase() === "true";
76
- }
77
- e.convertBoolean = c;
78
- })(a ||= {});
79
- //#endregion
80
- export { i as DefaultValueConverter };
81
-
82
- //# sourceMappingURL=value-converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"value-converter.js","names":[],"sources":["../../../../../../../../node_modules/langium/lib/parser/value-converter.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 ******************************************************************************/\nimport { isCrossReference, isRuleCall } from '../languages/generated/ast.js';\nimport { getCrossReferenceTerminal, getRuleType } from '../utils/grammar-utils.js';\nexport class DefaultValueConverter {\n convert(input, cstNode) {\n let feature = cstNode.grammarSource;\n if (isCrossReference(feature)) {\n feature = getCrossReferenceTerminal(feature);\n }\n if (isRuleCall(feature)) {\n const rule = feature.rule.ref;\n if (!rule) {\n throw new Error('This cst node was not parsed by a rule.');\n }\n return this.runConverter(rule, input, cstNode);\n }\n return input;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n runConverter(rule, input, cstNode) {\n switch (rule.name.toUpperCase()) {\n case 'INT': return ValueConverter.convertInt(input);\n case 'STRING': return ValueConverter.convertString(input);\n case 'ID': return ValueConverter.convertID(input);\n }\n switch (getRuleType(rule)?.toLowerCase()) {\n case 'number': return ValueConverter.convertNumber(input);\n case 'boolean': return ValueConverter.convertBoolean(input);\n case 'bigint': return ValueConverter.convertBigint(input);\n case 'date': return ValueConverter.convertDate(input);\n default: return input;\n }\n }\n}\nexport var ValueConverter;\n(function (ValueConverter) {\n function convertString(input) {\n let result = '';\n for (let i = 1; i < input.length - 1; i++) {\n const c = input.charAt(i);\n if (c === '\\\\') {\n const c1 = input.charAt(++i);\n result += convertEscapeCharacter(c1);\n }\n else {\n result += c;\n }\n }\n return result;\n }\n ValueConverter.convertString = convertString;\n function convertEscapeCharacter(char) {\n switch (char) {\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n case 'v': return '\\v';\n case '0': return '\\0';\n default: return char;\n }\n }\n function convertID(input) {\n if (input.charAt(0) === '^') {\n return input.substring(1);\n }\n else {\n return input;\n }\n }\n ValueConverter.convertID = convertID;\n function convertInt(input) {\n return parseInt(input);\n }\n ValueConverter.convertInt = convertInt;\n function convertBigint(input) {\n return BigInt(input);\n }\n ValueConverter.convertBigint = convertBigint;\n function convertDate(input) {\n return new Date(input);\n }\n ValueConverter.convertDate = convertDate;\n function convertNumber(input) {\n return Number(input);\n }\n ValueConverter.convertNumber = convertNumber;\n function convertBoolean(input) {\n return input.toLowerCase() === 'true';\n }\n ValueConverter.convertBoolean = convertBoolean;\n})(ValueConverter || (ValueConverter = {}));\n//# sourceMappingURL=value-converter.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAOA,IAAa,IAAb,MAAmC;CAC/B,QAAQ,GAAO,GAAS;EACpB,IAAI,IAAU,EAAQ;EAItB,IAHI,EAAiB,EAAQ,KACzB,IAAU,EAA0B,EAAQ,GAE5C,EAAW,EAAQ,EAAE;GACrB,IAAM,IAAO,EAAQ,KAAK;GAC1B,IAAI,CAAC,GACD,MAAU,MAAM,0CAA0C;GAE9D,OAAO,KAAK,aAAa,GAAM,GAAO,EAAQ;;EAElD,OAAO;;CAGX,aAAa,GAAM,GAAO,GAAS;EAC/B,QAAQ,EAAK,KAAK,aAAa,EAA/B;GACI,KAAK,OAAO,OAAO,EAAe,WAAW,EAAM;GACnD,KAAK,UAAU,OAAO,EAAe,cAAc,EAAM;GACzD,KAAK,MAAM,OAAO,EAAe,UAAU,EAAM;;EAErD,QAAQ,EAAY,EAAK,EAAE,aAAa,EAAxC;GACI,KAAK,UAAU,OAAO,EAAe,cAAc,EAAM;GACzD,KAAK,WAAW,OAAO,EAAe,eAAe,EAAM;GAC3D,KAAK,UAAU,OAAO,EAAe,cAAc,EAAM;GACzD,KAAK,QAAQ,OAAO,EAAe,YAAY,EAAM;GACrD,SAAS,OAAO;;;GAIjB;CACV,SAAU,GAAgB;CACvB,SAAS,EAAc,GAAO;EAC1B,IAAI,IAAS;EACb,KAAK,IAAI,IAAI,GAAG,IAAI,EAAM,SAAS,GAAG,KAAK;GACvC,IAAM,IAAI,EAAM,OAAO,EAAE;GACzB,IAAI,MAAM,MAAM;IACZ,IAAM,IAAK,EAAM,OAAO,EAAE,EAAE;IAC5B,KAAU,EAAuB,EA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