@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 +0,0 @@
1
- {"version":3,"file":"lexer.js","names":[],"sources":["../../../../../../../../../node_modules/chevrotain/lib/src/scan/lexer.js"],"sourcesContent":["import { BaseRegExpVisitor } from \"@chevrotain/regexp-to-ast\";\nimport { Lexer, LexerDefinitionErrorType, } from \"./lexer_public.js\";\nimport { PRINT_ERROR } from \"@chevrotain/utils\";\nimport { canMatchCharCode, failedOptimizationPrefixMsg, getOptimizedStartCodesIndices, } from \"./reg_exp.js\";\nimport { getRegExpAst } from \"./reg_exp_parser.js\";\nconst PATTERN = \"PATTERN\";\nexport const DEFAULT_MODE = \"defaultMode\";\nexport const MODES = \"modes\";\nexport function analyzeTokenTypes(tokenTypes, options) {\n options = Object.assign({ safeMode: false, positionTracking: \"full\", lineTerminatorCharacters: [\"\\r\", \"\\n\"], tracer: (msg, action) => action() }, options);\n const tracer = options.tracer;\n tracer(\"initCharCodeToOptimizedIndexMap\", () => {\n initCharCodeToOptimizedIndexMap();\n });\n let onlyRelevantTypes;\n tracer(\"Reject Lexer.NA\", () => {\n onlyRelevantTypes = tokenTypes.filter((currType) => {\n return currType[PATTERN] !== Lexer.NA;\n });\n });\n let hasCustom = false;\n let allTransformedPatterns;\n tracer(\"Transform Patterns\", () => {\n hasCustom = false;\n allTransformedPatterns = onlyRelevantTypes.map((currType) => {\n const currPattern = currType[PATTERN];\n /* istanbul ignore else */\n if (currPattern instanceof RegExp) {\n const regExpSource = currPattern.source;\n if (regExpSource.length === 1 &&\n // only these regExp meta characters which can appear in a length one regExp\n regExpSource !== \"^\" &&\n regExpSource !== \"$\" &&\n regExpSource !== \".\" &&\n !currPattern.ignoreCase) {\n return regExpSource;\n }\n else if (regExpSource.length === 2 &&\n regExpSource[0] === \"\\\\\" &&\n // not a meta character\n ![\n \"d\",\n \"D\",\n \"s\",\n \"S\",\n \"t\",\n \"r\",\n \"n\",\n \"t\",\n \"0\",\n \"c\",\n \"b\",\n \"B\",\n \"f\",\n \"v\",\n \"w\",\n \"W\",\n ].includes(regExpSource[1])) {\n // escaped meta Characters: /\\+/ /\\[/\n // or redundant escaping: /\\a/\n // without the escaping \"\\\"\n return regExpSource[1];\n }\n else {\n return addStickyFlag(currPattern);\n }\n }\n else if (typeof currPattern === \"function\") {\n hasCustom = true;\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return { exec: currPattern };\n }\n else if (typeof currPattern === \"object\") {\n hasCustom = true;\n // ICustomPattern\n return currPattern;\n }\n else if (typeof currPattern === \"string\") {\n if (currPattern.length === 1) {\n return currPattern;\n }\n else {\n const escapedRegExpString = currPattern.replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\");\n const wrappedRegExp = new RegExp(escapedRegExpString);\n return addStickyFlag(wrappedRegExp);\n }\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n });\n });\n let patternIdxToType;\n let patternIdxToGroup;\n let patternIdxToLongerAltIdxArr;\n let patternIdxToPushMode;\n let patternIdxToPopMode;\n tracer(\"misc mapping\", () => {\n patternIdxToType = onlyRelevantTypes.map((currType) => currType.tokenTypeIdx);\n patternIdxToGroup = onlyRelevantTypes.map((clazz) => {\n const groupName = clazz.GROUP;\n /* istanbul ignore next */\n if (groupName === Lexer.SKIPPED) {\n return undefined;\n }\n else if (typeof groupName === \"string\") {\n return groupName;\n }\n else if (groupName === undefined) {\n return false;\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n });\n patternIdxToLongerAltIdxArr = onlyRelevantTypes.map((clazz) => {\n const longerAltType = clazz.LONGER_ALT;\n if (longerAltType) {\n const longerAltIdxArr = Array.isArray(longerAltType)\n ? longerAltType.map((type) => onlyRelevantTypes.indexOf(type))\n : [onlyRelevantTypes.indexOf(longerAltType)];\n return longerAltIdxArr;\n }\n });\n patternIdxToPushMode = onlyRelevantTypes.map((clazz) => clazz.PUSH_MODE);\n patternIdxToPopMode = onlyRelevantTypes.map((clazz) => Object.hasOwn(clazz, \"POP_MODE\"));\n });\n let patternIdxToCanLineTerminator;\n tracer(\"Line Terminator Handling\", () => {\n const lineTerminatorCharCodes = getCharCodes(options.lineTerminatorCharacters);\n patternIdxToCanLineTerminator = onlyRelevantTypes.map((tokType) => false);\n if (options.positionTracking !== \"onlyOffset\") {\n patternIdxToCanLineTerminator = onlyRelevantTypes.map((tokType) => {\n if (Object.hasOwn(tokType, \"LINE_BREAKS\")) {\n return !!tokType.LINE_BREAKS;\n }\n else {\n return (checkLineBreaksIssues(tokType, lineTerminatorCharCodes) === false &&\n canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN));\n }\n });\n }\n });\n let patternIdxToIsCustom;\n let patternIdxToShort;\n let emptyGroups;\n let patternIdxToConfig;\n tracer(\"Misc Mapping #2\", () => {\n patternIdxToIsCustom = onlyRelevantTypes.map(isCustomPattern);\n patternIdxToShort = allTransformedPatterns.map(isShortPattern);\n emptyGroups = onlyRelevantTypes.reduce((acc, clazz) => {\n const groupName = clazz.GROUP;\n if (typeof groupName === \"string\" && !(groupName === Lexer.SKIPPED)) {\n acc[groupName] = [];\n }\n return acc;\n }, {});\n patternIdxToConfig = allTransformedPatterns.map((x, idx) => {\n return {\n pattern: allTransformedPatterns[idx],\n longerAlt: patternIdxToLongerAltIdxArr[idx],\n canLineTerminator: patternIdxToCanLineTerminator[idx],\n isCustom: patternIdxToIsCustom[idx],\n short: patternIdxToShort[idx],\n group: patternIdxToGroup[idx],\n push: patternIdxToPushMode[idx],\n pop: patternIdxToPopMode[idx],\n tokenTypeIdx: patternIdxToType[idx],\n tokenType: onlyRelevantTypes[idx],\n };\n });\n });\n let canBeOptimized = true;\n let charCodeToPatternIdxToConfig = [];\n if (!options.safeMode) {\n tracer(\"First Char Optimization\", () => {\n charCodeToPatternIdxToConfig = onlyRelevantTypes.reduce((result, currTokType, idx) => {\n if (typeof currTokType.PATTERN === \"string\") {\n const charCode = currTokType.PATTERN.charCodeAt(0);\n const optimizedIdx = charCodeToOptimizedIndex(charCode);\n addToMapOfArrays(result, optimizedIdx, patternIdxToConfig[idx]);\n }\n else if (Array.isArray(currTokType.START_CHARS_HINT)) {\n let lastOptimizedIdx;\n currTokType.START_CHARS_HINT.forEach((charOrInt) => {\n const charCode = typeof charOrInt === \"string\"\n ? charOrInt.charCodeAt(0)\n : charOrInt;\n const currOptimizedIdx = charCodeToOptimizedIndex(charCode);\n // Avoid adding the config multiple times\n /* istanbul ignore else */\n // - Difficult to check this scenario effects as it is only a performance\n // optimization that does not change correctness\n if (lastOptimizedIdx !== currOptimizedIdx) {\n lastOptimizedIdx = currOptimizedIdx;\n addToMapOfArrays(result, currOptimizedIdx, patternIdxToConfig[idx]);\n }\n });\n }\n else if (currTokType.PATTERN instanceof RegExp) {\n if (currTokType.PATTERN.unicode) {\n canBeOptimized = false;\n if (options.ensureOptimizations) {\n PRINT_ERROR(`${failedOptimizationPrefixMsg}` +\n `\\tUnable to analyze < ${currTokType.PATTERN.toString()} > pattern.\\n` +\n \"\\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\\n\" +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE\");\n }\n }\n else {\n const optimizedCodes = getOptimizedStartCodesIndices(currTokType.PATTERN, options.ensureOptimizations);\n /* istanbul ignore if */\n // start code will only be empty given an empty regExp or failure of regexp-to-ast library\n // the first should be a different validation and the second cannot be tested.\n if (optimizedCodes.length === 0) {\n // we cannot understand what codes may start possible matches\n // The optimization correctness requires knowing start codes for ALL patterns.\n // Not actually sure this is an error, no debug message\n canBeOptimized = false;\n }\n optimizedCodes.forEach((code) => {\n addToMapOfArrays(result, code, patternIdxToConfig[idx]);\n });\n }\n }\n else {\n if (options.ensureOptimizations) {\n PRINT_ERROR(`${failedOptimizationPrefixMsg}` +\n `\\tTokenType: <${currTokType.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\\n` +\n \"\\tThis will disable the lexer's first char optimizations.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE\");\n }\n canBeOptimized = false;\n }\n return result;\n }, []);\n });\n }\n return {\n emptyGroups: emptyGroups,\n patternIdxToConfig: patternIdxToConfig,\n charCodeToPatternIdxToConfig: charCodeToPatternIdxToConfig,\n hasCustom: hasCustom,\n canBeOptimized: canBeOptimized,\n };\n}\nexport function validatePatterns(tokenTypes, validModesNames) {\n let errors = [];\n const missingResult = findMissingPatterns(tokenTypes);\n errors = errors.concat(missingResult.errors);\n const invalidResult = findInvalidPatterns(missingResult.valid);\n const validTokenTypes = invalidResult.valid;\n errors = errors.concat(invalidResult.errors);\n errors = errors.concat(validateRegExpPattern(validTokenTypes));\n errors = errors.concat(findInvalidGroupType(validTokenTypes));\n errors = errors.concat(findModesThatDoNotExist(validTokenTypes, validModesNames));\n errors = errors.concat(findUnreachablePatterns(validTokenTypes));\n return errors;\n}\nfunction validateRegExpPattern(tokenTypes) {\n let errors = [];\n const withRegExpPatterns = tokenTypes.filter((currTokType) => currTokType[PATTERN] instanceof RegExp);\n errors = errors.concat(findEndOfInputAnchor(withRegExpPatterns));\n errors = errors.concat(findStartOfInputAnchor(withRegExpPatterns));\n errors = errors.concat(findUnsupportedFlags(withRegExpPatterns));\n errors = errors.concat(findDuplicatePatterns(withRegExpPatterns));\n errors = errors.concat(findEmptyMatchRegExps(withRegExpPatterns));\n return errors;\n}\nexport function findMissingPatterns(tokenTypes) {\n const tokenTypesWithMissingPattern = tokenTypes.filter((currType) => {\n return !Object.hasOwn(currType, PATTERN);\n });\n const errors = tokenTypesWithMissingPattern.map((currType) => {\n return {\n message: \"Token Type: ->\" +\n currType.name +\n \"<- missing static 'PATTERN' property\",\n type: LexerDefinitionErrorType.MISSING_PATTERN,\n tokenTypes: [currType],\n };\n });\n const valid = tokenTypes.filter((x) => !tokenTypesWithMissingPattern.includes(x));\n return { errors, valid };\n}\nexport function findInvalidPatterns(tokenTypes) {\n const tokenTypesWithInvalidPattern = tokenTypes.filter((currType) => {\n const pattern = currType[PATTERN];\n return (!(pattern instanceof RegExp) &&\n !(typeof pattern === \"function\") &&\n !Object.hasOwn(pattern, \"exec\") &&\n !(typeof pattern === \"string\"));\n });\n const errors = tokenTypesWithInvalidPattern.map((currType) => {\n return {\n message: \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' can only be a RegExp, a\" +\n \" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.\",\n type: LexerDefinitionErrorType.INVALID_PATTERN,\n tokenTypes: [currType],\n };\n });\n const valid = tokenTypes.filter((x) => !tokenTypesWithInvalidPattern.includes(x));\n return { errors, valid };\n}\nconst end_of_input = /[^\\\\][$]/;\nexport function findEndOfInputAnchor(tokenTypes) {\n class EndAnchorFinder extends BaseRegExpVisitor {\n constructor() {\n super(...arguments);\n this.found = false;\n }\n visitEndAnchor(node) {\n this.found = true;\n }\n }\n const invalidRegex = tokenTypes.filter((currType) => {\n const pattern = currType.PATTERN;\n try {\n const regexpAst = getRegExpAst(pattern);\n const endAnchorVisitor = new EndAnchorFinder();\n endAnchorVisitor.visit(regexpAst);\n return endAnchorVisitor.found;\n }\n catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return end_of_input.test(pattern.source);\n }\n });\n const errors = invalidRegex.map((currType) => {\n return {\n message: \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain end of input anchor '$'\\n\" +\n \"\\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.EOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n return errors;\n}\nexport function findEmptyMatchRegExps(tokenTypes) {\n const matchesEmptyString = tokenTypes.filter((currType) => {\n const pattern = currType.PATTERN;\n return pattern.test(\"\");\n });\n const errors = matchesEmptyString.map((currType) => {\n return {\n message: \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' must not match an empty string\",\n type: LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,\n tokenTypes: [currType],\n };\n });\n return errors;\n}\nconst start_of_input = /[^\\\\[][\\^]|^\\^/;\nexport function findStartOfInputAnchor(tokenTypes) {\n class StartAnchorFinder extends BaseRegExpVisitor {\n constructor() {\n super(...arguments);\n this.found = false;\n }\n visitStartAnchor(node) {\n this.found = true;\n }\n }\n const invalidRegex = tokenTypes.filter((currType) => {\n const pattern = currType.PATTERN;\n try {\n const regexpAst = getRegExpAst(pattern);\n const startAnchorVisitor = new StartAnchorFinder();\n startAnchorVisitor.visit(regexpAst);\n return startAnchorVisitor.found;\n }\n catch (e) {\n // old behavior in case of runtime exceptions with regexp-to-ast.\n /* istanbul ignore next - cannot ensure an error in regexp-to-ast*/\n return start_of_input.test(pattern.source);\n }\n });\n const errors = invalidRegex.map((currType) => {\n return {\n message: \"Unexpected RegExp Anchor Error:\\n\" +\n \"\\tToken Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' cannot contain start of input anchor '^'\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.SOI_ANCHOR_FOUND,\n tokenTypes: [currType],\n };\n });\n return errors;\n}\nexport function findUnsupportedFlags(tokenTypes) {\n const invalidFlags = tokenTypes.filter((currType) => {\n const pattern = currType[PATTERN];\n return pattern instanceof RegExp && (pattern.multiline || pattern.global);\n });\n const errors = invalidFlags.map((currType) => {\n return {\n message: \"Token Type: ->\" +\n currType.name +\n \"<- static 'PATTERN' may NOT contain global('g') or multiline('m')\",\n type: LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,\n tokenTypes: [currType],\n };\n });\n return errors;\n}\n// This can only test for identical duplicate RegExps, not semantically equivalent ones.\nexport function findDuplicatePatterns(tokenTypes) {\n const found = [];\n let identicalPatterns = tokenTypes.map((outerType) => {\n return tokenTypes.reduce((result, innerType) => {\n if (outerType.PATTERN.source === innerType.PATTERN.source &&\n !found.includes(innerType) &&\n innerType.PATTERN !== Lexer.NA) {\n // this avoids duplicates in the result, each Token Type may only appear in one \"set\"\n // in essence we are creating Equivalence classes on equality relation.\n found.push(innerType);\n result.push(innerType);\n return result;\n }\n return result;\n }, []);\n });\n identicalPatterns = identicalPatterns.filter(Boolean);\n const duplicatePatterns = identicalPatterns.filter((currIdenticalSet) => {\n return currIdenticalSet.length > 1;\n });\n const errors = duplicatePatterns.map((setOfIdentical) => {\n const tokenTypeNames = setOfIdentical.map((currType) => {\n return currType.name;\n });\n const dupPatternSrc = setOfIdentical[0].PATTERN;\n return {\n message: `The same RegExp pattern ->${dupPatternSrc}<-` +\n `has been used in all of the following Token Types: ${tokenTypeNames.join(\", \")} <-`,\n type: LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,\n tokenTypes: setOfIdentical,\n };\n });\n return errors;\n}\nexport function findInvalidGroupType(tokenTypes) {\n const invalidTypes = tokenTypes.filter((clazz) => {\n if (!Object.hasOwn(clazz, \"GROUP\")) {\n return false;\n }\n const group = clazz.GROUP;\n return (group !== Lexer.SKIPPED &&\n group !== Lexer.NA &&\n !(typeof group === \"string\"));\n });\n const errors = invalidTypes.map((currType) => {\n return {\n message: \"Token Type: ->\" +\n currType.name +\n \"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String\",\n type: LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,\n tokenTypes: [currType],\n };\n });\n return errors;\n}\nexport function findModesThatDoNotExist(tokenTypes, validModes) {\n const invalidModes = tokenTypes.filter((clazz) => {\n return (clazz.PUSH_MODE !== undefined && !validModes.includes(clazz.PUSH_MODE));\n });\n const errors = invalidModes.map((tokType) => {\n const msg = `Token Type: ->${tokType.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${tokType.PUSH_MODE}<-` +\n `which does not exist`;\n return {\n message: msg,\n type: LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,\n tokenTypes: [tokType],\n };\n });\n return errors;\n}\nexport function findUnreachablePatterns(tokenTypes) {\n const errors = [];\n const canBeTested = tokenTypes.reduce((result, tokType, idx) => {\n const pattern = tokType.PATTERN;\n if (pattern === Lexer.NA) {\n return result;\n }\n // a more comprehensive validation for all forms of regExps would require\n // deeper regExp analysis capabilities\n if (typeof pattern === \"string\") {\n result.push({ str: pattern, idx, tokenType: tokType });\n }\n else if (pattern instanceof RegExp && noMetaChar(pattern)) {\n result.push({ str: pattern.source, idx, tokenType: tokType });\n }\n return result;\n }, []);\n tokenTypes.forEach((aTokType, aIdx) => {\n canBeTested.forEach(({ str: bStr, idx: bIdx, tokenType: bTokType }) => {\n if (aIdx < bIdx && tryToMatchStrToPattern(bStr, aTokType.PATTERN)) {\n const msg = `Token: ->${bTokType.name}<- can never be matched.\\n` +\n `Because it appears AFTER the Token Type ->${aTokType.name}<-` +\n `in the lexer's definition.\\n` +\n `See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;\n errors.push({\n message: msg,\n type: LexerDefinitionErrorType.UNREACHABLE_PATTERN,\n tokenTypes: [aTokType, bTokType],\n });\n }\n });\n });\n return errors;\n}\nfunction tryToMatchStrToPattern(str, pattern) {\n if (pattern instanceof RegExp) {\n if (usesLookAheadOrBehind(pattern)) {\n // if lookahead or lookbehind assertions are used\n // we assume they would be responsible for disambiguating the match\n // The alternative is to risk false positive unreachable pattern errors.\n // e.g.: /(?<!a)b/ and /b/ tokens would cause such false positives.\n return false;\n }\n const regExpArray = pattern.exec(str);\n return regExpArray !== null && regExpArray.index === 0;\n }\n else if (typeof pattern === \"function\") {\n // maintain the API of custom patterns\n return pattern(str, 0, [], {});\n }\n else if (Object.hasOwn(pattern, \"exec\")) {\n // maintain the API of custom patterns\n return pattern.exec(str, 0, [], {});\n }\n else if (typeof pattern === \"string\") {\n return pattern === str;\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n}\nfunction noMetaChar(regExp) {\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n const metaChars = [\n \".\",\n \"\\\\\",\n \"[\",\n \"]\",\n \"|\",\n \"^\",\n \"$\",\n \"(\",\n \")\",\n \"?\",\n \"*\",\n \"+\",\n \"{\",\n ];\n return (metaChars.find((char) => regExp.source.indexOf(char) !== -1) === undefined);\n}\nfunction usesLookAheadOrBehind(regExp) {\n return /(\\(\\?=)|(\\(\\?!)|(\\(\\?<=)|(\\(\\?<!)/.test(regExp.source);\n}\nexport function addStartOfInput(pattern) {\n const flags = pattern.ignoreCase ? \"i\" : \"\";\n // always wrapping in a none capturing group preceded by '^' to make sure matching can only work on start of input.\n // duplicate/redundant start of input markers have no meaning (/^^^^A/ === /^A/)\n return new RegExp(`^(?:${pattern.source})`, flags);\n}\nexport function addStickyFlag(pattern) {\n const flags = pattern.ignoreCase ? \"iy\" : \"y\";\n return new RegExp(`${pattern.source}`, flags);\n}\nexport function performRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) {\n const errors = [];\n // some run time checks to help the end users.\n if (!Object.hasOwn(lexerDefinition, DEFAULT_MODE)) {\n errors.push({\n message: \"A MultiMode Lexer cannot be initialized without a <\" +\n DEFAULT_MODE +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,\n });\n }\n if (!Object.hasOwn(lexerDefinition, MODES)) {\n errors.push({\n message: \"A MultiMode Lexer cannot be initialized without a <\" +\n MODES +\n \"> property in its definition\\n\",\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,\n });\n }\n if (Object.hasOwn(lexerDefinition, MODES) &&\n Object.hasOwn(lexerDefinition, DEFAULT_MODE) &&\n !Object.hasOwn(lexerDefinition.modes, lexerDefinition.defaultMode)) {\n errors.push({\n message: `A MultiMode Lexer cannot be initialized with a ${DEFAULT_MODE}: <${lexerDefinition.defaultMode}>` +\n `which does not exist\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,\n });\n }\n if (Object.hasOwn(lexerDefinition, MODES)) {\n Object.keys(lexerDefinition.modes).forEach((currModeName) => {\n const currModeValue = lexerDefinition.modes[currModeName];\n currModeValue.forEach((currTokType, currIdx) => {\n if (currTokType === undefined) {\n errors.push({\n message: `A Lexer cannot be initialized using an undefined Token Type. Mode:` +\n `<${currModeName}> at index: <${currIdx}>\\n`,\n type: LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,\n });\n }\n else if (Object.hasOwn(currTokType, \"LONGER_ALT\")) {\n const longerAlt = Array.isArray(currTokType.LONGER_ALT)\n ? currTokType.LONGER_ALT\n : [currTokType.LONGER_ALT];\n longerAlt.forEach((currLongerAlt) => {\n if (currLongerAlt !== undefined &&\n !currModeValue.includes(currLongerAlt)) {\n errors.push({\n message: `A MultiMode Lexer cannot be initialized with a longer_alt <${currLongerAlt.name}> on token <${currTokType.name}> outside of mode <${currModeName}>\\n`,\n type: LexerDefinitionErrorType.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,\n });\n }\n });\n }\n });\n });\n }\n return errors;\n}\nexport function performWarningRuntimeChecks(lexerDefinition, trackLines, lineTerminatorCharacters) {\n const warnings = [];\n let hasAnyLineBreak = false;\n const allTokenTypes = Object.values(lexerDefinition.modes || {})\n .flat()\n .filter(Boolean);\n const concreteTokenTypes = allTokenTypes.filter((currType) => currType[PATTERN] !== Lexer.NA);\n const terminatorCharCodes = getCharCodes(lineTerminatorCharacters);\n if (trackLines) {\n concreteTokenTypes.forEach((tokType) => {\n const currIssue = checkLineBreaksIssues(tokType, terminatorCharCodes);\n if (currIssue !== false) {\n const message = buildLineBreakIssueMessage(tokType, currIssue);\n const warningDescriptor = {\n message,\n type: currIssue.issue,\n tokenType: tokType,\n };\n warnings.push(warningDescriptor);\n }\n else {\n // we don't want to attempt to scan if the user explicitly specified the line_breaks option.\n if (Object.hasOwn(tokType, \"LINE_BREAKS\")) {\n if (tokType.LINE_BREAKS === true) {\n hasAnyLineBreak = true;\n }\n }\n else {\n if (canMatchCharCode(terminatorCharCodes, tokType.PATTERN)) {\n hasAnyLineBreak = true;\n }\n }\n }\n });\n }\n if (trackLines && !hasAnyLineBreak) {\n warnings.push({\n message: \"Warning: No LINE_BREAKS Found.\\n\" +\n \"\\tThis Lexer has been defined to track line and column information,\\n\" +\n \"\\tBut none of the Token Types can be identified as matching a line terminator.\\n\" +\n \"\\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \\n\" +\n \"\\tfor details.\",\n type: LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS,\n });\n }\n return warnings;\n}\nexport function cloneEmptyGroups(emptyGroups) {\n const clonedResult = {};\n const groupKeys = Object.keys(emptyGroups);\n groupKeys.forEach((currKey) => {\n const currGroupValue = emptyGroups[currKey];\n /* istanbul ignore else */\n if (Array.isArray(currGroupValue)) {\n clonedResult[currKey] = [];\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n });\n return clonedResult;\n}\n// TODO: refactor to avoid duplication\nexport function isCustomPattern(tokenType) {\n const pattern = tokenType.PATTERN;\n /* istanbul ignore else */\n if (pattern instanceof RegExp) {\n return false;\n }\n else if (typeof pattern === \"function\") {\n // CustomPatternMatcherFunc - custom patterns do not require any transformations, only wrapping in a RegExp Like object\n return true;\n }\n else if (Object.hasOwn(pattern, \"exec\")) {\n // ICustomPattern\n return true;\n }\n else if (typeof pattern === \"string\") {\n return false;\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n}\nexport function isShortPattern(pattern) {\n if (typeof pattern === \"string\" && pattern.length === 1) {\n return pattern.charCodeAt(0);\n }\n else {\n return false;\n }\n}\n/**\n * Faster than using a RegExp for default newline detection during lexing.\n */\nexport const LineTerminatorOptimizedTester = {\n // implements /\\n|\\r\\n?/g.test\n test: function (text) {\n const len = text.length;\n for (let i = this.lastIndex; i < len; i++) {\n const c = text.charCodeAt(i);\n if (c === 10) {\n this.lastIndex = i + 1;\n return true;\n }\n else if (c === 13) {\n if (text.charCodeAt(i + 1) === 10) {\n this.lastIndex = i + 2;\n }\n else {\n this.lastIndex = i + 1;\n }\n return true;\n }\n }\n return false;\n },\n lastIndex: 0,\n};\nfunction checkLineBreaksIssues(tokType, lineTerminatorCharCodes) {\n if (Object.hasOwn(tokType, \"LINE_BREAKS\")) {\n // if the user explicitly declared the line_breaks option we will respect their choice\n // and assume it is correct.\n return false;\n }\n else {\n /* istanbul ignore else */\n if (tokType.PATTERN instanceof RegExp) {\n try {\n // TODO: why is the casting suddenly needed?\n canMatchCharCode(lineTerminatorCharCodes, tokType.PATTERN);\n }\n catch (e) {\n /* istanbul ignore next - to test this we would have to mock <canMatchCharCode> to throw an error */\n return {\n issue: LexerDefinitionErrorType.IDENTIFY_TERMINATOR,\n errMsg: e.message,\n };\n }\n return false;\n }\n else if (typeof tokType.PATTERN === \"string\") {\n // string literal patterns can always be analyzed to detect line terminator usage\n return false;\n }\n else if (isCustomPattern(tokType)) {\n // custom token types\n return { issue: LexerDefinitionErrorType.CUSTOM_LINE_BREAK };\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n }\n}\nexport function buildLineBreakIssueMessage(tokType, details) {\n /* istanbul ignore else */\n if (details.issue === LexerDefinitionErrorType.IDENTIFY_TERMINATOR) {\n return (\"Warning: unable to identify line terminator usage in pattern.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n `\\t Root cause: ${details.errMsg}.\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR\");\n }\n else if (details.issue === LexerDefinitionErrorType.CUSTOM_LINE_BREAK) {\n return (\"Warning: A Custom Token Pattern should specify the <line_breaks> option.\\n\" +\n `\\tThe problem is in the <${tokType.name}> Token Type\\n` +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK\");\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n}\nfunction getCharCodes(charsOrCodes) {\n const charCodes = charsOrCodes.map((numOrString) => {\n if (typeof numOrString === \"string\") {\n return numOrString.charCodeAt(0);\n }\n else {\n return numOrString;\n }\n });\n return charCodes;\n}\nfunction addToMapOfArrays(map, key, value) {\n if (map[key] === undefined) {\n map[key] = [value];\n }\n else {\n map[key].push(value);\n }\n}\nexport const minOptimizationVal = 256;\n/**\n * We are mapping charCode above ASCI (256) into buckets each in the size of 256.\n * This is because ASCI are the most common start chars so each one of those will get its own\n * possible token configs vector.\n *\n * Tokens starting with charCodes \"above\" ASCI are uncommon, so we can \"afford\"\n * to place these into buckets of possible token configs, What we gain from\n * this is avoiding the case of creating an optimization 'charCodeToPatternIdxToConfig'\n * which would contain 10,000+ arrays of small size (e.g unicode Identifiers scenario).\n * Our 'charCodeToPatternIdxToConfig' max size will now be:\n * 256 + (2^16 / 2^8) - 1 === 511\n *\n * note the hack for fast division integer part extraction\n * See: https://stackoverflow.com/a/4228528\n */\nlet charCodeToOptimizedIdxMap = [];\nexport function charCodeToOptimizedIndex(charCode) {\n return charCode < minOptimizationVal\n ? charCode\n : charCodeToOptimizedIdxMap[charCode];\n}\n/**\n * This is a compromise between cold start / hot running performance\n * Creating this array takes ~3ms on a modern machine,\n * But if we perform the computation at runtime as needed the CSS Lexer benchmark\n * performance degrades by ~10%\n *\n * TODO: Perhaps it should be lazy initialized only if a charCode > 255 is used.\n */\nfunction initCharCodeToOptimizedIndexMap() {\n if (charCodeToOptimizedIdxMap.length === 0) {\n charCodeToOptimizedIdxMap = new Array(65536);\n for (let i = 0; i < 65536; i++) {\n charCodeToOptimizedIdxMap[i] = i > 255 ? 255 + ~~(i / 255) : i;\n }\n }\n}\n//# sourceMappingURL=lexer.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAKA,IAAM,IAAU,WACH,IAAe,eACf,IAAQ;AACrB,SAAgB,EAAkB,GAAY,GAAS;CACnD,IAAU,OAAO,OAAO;EAAE,UAAU;EAAO,kBAAkB;EAAQ,0BAA0B,CAAC,MAAM,KAAK;EAAE,SAAS,GAAK,MAAW,GAAQ;EAAE,EAAE,EAAQ;CAC1J,IAAM,IAAS,EAAQ;CACvB,EAAO,yCAAyC;EAC5C,GAAiC;GACnC;CACF,IAAI;CACJ,EAAO,yBAAyB;EAC5B,IAAoB,EAAW,QAAQ,MAC5B,EAAS,OAAa,EAAM,GACrC;GACJ;CACF,IAAI,IAAY,IACZ;CACJ,EAAO,4BAA4B;EAE/B,AADA,IAAY,IACZ,IAAyB,EAAkB,KAAK,MAAa;GACzD,IAAM,IAAc,EAAS;;GAE7B,IAAI,aAAuB,QAAQ;IAC/B,IAAM,IAAe,EAAY;IAoC7B,OAnCA,EAAa,WAAW,KAExB,MAAiB,OACjB,MAAiB,OACjB,MAAiB,OACjB,CAAC,EAAY,aACN,IAEF,EAAa,WAAW,KAC7B,EAAa,OAAO,QAEpB,CAAC;KACG;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACH,CAAC,SAAS,EAAa,GAAG,GAIpB,EAAa,KAGb,EAAc,EAAY;UAGpC,IAAI,OAAO,KAAgB,YAG5B,OAFA,IAAY,IAEL,EAAE,MAAM,GAAa;QAE3B,IAAI,OAAO,KAAgB,UAG5B,OAFA,IAAY,IAEL;QAEN,IAAI,OAAO,KAAgB,UAC5B;QAAI,EAAY,WAAW,GACvB,OAAO;IA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,GAAS;;CAEzD,IAAI,EAAQ,UAAU,EAAyB,qBAC3C,OAAQ;2BACwB,EAAQ,KAAK,+BACvB,EAAQ,OAAO;CAGpC,IAAI,EAAQ,UAAU,EAAyB,mBAChD,OAAQ;2BACwB,EAAQ,KAAK;CAI7C,MAAM,MAAM,uBAAuB;;AAG3C,SAAS,EAAa,GAAc;CAShC,OARkB,EAAa,KAAK,MAC5B,OAAO,KAAgB,WAChB,EAAY,WAAW,EAAE,GAGzB,EAGC;;AAEpB,SAAS,EAAiB,GAAK,GAAK,GAAO;CACvC,AAAI,EAAI,OAAS,KAAA,IACb,EAAI,KAAO,CAAC,EAAM,GAGlB,EAAI,GAAK,KAAK,EAAM;;AAmB5B,IAAI,IAA4B,EAAE;AAClC,SAAgB,EAAyB,GAAU;CAC/C,OAAO,IAAA,MACD,IACA,EAA0B;;AAUpC,SAAS,IAAkC;CACvC,IAAI,EAA0B,WAAW,GAAG;EACxC,IAAgC,MAAM,MAAM;EAC5C,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,KACvB,EAA0B,KAAK,IAAI,MAAM,MAAM,CAAC,EAAE,IAAI,OAAO"}
@@ -1,13 +0,0 @@
1
- //#region ../../node_modules/chevrotain/lib/src/scan/lexer_errors_public.js
2
- var e = {
3
- buildUnableToPopLexerModeMessage(e) {
4
- return `Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`;
5
- },
6
- buildUnexpectedCharactersMessage(e, t, n, r, i, a) {
7
- return `unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`;
8
- }
9
- };
10
- //#endregion
11
- export { e as defaultLexerErrorProvider };
12
-
13
- //# sourceMappingURL=lexer_errors_public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexer_errors_public.js","names":[],"sources":["../../../../../../../../../node_modules/chevrotain/lib/src/scan/lexer_errors_public.js"],"sourcesContent":["export const defaultLexerErrorProvider = {\n buildUnableToPopLexerModeMessage(token) {\n return `Unable to pop Lexer Mode after encountering Token ->${token.image}<- The Mode Stack is empty`;\n },\n buildUnexpectedCharactersMessage(fullText, startOffset, length, line, column, mode) {\n return (`unexpected character: ->${fullText.charAt(startOffset)}<- at offset: ${startOffset},` + ` skipped ${length} characters.`);\n },\n};\n//# sourceMappingURL=lexer_errors_public.js.map"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,IAA4B;CACrC,iCAAiC,GAAO;EACpC,OAAO,uDAAuD,EAAM,MAAM;;CAE9E,iCAAiC,GAAU,GAAa,GAAQ,GAAM,GAAQ,GAAM;EAChF,OAAQ,2BAA2B,EAAS,OAAO,EAAY,CAAC,gBAAgB,EAAY,YAAiB,EAAO;;CAE3H"}
@@ -1,257 +0,0 @@
1
- import { PRINT_WARNING as e } from "../../../../@chevrotain/utils/lib/src/print.js";
2
- import { timer as t } from "../../../../@chevrotain/utils/lib/src/timer.js";
3
- import { toFastProperties as n } from "../../../../@chevrotain/utils/lib/src/to-fast-properties.js";
4
- import { clearRegExpParserCache as r } from "./reg_exp_parser.js";
5
- import { DEFAULT_MODE as i, LineTerminatorOptimizedTester as a, analyzeTokenTypes as o, charCodeToOptimizedIndex as s, cloneEmptyGroups as c, performRuntimeChecks as l, performWarningRuntimeChecks as u, validatePatterns as d } from "./lexer.js";
6
- import { augmentTokenTypes as f } from "./tokens.js";
7
- import { defaultLexerErrorProvider as p } from "./lexer_errors_public.js";
8
- //#region ../../node_modules/chevrotain/lib/src/scan/lexer_public.js
9
- var m;
10
- (function(e) {
11
- e[e.MISSING_PATTERN = 0] = "MISSING_PATTERN", e[e.INVALID_PATTERN = 1] = "INVALID_PATTERN", e[e.EOI_ANCHOR_FOUND = 2] = "EOI_ANCHOR_FOUND", e[e.UNSUPPORTED_FLAGS_FOUND = 3] = "UNSUPPORTED_FLAGS_FOUND", e[e.DUPLICATE_PATTERNS_FOUND = 4] = "DUPLICATE_PATTERNS_FOUND", e[e.INVALID_GROUP_TYPE_FOUND = 5] = "INVALID_GROUP_TYPE_FOUND", e[e.PUSH_MODE_DOES_NOT_EXIST = 6] = "PUSH_MODE_DOES_NOT_EXIST", e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE", e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY", e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST", e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED", e[e.SOI_ANCHOR_FOUND = 11] = "SOI_ANCHOR_FOUND", e[e.EMPTY_MATCH_PATTERN = 12] = "EMPTY_MATCH_PATTERN", e[e.NO_LINE_BREAKS_FLAGS = 13] = "NO_LINE_BREAKS_FLAGS", e[e.UNREACHABLE_PATTERN = 14] = "UNREACHABLE_PATTERN", e[e.IDENTIFY_TERMINATOR = 15] = "IDENTIFY_TERMINATOR", e[e.CUSTOM_LINE_BREAK = 16] = "CUSTOM_LINE_BREAK", e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17] = "MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";
12
- })(m ||= {});
13
- var h = {
14
- deferDefinitionErrorsHandling: !1,
15
- positionTracking: "full",
16
- lineTerminatorsPattern: /\n|\r\n?/g,
17
- lineTerminatorCharacters: ["\n", "\r"],
18
- ensureOptimizations: !1,
19
- safeMode: !1,
20
- errorMessageProvider: p,
21
- traceInitPerf: !1,
22
- skipValidations: !1,
23
- recoveryEnabled: !0
24
- };
25
- Object.freeze(h);
26
- var g = class {
27
- constructor(s, c = h) {
28
- if (this.lexerDefinition = s, this.lexerDefinitionErrors = [], this.lexerDefinitionWarning = [], this.patternIdxToConfig = {}, this.charCodeToPatternIdxToConfig = {}, this.modes = [], this.emptyGroups = {}, this.trackStartLines = !0, this.trackEndLines = !0, this.hasCustom = !1, this.canModeBeOptimized = {}, this.TRACE_INIT = (e, n) => {
29
- if (this.traceInitPerf === !0) {
30
- this.traceInitIndent++;
31
- let r = Array(this.traceInitIndent + 1).join(" ");
32
- this.traceInitIndent < this.traceInitMaxIdent && console.log(`${r}--> <${e}>`);
33
- let { time: i, value: a } = t(n), o = i > 10 ? console.warn : console.log;
34
- return this.traceInitIndent < this.traceInitMaxIdent && o(`${r}<-- <${e}> time: ${i}ms`), this.traceInitIndent--, a;
35
- } else return n();
36
- }, typeof c == "boolean") throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");
37
- this.config = Object.assign({}, h, c);
38
- let p = this.config.traceInitPerf;
39
- p === !0 ? (this.traceInitMaxIdent = Infinity, this.traceInitPerf = !0) : typeof p == "number" && (this.traceInitMaxIdent = p, this.traceInitPerf = !0), this.traceInitIndent = -1, this.TRACE_INIT("Lexer Constructor", () => {
40
- let t, p = !0;
41
- this.TRACE_INIT("Lexer Config handling", () => {
42
- if (this.config.lineTerminatorsPattern === h.lineTerminatorsPattern) this.config.lineTerminatorsPattern = a;
43
- else if (this.config.lineTerminatorCharacters === h.lineTerminatorCharacters) throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");
44
- if (c.safeMode && c.ensureOptimizations) throw Error("\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.");
45
- this.trackStartLines = /full|onlyStart/i.test(this.config.positionTracking), this.trackEndLines = /full/i.test(this.config.positionTracking), Array.isArray(s) ? t = {
46
- modes: { defaultMode: [...s] },
47
- defaultMode: i
48
- } : (p = !1, t = Object.assign({}, s));
49
- }), this.config.skipValidations === !1 && (this.TRACE_INIT("performRuntimeChecks", () => {
50
- this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(l(t, this.trackStartLines, this.config.lineTerminatorCharacters));
51
- }), this.TRACE_INIT("performWarningRuntimeChecks", () => {
52
- this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(u(t, this.trackStartLines, this.config.lineTerminatorCharacters));
53
- })), t.modes = t.modes ? t.modes : {}, Object.entries(t.modes).forEach(([e, n]) => {
54
- t.modes[e] = n.filter((e) => e !== void 0);
55
- });
56
- let m = Object.keys(t.modes);
57
- if (Object.entries(t.modes).forEach(([e, t]) => {
58
- this.TRACE_INIT(`Mode: <${e}> processing`, () => {
59
- if (this.modes.push(e), this.config.skipValidations === !1 && this.TRACE_INIT("validatePatterns", () => {
60
- this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(d(t, m));
61
- }), this.lexerDefinitionErrors.length === 0) {
62
- f(t);
63
- let n;
64
- this.TRACE_INIT("analyzeTokenTypes", () => {
65
- n = o(t, {
66
- lineTerminatorCharacters: this.config.lineTerminatorCharacters,
67
- positionTracking: c.positionTracking,
68
- ensureOptimizations: c.ensureOptimizations,
69
- safeMode: c.safeMode,
70
- tracer: this.TRACE_INIT
71
- });
72
- }), this.patternIdxToConfig[e] = n.patternIdxToConfig, this.charCodeToPatternIdxToConfig[e] = n.charCodeToPatternIdxToConfig, this.emptyGroups = Object.assign({}, this.emptyGroups, n.emptyGroups), this.hasCustom = n.hasCustom || this.hasCustom, this.canModeBeOptimized[e] = n.canBeOptimized;
73
- }
74
- });
75
- }), this.defaultMode = t.defaultMode, this.lexerDefinitionErrors.length > 0 && !this.config.deferDefinitionErrorsHandling) {
76
- let e = this.lexerDefinitionErrors.map((e) => e.message).join("-----------------------\n");
77
- throw Error("Errors detected in definition of Lexer:\n" + e);
78
- }
79
- this.lexerDefinitionWarning.forEach((t) => {
80
- e(t.message);
81
- }), this.TRACE_INIT("Choosing sub-methods implementations", () => {
82
- if (p && (this.handleModes = () => {}), this.trackStartLines === !1 && (this.computeNewColumn = (e) => e), this.trackEndLines === !1 && (this.updateTokenEndLineColumnLocation = () => {}), /full/i.test(this.config.positionTracking)) this.createTokenInstance = this.createFullToken;
83
- else if (/onlyStart/i.test(this.config.positionTracking)) this.createTokenInstance = this.createStartOnlyToken;
84
- else if (/onlyOffset/i.test(this.config.positionTracking)) this.createTokenInstance = this.createOffsetOnlyToken;
85
- else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);
86
- this.hasCustom ? (this.addToken = this.addTokenUsingPush, this.handlePayload = this.handlePayloadWithCustom) : (this.addToken = this.addTokenUsingMemberAccess, this.handlePayload = this.handlePayloadNoCustom);
87
- }), this.TRACE_INIT("Failed Optimization Warnings", () => {
88
- let e = Object.entries(this.canModeBeOptimized).reduce((e, [t, n]) => (n === !1 && e.push(t), e), []);
89
- if (c.ensureOptimizations && e.length > 0) throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
90
- Or inspect the console log for details on how to resolve these issues.`);
91
- }), this.TRACE_INIT("clearRegExpParserCache", () => {
92
- r();
93
- }), this.TRACE_INIT("toFastProperties", () => {
94
- n(this);
95
- });
96
- });
97
- }
98
- tokenize(e, t = this.defaultMode) {
99
- if (this.lexerDefinitionErrors.length > 0) {
100
- let e = this.lexerDefinitionErrors.map((e) => e.message).join("-----------------------\n");
101
- throw Error("Unable to Tokenize because Errors detected in definition of Lexer:\n" + e);
102
- }
103
- return this.tokenizeInternal(e, t);
104
- }
105
- tokenizeInternal(e, t) {
106
- let n, r, i, a, o, l, u, d, f, p, m, h, g, _, v, y = e, b = y.length, x = 0, S = 0, C = this.hasCustom ? 0 : Math.floor(e.length / 10), w = Array(C), T = [], E = this.trackStartLines ? 1 : void 0, D = this.trackStartLines ? 1 : void 0, O = c(this.emptyGroups), k = this.trackStartLines, A = this.config.lineTerminatorsPattern, j = 0, M = [], N = [], P = [], F = [];
107
- Object.freeze(F);
108
- let I = !1, L = (e) => {
109
- if (P.length === 1 && e.tokenType.PUSH_MODE === void 0) {
110
- let t = this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);
111
- T.push({
112
- offset: e.startOffset,
113
- line: e.startLine,
114
- column: e.startColumn,
115
- length: e.image.length,
116
- message: t
117
- });
118
- } else {
119
- P.pop();
120
- let e = P.at(-1);
121
- M = this.patternIdxToConfig[e], N = this.charCodeToPatternIdxToConfig[e], j = M.length;
122
- let t = this.canModeBeOptimized[e] && this.config.safeMode === !1;
123
- I = !!(N && t);
124
- }
125
- };
126
- function R(e) {
127
- P.push(e), N = this.charCodeToPatternIdxToConfig[e], M = this.patternIdxToConfig[e], j = M.length, j = M.length;
128
- let t = this.canModeBeOptimized[e] && this.config.safeMode === !1;
129
- I = !!(N && t);
130
- }
131
- R.call(this, t);
132
- let z, B = this.config.recoveryEnabled;
133
- for (; x < b;) {
134
- l = null, f = -1;
135
- let t = y.charCodeAt(x), c;
136
- if (I) {
137
- let e = s(t), n = N[e];
138
- c = n === void 0 ? F : n;
139
- } else c = M;
140
- let C = c.length;
141
- for (n = 0; n < C; n++) {
142
- z = c[n];
143
- let r = z.pattern;
144
- u = null;
145
- let s = z.short;
146
- if (s === !1 ? z.isCustom === !0 ? (v = r.exec(y, x, w, O), v === null ? l = null : (l = v[0], f = l.length, v.payload !== void 0 && (u = v.payload))) : (r.lastIndex = x, f = this.matchLength(r, e, x)) : t === s && (f = 1, l = r), f !== -1) {
147
- if (o = z.longerAlt, o !== void 0) {
148
- l = e.substring(x, x + f);
149
- let t = o.length;
150
- for (i = 0; i < t; i++) {
151
- let t = M[o[i]], n = t.pattern;
152
- if (d = null, t.isCustom === !0 ? (v = n.exec(y, x, w, O), v === null ? a = null : (a = v[0], v.payload !== void 0 && (d = v.payload))) : (n.lastIndex = x, a = this.match(n, e, x)), a && a.length > l.length) {
153
- l = a, f = a.length, u = d, z = t;
154
- break;
155
- }
156
- }
157
- }
158
- break;
159
- }
160
- }
161
- if (f !== -1) {
162
- if (p = z.group, p !== void 0 && (l = l === null ? e.substring(x, x + f) : l, m = z.tokenTypeIdx, h = this.createTokenInstance(l, x, m, z.tokenType, E, D, f), this.handlePayload(h, u), p === !1 ? S = this.addToken(w, S, h) : O[p].push(h)), k === !0 && z.canLineTerminator === !0) {
163
- let t = 0, n, r;
164
- A.lastIndex = 0;
165
- do
166
- l = l === null ? e.substring(x, x + f) : l, n = A.test(l), n === !0 && (r = A.lastIndex - 1, t++);
167
- while (n === !0);
168
- t === 0 ? D = this.computeNewColumn(D, f) : (E += t, D = f - r, this.updateTokenEndLineColumnLocation(h, p, r, t, E, D, f));
169
- } else D = this.computeNewColumn(D, f);
170
- x += f, this.handleModes(z, L, R, h);
171
- } else {
172
- let t = x, n = E, i = D, a = B === !1;
173
- for (; a === !1 && x < b;) for (x++, r = 0; r < j; r++) {
174
- let t = M[r], n = t.pattern, i = t.short;
175
- if (i === !1 ? t.isCustom === !0 ? a = n.exec(y, x, w, O) !== null : (n.lastIndex = x, a = n.exec(e) !== null) : y.charCodeAt(x) === i && (a = !0), a === !0) break;
176
- }
177
- if (g = x - t, D = this.computeNewColumn(D, g), _ = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y, t, g, n, i, P.at(-1)), T.push({
178
- offset: t,
179
- line: n,
180
- column: i,
181
- length: g,
182
- message: _
183
- }), B === !1) break;
184
- }
185
- }
186
- return this.hasCustom || (w.length = S), {
187
- tokens: w,
188
- groups: O,
189
- errors: T
190
- };
191
- }
192
- handleModes(e, t, n, r) {
193
- if (e.pop === !0) {
194
- let i = e.push;
195
- t(r), i !== void 0 && n.call(this, i);
196
- } else e.push !== void 0 && n.call(this, e.push);
197
- }
198
- updateTokenEndLineColumnLocation(e, t, n, r, i, a, o) {
199
- let s, c;
200
- t !== void 0 && (s = n === o - 1, c = s ? -1 : 0, r === 1 && s === !0 || (e.endLine = i + c, e.endColumn = a - 1 + -c));
201
- }
202
- computeNewColumn(e, t) {
203
- return e + t;
204
- }
205
- createOffsetOnlyToken(e, t, n, r) {
206
- return {
207
- image: e,
208
- startOffset: t,
209
- tokenTypeIdx: n,
210
- tokenType: r
211
- };
212
- }
213
- createStartOnlyToken(e, t, n, r, i, a) {
214
- return {
215
- image: e,
216
- startOffset: t,
217
- startLine: i,
218
- startColumn: a,
219
- tokenTypeIdx: n,
220
- tokenType: r
221
- };
222
- }
223
- createFullToken(e, t, n, r, i, a, o) {
224
- return {
225
- image: e,
226
- startOffset: t,
227
- endOffset: t + o - 1,
228
- startLine: i,
229
- endLine: i,
230
- startColumn: a,
231
- endColumn: a + o - 1,
232
- tokenTypeIdx: n,
233
- tokenType: r
234
- };
235
- }
236
- addTokenUsingPush(e, t, n) {
237
- return e.push(n), t;
238
- }
239
- addTokenUsingMemberAccess(e, t, n) {
240
- return e[t] = n, t++, t;
241
- }
242
- handlePayloadNoCustom(e, t) {}
243
- handlePayloadWithCustom(e, t) {
244
- t !== null && (e.payload = t);
245
- }
246
- match(e, t, n) {
247
- return e.test(t) === !0 ? t.substring(n, e.lastIndex) : null;
248
- }
249
- matchLength(e, t, n) {
250
- return e.test(t) === !0 ? e.lastIndex - n : -1;
251
- }
252
- };
253
- g.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.", g.NA = /NOT_APPLICABLE/;
254
- //#endregion
255
- export { g as Lexer, m as LexerDefinitionErrorType };
256
-
257
- //# sourceMappingURL=lexer_public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lexer_public.js","names":[],"sources":["../../../../../../../../../node_modules/chevrotain/lib/src/scan/lexer_public.js"],"sourcesContent":["import { analyzeTokenTypes, charCodeToOptimizedIndex, cloneEmptyGroups, DEFAULT_MODE, LineTerminatorOptimizedTester, performRuntimeChecks, performWarningRuntimeChecks, validatePatterns, } from \"./lexer.js\";\nimport { PRINT_WARNING, timer, toFastProperties } from \"@chevrotain/utils\";\nimport { augmentTokenTypes } from \"./tokens.js\";\nimport { defaultLexerErrorProvider } from \"./lexer_errors_public.js\";\nimport { clearRegExpParserCache } from \"./reg_exp_parser.js\";\nexport var LexerDefinitionErrorType;\n(function (LexerDefinitionErrorType) {\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"MISSING_PATTERN\"] = 0] = \"MISSING_PATTERN\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"INVALID_PATTERN\"] = 1] = \"INVALID_PATTERN\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"EOI_ANCHOR_FOUND\"] = 2] = \"EOI_ANCHOR_FOUND\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"UNSUPPORTED_FLAGS_FOUND\"] = 3] = \"UNSUPPORTED_FLAGS_FOUND\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"DUPLICATE_PATTERNS_FOUND\"] = 4] = \"DUPLICATE_PATTERNS_FOUND\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"INVALID_GROUP_TYPE_FOUND\"] = 5] = \"INVALID_GROUP_TYPE_FOUND\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"PUSH_MODE_DOES_NOT_EXIST\"] = 6] = \"PUSH_MODE_DOES_NOT_EXIST\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE\"] = 7] = \"MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY\"] = 8] = \"MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST\"] = 9] = \"MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED\"] = 10] = \"LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"SOI_ANCHOR_FOUND\"] = 11] = \"SOI_ANCHOR_FOUND\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"EMPTY_MATCH_PATTERN\"] = 12] = \"EMPTY_MATCH_PATTERN\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"NO_LINE_BREAKS_FLAGS\"] = 13] = \"NO_LINE_BREAKS_FLAGS\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"UNREACHABLE_PATTERN\"] = 14] = \"UNREACHABLE_PATTERN\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"IDENTIFY_TERMINATOR\"] = 15] = \"IDENTIFY_TERMINATOR\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"CUSTOM_LINE_BREAK\"] = 16] = \"CUSTOM_LINE_BREAK\";\n LexerDefinitionErrorType[LexerDefinitionErrorType[\"MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE\"] = 17] = \"MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE\";\n})(LexerDefinitionErrorType || (LexerDefinitionErrorType = {}));\nconst DEFAULT_LEXER_CONFIG = {\n deferDefinitionErrorsHandling: false,\n positionTracking: \"full\",\n lineTerminatorsPattern: /\\n|\\r\\n?/g,\n lineTerminatorCharacters: [\"\\n\", \"\\r\"],\n ensureOptimizations: false,\n safeMode: false,\n errorMessageProvider: defaultLexerErrorProvider,\n traceInitPerf: false,\n skipValidations: false,\n recoveryEnabled: true,\n};\nObject.freeze(DEFAULT_LEXER_CONFIG);\nexport class Lexer {\n constructor(lexerDefinition, config = DEFAULT_LEXER_CONFIG) {\n this.lexerDefinition = lexerDefinition;\n this.lexerDefinitionErrors = [];\n this.lexerDefinitionWarning = [];\n this.patternIdxToConfig = {};\n this.charCodeToPatternIdxToConfig = {};\n this.modes = [];\n this.emptyGroups = {};\n this.trackStartLines = true;\n this.trackEndLines = true;\n this.hasCustom = false;\n this.canModeBeOptimized = {};\n // Duplicated from the parser's perf trace trait to allow future extraction\n // of the lexer to a separate package.\n this.TRACE_INIT = (phaseDesc, phaseImpl) => {\n // No need to optimize this using NOOP pattern because\n // It is not called in a hot spot...\n if (this.traceInitPerf === true) {\n this.traceInitIndent++;\n const indent = new Array(this.traceInitIndent + 1).join(\"\\t\");\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n console.log(`${indent}--> <${phaseDesc}>`);\n }\n const { time, value } = timer(phaseImpl);\n /* istanbul ignore next - Difficult to reproduce specific performance behavior (>10ms) in tests */\n const traceMethod = time > 10 ? console.warn : console.log;\n if (this.traceInitIndent < this.traceInitMaxIdent) {\n traceMethod(`${indent}<-- <${phaseDesc}> time: ${time}ms`);\n }\n this.traceInitIndent--;\n return value;\n }\n else {\n return phaseImpl();\n }\n };\n if (typeof config === \"boolean\") {\n throw Error(\"The second argument to the Lexer constructor is now an ILexerConfig Object.\\n\" +\n \"a boolean 2nd argument is no longer supported\");\n }\n this.config = Object.assign({}, DEFAULT_LEXER_CONFIG, config);\n const traceInitVal = this.config.traceInitPerf;\n if (traceInitVal === true) {\n this.traceInitMaxIdent = Infinity;\n this.traceInitPerf = true;\n }\n else if (typeof traceInitVal === \"number\") {\n this.traceInitMaxIdent = traceInitVal;\n this.traceInitPerf = true;\n }\n this.traceInitIndent = -1;\n this.TRACE_INIT(\"Lexer Constructor\", () => {\n let actualDefinition;\n let hasOnlySingleMode = true;\n this.TRACE_INIT(\"Lexer Config handling\", () => {\n if (this.config.lineTerminatorsPattern ===\n DEFAULT_LEXER_CONFIG.lineTerminatorsPattern) {\n // optimized built-in implementation for the defaults definition of lineTerminators\n this.config.lineTerminatorsPattern = LineTerminatorOptimizedTester;\n }\n else {\n if (this.config.lineTerminatorCharacters ===\n DEFAULT_LEXER_CONFIG.lineTerminatorCharacters) {\n throw Error(\"Error: Missing <lineTerminatorCharacters> property on the Lexer config.\\n\" +\n \"\\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS\");\n }\n }\n if (config.safeMode && config.ensureOptimizations) {\n throw Error('\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.');\n }\n this.trackStartLines = /full|onlyStart/i.test(this.config.positionTracking);\n this.trackEndLines = /full/i.test(this.config.positionTracking);\n // Convert SingleModeLexerDefinition into a IMultiModeLexerDefinition.\n if (Array.isArray(lexerDefinition)) {\n actualDefinition = {\n modes: { defaultMode: [...lexerDefinition] },\n defaultMode: DEFAULT_MODE,\n };\n }\n else {\n // no conversion needed, input should already be a IMultiModeLexerDefinition\n hasOnlySingleMode = false;\n actualDefinition = Object.assign({}, lexerDefinition);\n }\n });\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(\"performRuntimeChecks\", () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(performRuntimeChecks(actualDefinition, this.trackStartLines, this.config.lineTerminatorCharacters));\n });\n this.TRACE_INIT(\"performWarningRuntimeChecks\", () => {\n this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(performWarningRuntimeChecks(actualDefinition, this.trackStartLines, this.config.lineTerminatorCharacters));\n });\n }\n // for extra robustness to avoid throwing a none informative error message\n actualDefinition.modes = actualDefinition.modes\n ? actualDefinition.modes\n : {};\n // an error of undefined TokenTypes will be detected in \"performRuntimeChecks\" above.\n // this transformation is to increase robustness in the case of partially invalid lexer definition.\n Object.entries(actualDefinition.modes).forEach(([currModeName, currModeValue]) => {\n actualDefinition.modes[currModeName] = currModeValue.filter((currTokType) => currTokType !== undefined);\n });\n const allModeNames = Object.keys(actualDefinition.modes);\n Object.entries(actualDefinition.modes).forEach(([currModName, currModDef]) => {\n this.TRACE_INIT(`Mode: <${currModName}> processing`, () => {\n this.modes.push(currModName);\n if (this.config.skipValidations === false) {\n this.TRACE_INIT(`validatePatterns`, () => {\n this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(validatePatterns(currModDef, allModeNames));\n });\n }\n // If definition errors were encountered, the analysis phase may fail unexpectedly/\n // Considering a lexer with definition errors may never be used, there is no point\n // to performing the analysis anyhow...\n if (this.lexerDefinitionErrors.length === 0) {\n augmentTokenTypes(currModDef);\n let currAnalyzeResult;\n this.TRACE_INIT(`analyzeTokenTypes`, () => {\n currAnalyzeResult = analyzeTokenTypes(currModDef, {\n lineTerminatorCharacters: this.config.lineTerminatorCharacters,\n positionTracking: config.positionTracking,\n ensureOptimizations: config.ensureOptimizations,\n safeMode: config.safeMode,\n tracer: this.TRACE_INIT,\n });\n });\n this.patternIdxToConfig[currModName] =\n currAnalyzeResult.patternIdxToConfig;\n this.charCodeToPatternIdxToConfig[currModName] =\n currAnalyzeResult.charCodeToPatternIdxToConfig;\n this.emptyGroups = Object.assign({}, this.emptyGroups, currAnalyzeResult.emptyGroups);\n this.hasCustom = currAnalyzeResult.hasCustom || this.hasCustom;\n this.canModeBeOptimized[currModName] =\n currAnalyzeResult.canBeOptimized;\n }\n });\n });\n this.defaultMode = actualDefinition.defaultMode;\n if (this.lexerDefinitionErrors.length > 0 &&\n !this.config.deferDefinitionErrorsHandling) {\n const allErrMessages = this.lexerDefinitionErrors.map((error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\"-----------------------\\n\");\n throw new Error(\"Errors detected in definition of Lexer:\\n\" + allErrMessagesString);\n }\n // Only print warning if there are no errors, This will avoid pl\n this.lexerDefinitionWarning.forEach((warningDescriptor) => {\n PRINT_WARNING(warningDescriptor.message);\n });\n this.TRACE_INIT(\"Choosing sub-methods implementations\", () => {\n // Choose the relevant internal implementations for this specific parser.\n // These implementations should be in-lined by the JavaScript engine\n // to provide optimal performance in each scenario.\n if (hasOnlySingleMode) {\n this.handleModes = () => { };\n }\n if (this.trackStartLines === false) {\n this.computeNewColumn = (x) => x;\n }\n if (this.trackEndLines === false) {\n this.updateTokenEndLineColumnLocation = () => { };\n }\n if (/full/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createFullToken;\n }\n else if (/onlyStart/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createStartOnlyToken;\n }\n else if (/onlyOffset/i.test(this.config.positionTracking)) {\n this.createTokenInstance = this.createOffsetOnlyToken;\n }\n else {\n throw Error(`Invalid <positionTracking> config option: \"${this.config.positionTracking}\"`);\n }\n if (this.hasCustom) {\n this.addToken = this.addTokenUsingPush;\n this.handlePayload = this.handlePayloadWithCustom;\n }\n else {\n this.addToken = this.addTokenUsingMemberAccess;\n this.handlePayload = this.handlePayloadNoCustom;\n }\n });\n this.TRACE_INIT(\"Failed Optimization Warnings\", () => {\n const unOptimizedModes = Object.entries(this.canModeBeOptimized).reduce((cannotBeOptimized, [modeName, canBeOptimized]) => {\n if (canBeOptimized === false) {\n cannotBeOptimized.push(modeName);\n }\n return cannotBeOptimized;\n }, []);\n if (config.ensureOptimizations && unOptimizedModes.length > 0) {\n throw Error(`Lexer Modes: < ${unOptimizedModes.join(\", \")} > cannot be optimized.\\n` +\n '\\t Disable the \"ensureOptimizations\" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\\n' +\n \"\\t Or inspect the console log for details on how to resolve these issues.\");\n }\n });\n this.TRACE_INIT(\"clearRegExpParserCache\", () => {\n clearRegExpParserCache();\n });\n this.TRACE_INIT(\"toFastProperties\", () => {\n toFastProperties(this);\n });\n });\n }\n tokenize(text, initialMode = this.defaultMode) {\n if (this.lexerDefinitionErrors.length > 0) {\n const allErrMessages = this.lexerDefinitionErrors.map((error) => {\n return error.message;\n });\n const allErrMessagesString = allErrMessages.join(\"-----------------------\\n\");\n throw new Error(\"Unable to Tokenize because Errors detected in definition of Lexer:\\n\" +\n allErrMessagesString);\n }\n return this.tokenizeInternal(text, initialMode);\n }\n // There is quite a bit of duplication between this and \"tokenizeInternalLazy\"\n // This is intentional due to performance considerations.\n // this method also used quite a bit of `!` none null assertions because it is too optimized\n // for `tsc` to always understand it is \"safe\"\n tokenizeInternal(text, initialMode) {\n let i, j, k, matchAltImage, longerAlt, matchedImage, payload, altPayload, imageLength, group, tokType, newToken, errLength, msg, match;\n const orgText = text;\n const orgLength = orgText.length;\n let offset = 0;\n let matchedTokensIndex = 0;\n // initializing the tokensArray to the \"guessed\" size.\n // guessing too little will still reduce the number of array re-sizes on pushes.\n // guessing too large (Tested by guessing x4 too large) may cost a bit more of memory\n // but would still have a faster runtime by avoiding (All but one) array resizing.\n const guessedNumberOfTokens = this.hasCustom\n ? 0 // will break custom token pattern APIs the matchedTokens array will contain undefined elements.\n : Math.floor(text.length / 10);\n const matchedTokens = new Array(guessedNumberOfTokens);\n const errors = [];\n let line = this.trackStartLines ? 1 : undefined;\n let column = this.trackStartLines ? 1 : undefined;\n const groups = cloneEmptyGroups(this.emptyGroups);\n const trackLines = this.trackStartLines;\n const lineTerminatorPattern = this.config.lineTerminatorsPattern;\n let currModePatternsLength = 0;\n let patternIdxToConfig = [];\n let currCharCodeToPatternIdxToConfig = [];\n const modeStack = [];\n const emptyArray = [];\n Object.freeze(emptyArray);\n let isOptimizedMode = false;\n const pop_mode = (popToken) => {\n // TODO: perhaps avoid this error in the edge case there is no more input?\n if (modeStack.length === 1 &&\n // if we have both a POP_MODE and a PUSH_MODE this is in-fact a \"transition\"\n // So no error should occur.\n popToken.tokenType.PUSH_MODE === undefined) {\n // if we try to pop the last mode there lexer will no longer have ANY mode.\n // thus the pop is ignored, an error will be created and the lexer will continue parsing in the previous mode.\n const msg = this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(popToken);\n errors.push({\n offset: popToken.startOffset,\n line: popToken.startLine,\n column: popToken.startColumn,\n length: popToken.image.length,\n message: msg,\n });\n }\n else {\n modeStack.pop();\n const newMode = modeStack.at(-1);\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized = this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n isOptimizedMode = true;\n }\n else {\n isOptimizedMode = false;\n }\n }\n };\n function push_mode(newMode) {\n modeStack.push(newMode);\n currCharCodeToPatternIdxToConfig =\n this.charCodeToPatternIdxToConfig[newMode];\n patternIdxToConfig = this.patternIdxToConfig[newMode];\n currModePatternsLength = patternIdxToConfig.length;\n currModePatternsLength = patternIdxToConfig.length;\n const modeCanBeOptimized = this.canModeBeOptimized[newMode] && this.config.safeMode === false;\n if (currCharCodeToPatternIdxToConfig && modeCanBeOptimized) {\n isOptimizedMode = true;\n }\n else {\n isOptimizedMode = false;\n }\n }\n // this pattern seems to avoid a V8 de-optimization, although that de-optimization does not\n // seem to matter performance wise.\n push_mode.call(this, initialMode);\n let currConfig;\n const recoveryEnabled = this.config.recoveryEnabled;\n while (offset < orgLength) {\n matchedImage = null;\n imageLength = -1;\n const nextCharCode = orgText.charCodeAt(offset);\n let chosenPatternIdxToConfig;\n if (isOptimizedMode) {\n const optimizedCharIdx = charCodeToOptimizedIndex(nextCharCode);\n const possiblePatterns = currCharCodeToPatternIdxToConfig[optimizedCharIdx];\n chosenPatternIdxToConfig =\n possiblePatterns !== undefined ? possiblePatterns : emptyArray;\n }\n else {\n chosenPatternIdxToConfig = patternIdxToConfig;\n }\n const chosenPatternsLength = chosenPatternIdxToConfig.length;\n for (i = 0; i < chosenPatternsLength; i++) {\n currConfig = chosenPatternIdxToConfig[i];\n const currPattern = currConfig.pattern;\n payload = null;\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (nextCharCode === singleCharCode) {\n // single character string\n imageLength = 1;\n matchedImage = currPattern;\n }\n }\n else if (currConfig.isCustom === true) {\n match = currPattern.exec(orgText, offset, matchedTokens, groups);\n if (match !== null) {\n matchedImage = match[0];\n imageLength = matchedImage.length;\n if (match.payload !== undefined) {\n payload = match.payload;\n }\n }\n else {\n matchedImage = null;\n }\n }\n else {\n currPattern.lastIndex = offset;\n imageLength = this.matchLength(currPattern, text, offset);\n }\n // longer alts handling\n if (imageLength !== -1) {\n // even though this pattern matched we must try a another longer alternative.\n // this can be used to prioritize keywords over identifiers\n longerAlt = currConfig.longerAlt;\n if (longerAlt !== undefined) {\n matchedImage = text.substring(offset, offset + imageLength);\n const longerAltLength = longerAlt.length;\n for (k = 0; k < longerAltLength; k++) {\n const longerAltConfig = patternIdxToConfig[longerAlt[k]];\n const longerAltPattern = longerAltConfig.pattern;\n altPayload = null;\n // single Char can never be a longer alt so no need to test it.\n // manually in-lined because > 600 chars won't be in-lined in V8\n if (longerAltConfig.isCustom === true) {\n match = longerAltPattern.exec(orgText, offset, matchedTokens, groups);\n if (match !== null) {\n matchAltImage = match[0];\n if (match.payload !== undefined) {\n altPayload = match.payload;\n }\n }\n else {\n matchAltImage = null;\n }\n }\n else {\n longerAltPattern.lastIndex = offset;\n matchAltImage = this.match(longerAltPattern, text, offset);\n }\n if (matchAltImage && matchAltImage.length > matchedImage.length) {\n matchedImage = matchAltImage;\n imageLength = matchAltImage.length;\n payload = altPayload;\n currConfig = longerAltConfig;\n // Exit the loop early after matching one of the longer alternatives\n // The first matched alternative takes precedence\n break;\n }\n }\n }\n break;\n }\n }\n // successful match\n if (imageLength !== -1) {\n group = currConfig.group;\n if (group !== undefined) {\n matchedImage =\n matchedImage !== null\n ? matchedImage // for custom Tokens we will already have the `matchedImage`\n : text.substring(offset, offset + imageLength);\n tokType = currConfig.tokenTypeIdx;\n newToken = this.createTokenInstance(matchedImage, offset, tokType, currConfig.tokenType, line, column, imageLength);\n this.handlePayload(newToken, payload);\n if (group === false) {\n matchedTokensIndex = this.addToken(matchedTokens, matchedTokensIndex, newToken);\n }\n else {\n groups[group].push(newToken);\n }\n }\n // line terminator handling\n if (trackLines === true && currConfig.canLineTerminator === true) {\n let numOfLTsInMatch = 0;\n let foundTerminator;\n let lastLTEndOffset;\n lineTerminatorPattern.lastIndex = 0;\n do {\n // only for skipped tokens the matchedImage may be null at this point\n matchedImage =\n matchedImage !== null\n ? matchedImage\n : text.substring(offset, offset + imageLength);\n foundTerminator = lineTerminatorPattern.test(matchedImage);\n if (foundTerminator === true) {\n lastLTEndOffset = lineTerminatorPattern.lastIndex - 1;\n numOfLTsInMatch++;\n }\n } while (foundTerminator === true);\n if (numOfLTsInMatch !== 0) {\n line = line + numOfLTsInMatch;\n column = imageLength - lastLTEndOffset;\n this.updateTokenEndLineColumnLocation(newToken, group, lastLTEndOffset, numOfLTsInMatch, line, column, imageLength);\n }\n else {\n column = this.computeNewColumn(column, imageLength);\n }\n }\n else {\n column = this.computeNewColumn(column, imageLength);\n }\n offset = offset + imageLength;\n // will be NOOP if no modes present\n this.handleModes(currConfig, pop_mode, push_mode, newToken);\n }\n else {\n // error recovery, drop characters until we identify a valid token's start point\n const errorStartOffset = offset;\n const errorLine = line;\n const errorColumn = column;\n let foundResyncPoint = recoveryEnabled === false;\n while (foundResyncPoint === false && offset < orgLength) {\n offset++;\n for (j = 0; j < currModePatternsLength; j++) {\n const currConfig = patternIdxToConfig[j];\n const currPattern = currConfig.pattern;\n // manually in-lined because > 600 chars won't be in-lined in V8\n const singleCharCode = currConfig.short;\n if (singleCharCode !== false) {\n if (orgText.charCodeAt(offset) === singleCharCode) {\n // single character string\n foundResyncPoint = true;\n }\n }\n else if (currConfig.isCustom === true) {\n foundResyncPoint =\n currPattern.exec(orgText, offset, matchedTokens, groups) !== null;\n }\n else {\n currPattern.lastIndex = offset;\n foundResyncPoint = currPattern.exec(text) !== null;\n }\n if (foundResyncPoint === true) {\n break;\n }\n }\n }\n errLength = offset - errorStartOffset;\n column = this.computeNewColumn(column, errLength);\n // at this point we either re-synced or reached the end of the input text\n msg = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(orgText, errorStartOffset, errLength, errorLine, errorColumn, modeStack.at(-1));\n errors.push({\n offset: errorStartOffset,\n line: errorLine,\n column: errorColumn,\n length: errLength,\n message: msg,\n });\n if (recoveryEnabled === false) {\n break;\n }\n }\n }\n // if we do have custom patterns which push directly into the\n // TODO: custom tokens should not push directly??\n if (!this.hasCustom) {\n // if we guessed a too large size for the tokens array this will shrink it to the right size.\n matchedTokens.length = matchedTokensIndex;\n }\n return {\n tokens: matchedTokens,\n groups: groups,\n errors: errors,\n };\n }\n handleModes(config, pop_mode, push_mode, newToken) {\n if (config.pop === true) {\n // need to save the PUSH_MODE property as if the mode is popped\n // patternIdxToPopMode is updated to reflect the new mode after popping the stack\n const pushMode = config.push;\n pop_mode(newToken);\n if (pushMode !== undefined) {\n push_mode.call(this, pushMode);\n }\n }\n else if (config.push !== undefined) {\n push_mode.call(this, config.push);\n }\n }\n // TODO: decrease this under 600 characters? inspect stripping comments option in TSC compiler\n updateTokenEndLineColumnLocation(newToken, group, lastLTIdx, numOfLTsInMatch, line, column, imageLength) {\n let lastCharIsLT, fixForEndingInLT;\n if (group !== undefined) {\n // a none skipped multi line Token, need to update endLine/endColumn\n lastCharIsLT = lastLTIdx === imageLength - 1;\n fixForEndingInLT = lastCharIsLT ? -1 : 0;\n if (!(numOfLTsInMatch === 1 && lastCharIsLT === true)) {\n // if a token ends in a LT that last LT only affects the line numbering of following Tokens\n newToken.endLine = line + fixForEndingInLT;\n // the last LT in a token does not affect the endColumn either as the [columnStart ... columnEnd)\n // inclusive to exclusive range.\n newToken.endColumn = column - 1 + -fixForEndingInLT;\n }\n // else single LT in the last character of a token, no need to modify the endLine/EndColumn\n }\n }\n computeNewColumn(oldColumn, imageLength) {\n return oldColumn + imageLength;\n }\n createOffsetOnlyToken(image, startOffset, tokenTypeIdx, tokenType) {\n return {\n image,\n startOffset,\n tokenTypeIdx,\n tokenType,\n };\n }\n createStartOnlyToken(image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn) {\n return {\n image,\n startOffset,\n startLine,\n startColumn,\n tokenTypeIdx,\n tokenType,\n };\n }\n createFullToken(image, startOffset, tokenTypeIdx, tokenType, startLine, startColumn, imageLength) {\n return {\n image,\n startOffset,\n endOffset: startOffset + imageLength - 1,\n startLine,\n endLine: startLine,\n startColumn,\n endColumn: startColumn + imageLength - 1,\n tokenTypeIdx,\n tokenType,\n };\n }\n addTokenUsingPush(tokenVector, index, tokenToAdd) {\n tokenVector.push(tokenToAdd);\n return index;\n }\n addTokenUsingMemberAccess(tokenVector, index, tokenToAdd) {\n tokenVector[index] = tokenToAdd;\n index++;\n return index;\n }\n handlePayloadNoCustom(token, payload) { }\n handlePayloadWithCustom(token, payload) {\n if (payload !== null) {\n token.payload = payload;\n }\n }\n match(pattern, text, offset) {\n const found = pattern.test(text);\n if (found === true) {\n return text.substring(offset, pattern.lastIndex);\n }\n return null;\n }\n matchLength(pattern, text, offset) {\n const found = pattern.test(text);\n if (found === true) {\n return pattern.lastIndex - offset;\n }\n return -1;\n }\n}\nLexer.SKIPPED = \"This marks a skipped Token pattern, this means each token identified by it will \" +\n \"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.\";\nLexer.NA = /NOT_APPLICABLE/;\n//# sourceMappingURL=lexer_public.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAKA,IAAW;CACV,SAAU,GAA0B;CAkBjC,AAjBA,EAAyB,EAAyB,kBAAqB,KAAK,mBAC5E,EAAyB,EAAyB,kBAAqB,KAAK,mBAC5E,EAAyB,EAAyB,mBAAsB,KAAK,oBAC7E,EAAyB,EAAyB,0BAA6B,KAAK,2BACpF,EAAyB,EAAyB,2BAA8B,KAAK,4BACrF,EAAyB,EAAyB,2BAA8B,KAAK,4BACrF,EAAyB,EAAyB,2BAA8B,KAAK,4BACrF,EAAyB,EAAyB,wCAA2C,KAAK,yCAClG,EAAyB,EAAyB,0CAA6C,KAAK,2CACpG,EAAyB,EAAyB,qDAAwD,KAAK,sDAC/G,EAAyB,EAAyB,4CAA+C,MAAM,6CACvG,EAAyB,EAAyB,mBAAsB,MAAM,oBAC9E,EAAyB,EAAyB,sBAAyB,MAAM,uBACjF,EAAyB,EAAyB,uBAA0B,MAAM,wBAClF,EAAyB,EAAyB,sBAAyB,MAAM,uBACjF,EAAyB,EAAyB,sBAAyB,MAAM,uBACjF,EAAyB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