less 3.10.1 → 3.11.1

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 (1038) hide show
  1. package/.github/FUNDING.yml +12 -0
  2. package/CONTRIBUTING.md +2 -2
  3. package/Gruntfile.js +42 -212
  4. package/README.md +31 -1
  5. package/bin/lessc +10787 -12604
  6. package/dist/less.cjs.js +10411 -12115
  7. package/dist/less.js +10680 -13459
  8. package/dist/less.min.js +3 -3
  9. package/dist/less.min.js.map +1 -1
  10. package/lib/less/environment/abstract-file-manager.js +1 -1
  11. package/lib/less/functions/list.js +2 -1
  12. package/lib/less/functions/string.js +1 -2
  13. package/lib/less/index.js +1 -1
  14. package/lib/less/less-error.js +22 -2
  15. package/lib/less/parser/parser.js +9 -12
  16. package/lib/less/tree/namespace-value.js +1 -2
  17. package/lib/less/tree/quoted.js +3 -0
  18. package/lib/less/visitors/visitor.js +10 -2
  19. package/lib/less-node/file-manager.js +19 -49
  20. package/lib/lessc.js +2 -21
  21. package/package.json +17 -14
  22. package/packages/css-parser/node_modules/chevrotain/CHANGELOG.md +2 -0
  23. package/packages/css-parser/node_modules/chevrotain/LICENSE.txt +202 -0
  24. package/packages/css-parser/node_modules/chevrotain/README.md +20 -0
  25. package/packages/css-parser/node_modules/chevrotain/diagrams/README.md +1 -0
  26. package/packages/css-parser/node_modules/chevrotain/diagrams/diagrams.css +85 -0
  27. package/packages/css-parser/node_modules/chevrotain/diagrams/src/diagrams_behavior.js +225 -0
  28. package/packages/css-parser/node_modules/chevrotain/diagrams/src/diagrams_builder.js +211 -0
  29. package/packages/css-parser/node_modules/chevrotain/diagrams/src/diagrams_serializer.js +20 -0
  30. package/packages/css-parser/node_modules/chevrotain/diagrams/src/main.js +38 -0
  31. package/packages/css-parser/node_modules/chevrotain/diagrams/vendor/railroad-diagrams.js +1042 -0
  32. package/packages/css-parser/node_modules/chevrotain/lib/chevrotain.d.ts +2961 -0
  33. package/packages/css-parser/node_modules/chevrotain/lib/chevrotain.js +9785 -0
  34. package/packages/css-parser/node_modules/chevrotain/lib/chevrotain.min.js +2 -0
  35. package/packages/css-parser/node_modules/chevrotain/lib/src/api.js +70 -0
  36. package/packages/css-parser/node_modules/chevrotain/lib/src/diagrams/render_public.js +15 -0
  37. package/packages/css-parser/node_modules/chevrotain/lib/src/generate/generate.js +142 -0
  38. package/packages/css-parser/node_modules/chevrotain/lib/src/generate/generate_public.js +21 -0
  39. package/packages/css-parser/node_modules/chevrotain/lib/src/lang/lang_extensions.js +42 -0
  40. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/constants.js +5 -0
  41. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/cst/cst.js +194 -0
  42. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +129 -0
  43. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/errors_public.js +205 -0
  44. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/exceptions_public.js +58 -0
  45. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/checks.js +590 -0
  46. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/first.js +63 -0
  47. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/follow.js +67 -0
  48. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/gast/gast.js +170 -0
  49. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_public.js +262 -0
  50. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +39 -0
  51. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_visitor_public.js +48 -0
  52. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +548 -0
  53. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/keys.js +42 -0
  54. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +502 -0
  55. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +59 -0
  56. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/grammar/rest.js +112 -0
  57. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/parser.js +235 -0
  58. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +28 -0
  59. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +83 -0
  60. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +318 -0
  61. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +76 -0
  62. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +108 -0
  63. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/parser_traits.js +7 -0
  64. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +53 -0
  65. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +343 -0
  66. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +645 -0
  67. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +309 -0
  68. package/packages/css-parser/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +290 -0
  69. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/lexer.js +910 -0
  70. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +11 -0
  71. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/lexer_public.js +674 -0
  72. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/reg_exp.js +265 -0
  73. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +22 -0
  74. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/tokens.js +129 -0
  75. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/tokens_constants.js +4 -0
  76. package/packages/css-parser/node_modules/chevrotain/lib/src/scan/tokens_public.js +95 -0
  77. package/packages/css-parser/node_modules/chevrotain/lib/src/text/range.js +33 -0
  78. package/packages/css-parser/node_modules/chevrotain/lib/src/utils/utils.js +473 -0
  79. package/packages/css-parser/node_modules/chevrotain/lib/src/version.js +7 -0
  80. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/api.js +25 -0
  81. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/diagrams/render_public.js +12 -0
  82. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/generate/generate.js +131 -0
  83. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/generate/generate_public.js +17 -0
  84. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js +37 -0
  85. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/constants.js +3 -0
  86. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/cst/cst.js +187 -0
  87. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js +121 -0
  88. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/errors_public.js +203 -0
  89. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js +51 -0
  90. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js +574 -0
  91. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js +57 -0
  92. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js +62 -0
  93. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js +163 -0
  94. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js +258 -0
  95. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js +34 -0
  96. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js +46 -0
  97. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js +544 -0
  98. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js +38 -0
  99. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js +489 -0
  100. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js +56 -0
  101. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js +110 -0
  102. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js +232 -0
  103. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js +26 -0
  104. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js +81 -0
  105. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js +316 -0
  106. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js +74 -0
  107. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js +106 -0
  108. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/parser_traits.js +5 -0
  109. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js +51 -0
  110. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js +341 -0
  111. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js +643 -0
  112. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js +305 -0
  113. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js +288 -0
  114. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/lexer.js +885 -0
  115. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js +9 -0
  116. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js +672 -0
  117. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/reg_exp.js +260 -0
  118. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js +18 -0
  119. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/tokens.js +114 -0
  120. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/tokens_constants.js +2 -0
  121. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js +87 -0
  122. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/text/range.js +30 -0
  123. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/utils/utils.js +420 -0
  124. package/packages/css-parser/node_modules/chevrotain/lib_esm/src/version.js +5 -0
  125. package/packages/css-parser/node_modules/chevrotain/package.json +142 -0
  126. package/{test/browser/vendor → packages/less/.grunt/grunt-contrib-jasmine}/boot.js +8 -4
  127. package/packages/less/.grunt/grunt-contrib-jasmine/jasmine-html.js +473 -0
  128. package/packages/less/.grunt/grunt-contrib-jasmine/jasmine.css +58 -0
  129. package/packages/less/.grunt/grunt-contrib-jasmine/jasmine.js +3454 -0
  130. package/packages/less/.grunt/grunt-contrib-jasmine/jasmine_favicon.png +0 -0
  131. package/packages/less/.grunt/grunt-contrib-jasmine/json2.js +489 -0
  132. package/packages/less/.grunt/grunt-contrib-jasmine/reporter.js +132 -0
  133. package/packages/less/node_modules/@types/jasmine/LICENSE +21 -0
  134. package/packages/less/node_modules/@types/jasmine/README.md +16 -0
  135. package/packages/less/node_modules/@types/jasmine/index.d.ts +954 -0
  136. package/packages/less/node_modules/@types/jasmine/package.json +96 -0
  137. package/packages/less/node_modules/@types/jasmine/ts3.1/index.d.ts +980 -0
  138. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/CHANGELOG.md +263 -0
  139. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/LICENSE +21 -0
  140. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/README.md +187 -0
  141. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.json +75 -0
  142. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.json +7 -0
  143. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js +54 -0
  144. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map +1 -0
  145. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.json +37 -0
  146. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +19 -0
  147. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map +1 -0
  148. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +124 -0
  149. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +1 -0
  150. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +223 -0
  151. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -0
  152. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +50 -0
  153. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map +1 -0
  154. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-ignore.js +47 -0
  155. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-ignore.js.map +1 -0
  156. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +113 -0
  157. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -0
  158. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/camelcase.js +109 -0
  159. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/camelcase.js.map +1 -0
  160. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-name-casing.js +91 -0
  161. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-name-casing.js.map +1 -0
  162. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js +86 -0
  163. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map +1 -0
  164. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +203 -0
  165. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -0
  166. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +150 -0
  167. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +1 -0
  168. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js +135 -0
  169. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map +1 -0
  170. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/generic-type-naming.js +52 -0
  171. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/generic-type-naming.js.map +1 -0
  172. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js +54 -0
  173. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js.map +1 -0
  174. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js +220 -0
  175. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js.map +1 -0
  176. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js +48 -0
  177. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js.map +1 -0
  178. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js +1138 -0
  179. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js.map +1 -0
  180. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js +386 -0
  181. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map +1 -0
  182. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +132 -0
  183. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -0
  184. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/interface-name-prefix.js +65 -0
  185. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/interface-name-prefix.js.map +1 -0
  186. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js +195 -0
  187. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map +1 -0
  188. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-naming.js +85 -0
  189. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-naming.js.map +1 -0
  190. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +320 -0
  191. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -0
  192. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-angle-bracket-type-assertion.js +41 -0
  193. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-angle-bracket-type-assertion.js.map +1 -0
  194. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js +58 -0
  195. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js.map +1 -0
  196. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +89 -0
  197. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map +1 -0
  198. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +70 -0
  199. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -0
  200. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +157 -0
  201. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -0
  202. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +152 -0
  203. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +1 -0
  204. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +107 -0
  205. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +1 -0
  206. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +135 -0
  207. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -0
  208. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js +49 -0
  209. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js.map +1 -0
  210. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +180 -0
  211. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -0
  212. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js +147 -0
  213. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js.map +1 -0
  214. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js +91 -0
  215. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js.map +1 -0
  216. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +209 -0
  217. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +1 -0
  218. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +63 -0
  219. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +1 -0
  220. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +37 -0
  221. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +1 -0
  222. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-object-literal-type-assertion.js +78 -0
  223. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-object-literal-type-assertion.js.map +1 -0
  224. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js +93 -0
  225. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js.map +1 -0
  226. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +43 -0
  227. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map +1 -0
  228. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +71 -0
  229. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +1 -0
  230. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-triple-slash-reference.js +49 -0
  231. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-triple-slash-reference.js.map +1 -0
  232. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +208 -0
  233. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +1 -0
  234. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +137 -0
  235. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +1 -0
  236. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +225 -0
  237. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +1 -0
  238. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +83 -0
  239. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -0
  240. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +217 -0
  241. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -0
  242. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +70 -0
  243. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +1 -0
  244. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +43 -0
  245. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map +1 -0
  246. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +166 -0
  247. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +1 -0
  248. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +125 -0
  249. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +1 -0
  250. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +170 -0
  251. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map +1 -0
  252. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-interface.js +58 -0
  253. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-interface.js.map +1 -0
  254. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +53 -0
  255. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map +1 -0
  256. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +236 -0
  257. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +1 -0
  258. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +54 -0
  259. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +1 -0
  260. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +440 -0
  261. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +1 -0
  262. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +113 -0
  263. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -0
  264. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +55 -0
  265. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -0
  266. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +107 -0
  267. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +1 -0
  268. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +107 -0
  269. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +1 -0
  270. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js +66 -0
  271. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js.map +1 -0
  272. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +87 -0
  273. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +1 -0
  274. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +113 -0
  275. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +1 -0
  276. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js +161 -0
  277. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map +1 -0
  278. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +105 -0
  279. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -0
  280. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +374 -0
  281. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -0
  282. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js +4 -0
  283. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js.map +1 -0
  284. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js +7 -0
  285. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js.map +1 -0
  286. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParserServices.js +19 -0
  287. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/getParserServices.js.map +1 -0
  288. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +17 -0
  289. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -0
  290. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +65 -0
  291. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +1 -0
  292. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js +159 -0
  293. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js.map +1 -0
  294. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +89 -0
  295. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +84 -0
  296. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +33 -0
  297. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-ignore.md +37 -0
  298. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +75 -0
  299. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +202 -0
  300. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-name-casing.md +40 -0
  301. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +74 -0
  302. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +179 -0
  303. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +261 -0
  304. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +26 -0
  305. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/generic-type-naming.md +42 -0
  306. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +713 -0
  307. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/interface-name-prefix.md +65 -0
  308. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +194 -0
  309. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-naming.md +41 -0
  310. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +649 -0
  311. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-angle-bracket-type-assertion.md +32 -0
  312. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +34 -0
  313. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +47 -0
  314. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +64 -0
  315. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +165 -0
  316. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +22 -0
  317. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +64 -0
  318. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +46 -0
  319. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +44 -0
  320. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +146 -0
  321. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +68 -0
  322. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +41 -0
  323. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +119 -0
  324. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +107 -0
  325. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +35 -0
  326. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-object-literal-type-assertion.md +33 -0
  327. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +367 -0
  328. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +34 -0
  329. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +60 -0
  330. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-triple-slash-reference.md +43 -0
  331. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +467 -0
  332. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +79 -0
  333. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +69 -0
  334. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +305 -0
  335. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +171 -0
  336. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +78 -0
  337. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +28 -0
  338. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +41 -0
  339. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +57 -0
  340. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +71 -0
  341. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-interface.md +36 -0
  342. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +22 -0
  343. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +81 -0
  344. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +53 -0
  345. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +54 -0
  346. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +67 -0
  347. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +50 -0
  348. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +49 -0
  349. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +27 -0
  350. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +28 -0
  351. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +57 -0
  352. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +58 -0
  353. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +289 -0
  354. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +92 -0
  355. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +33 -0
  356. package/packages/less/node_modules/@typescript-eslint/eslint-plugin/package.json +60 -0
  357. package/packages/less/node_modules/@typescript-eslint/parser/CHANGELOG.md +150 -0
  358. package/packages/less/node_modules/@typescript-eslint/parser/LICENSE +22 -0
  359. package/packages/less/node_modules/@typescript-eslint/parser/README.md +88 -0
  360. package/packages/less/node_modules/@typescript-eslint/parser/dist/analyze-scope.d.ts +4 -0
  361. package/packages/less/node_modules/@typescript-eslint/parser/dist/analyze-scope.d.ts.map +1 -0
  362. package/packages/less/node_modules/@typescript-eslint/parser/dist/analyze-scope.js +663 -0
  363. package/packages/less/node_modules/@typescript-eslint/parser/dist/analyze-scope.js.map +1 -0
  364. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser-options.d.ts +3 -0
  365. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser-options.d.ts.map +1 -0
  366. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser-options.js +3 -0
  367. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser-options.js.map +1 -0
  368. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser.d.ts +17 -0
  369. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -0
  370. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser.js +74 -0
  371. package/packages/less/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -0
  372. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scope-manager.d.ts +14 -0
  373. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scope-manager.d.ts.map +1 -0
  374. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scope-manager.js +22 -0
  375. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scope-manager.js.map +1 -0
  376. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scopes.d.ts +11 -0
  377. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scopes.d.ts.map +1 -0
  378. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scopes.js +18 -0
  379. package/packages/less/node_modules/@typescript-eslint/parser/dist/scope/scopes.js.map +1 -0
  380. package/packages/less/node_modules/@typescript-eslint/parser/dist/simple-traverse.d.ts +7 -0
  381. package/packages/less/node_modules/@typescript-eslint/parser/dist/simple-traverse.d.ts.map +1 -0
  382. package/packages/less/node_modules/@typescript-eslint/parser/dist/simple-traverse.js +42 -0
  383. package/packages/less/node_modules/@typescript-eslint/parser/dist/simple-traverse.js.map +1 -0
  384. package/packages/less/node_modules/@typescript-eslint/parser/dist/visitor-keys.d.ts +3 -0
  385. package/packages/less/node_modules/@typescript-eslint/parser/dist/visitor-keys.d.ts.map +1 -0
  386. package/packages/less/node_modules/@typescript-eslint/parser/dist/visitor-keys.js +129 -0
  387. package/packages/less/node_modules/@typescript-eslint/parser/dist/visitor-keys.js.map +1 -0
  388. package/packages/less/node_modules/@typescript-eslint/parser/package.json +53 -0
  389. package/packages/less/node_modules/acorn/CHANGELOG.md +544 -0
  390. package/packages/less/node_modules/acorn/LICENSE +19 -0
  391. package/packages/less/node_modules/acorn/README.md +269 -0
  392. package/packages/less/node_modules/acorn/bin/acorn +4 -0
  393. package/packages/less/node_modules/acorn/dist/acorn.d.ts +209 -0
  394. package/packages/less/node_modules/acorn/dist/acorn.js +4968 -0
  395. package/packages/less/node_modules/acorn/dist/acorn.js.map +1 -0
  396. package/packages/less/node_modules/acorn/dist/acorn.mjs +4937 -0
  397. package/packages/less/node_modules/acorn/dist/acorn.mjs.map +1 -0
  398. package/packages/less/node_modules/acorn/dist/bin.js +64 -0
  399. package/packages/less/node_modules/acorn/package.json +34 -0
  400. package/packages/less/node_modules/ansi-regex/index.js +10 -0
  401. package/packages/less/node_modules/ansi-regex/license +9 -0
  402. package/packages/less/node_modules/ansi-regex/package.json +53 -0
  403. package/packages/less/node_modules/ansi-regex/readme.md +46 -0
  404. package/packages/less/node_modules/chevrotain/CHANGELOG.md +2 -0
  405. package/packages/less/node_modules/chevrotain/LICENSE.txt +202 -0
  406. package/packages/less/node_modules/chevrotain/README.md +20 -0
  407. package/packages/less/node_modules/chevrotain/diagrams/README.md +1 -0
  408. package/packages/less/node_modules/chevrotain/diagrams/diagrams.css +85 -0
  409. package/packages/less/node_modules/chevrotain/diagrams/src/diagrams_behavior.js +225 -0
  410. package/packages/less/node_modules/chevrotain/diagrams/src/diagrams_builder.js +211 -0
  411. package/packages/less/node_modules/chevrotain/diagrams/src/diagrams_serializer.js +20 -0
  412. package/packages/less/node_modules/chevrotain/diagrams/src/main.js +38 -0
  413. package/packages/less/node_modules/chevrotain/diagrams/vendor/railroad-diagrams.js +1042 -0
  414. package/packages/less/node_modules/chevrotain/lib/chevrotain.d.ts +2961 -0
  415. package/packages/less/node_modules/chevrotain/lib/chevrotain.js +9785 -0
  416. package/packages/less/node_modules/chevrotain/lib/chevrotain.min.js +2 -0
  417. package/packages/less/node_modules/chevrotain/lib/src/api.js +70 -0
  418. package/packages/less/node_modules/chevrotain/lib/src/diagrams/render_public.js +15 -0
  419. package/packages/less/node_modules/chevrotain/lib/src/generate/generate.js +142 -0
  420. package/packages/less/node_modules/chevrotain/lib/src/generate/generate_public.js +21 -0
  421. package/packages/less/node_modules/chevrotain/lib/src/lang/lang_extensions.js +42 -0
  422. package/packages/less/node_modules/chevrotain/lib/src/parse/constants.js +5 -0
  423. package/packages/less/node_modules/chevrotain/lib/src/parse/cst/cst.js +194 -0
  424. package/packages/less/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +129 -0
  425. package/packages/less/node_modules/chevrotain/lib/src/parse/errors_public.js +205 -0
  426. package/packages/less/node_modules/chevrotain/lib/src/parse/exceptions_public.js +58 -0
  427. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/checks.js +590 -0
  428. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/first.js +63 -0
  429. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/follow.js +67 -0
  430. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/gast/gast.js +170 -0
  431. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_public.js +262 -0
  432. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +39 -0
  433. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_visitor_public.js +48 -0
  434. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +548 -0
  435. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/keys.js +42 -0
  436. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +502 -0
  437. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +59 -0
  438. package/packages/less/node_modules/chevrotain/lib/src/parse/grammar/rest.js +112 -0
  439. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/parser.js +235 -0
  440. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +28 -0
  441. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +83 -0
  442. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +318 -0
  443. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +76 -0
  444. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +108 -0
  445. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/parser_traits.js +7 -0
  446. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +53 -0
  447. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +343 -0
  448. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +645 -0
  449. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +309 -0
  450. package/packages/less/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +290 -0
  451. package/packages/less/node_modules/chevrotain/lib/src/scan/lexer.js +910 -0
  452. package/packages/less/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +11 -0
  453. package/packages/less/node_modules/chevrotain/lib/src/scan/lexer_public.js +674 -0
  454. package/packages/less/node_modules/chevrotain/lib/src/scan/reg_exp.js +265 -0
  455. package/packages/less/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +22 -0
  456. package/packages/less/node_modules/chevrotain/lib/src/scan/tokens.js +129 -0
  457. package/packages/less/node_modules/chevrotain/lib/src/scan/tokens_constants.js +4 -0
  458. package/packages/less/node_modules/chevrotain/lib/src/scan/tokens_public.js +95 -0
  459. package/packages/less/node_modules/chevrotain/lib/src/text/range.js +33 -0
  460. package/packages/less/node_modules/chevrotain/lib/src/utils/utils.js +473 -0
  461. package/packages/less/node_modules/chevrotain/lib/src/version.js +7 -0
  462. package/packages/less/node_modules/chevrotain/lib_esm/src/api.js +25 -0
  463. package/packages/less/node_modules/chevrotain/lib_esm/src/diagrams/render_public.js +12 -0
  464. package/packages/less/node_modules/chevrotain/lib_esm/src/generate/generate.js +131 -0
  465. package/packages/less/node_modules/chevrotain/lib_esm/src/generate/generate_public.js +17 -0
  466. package/packages/less/node_modules/chevrotain/lib_esm/src/lang/lang_extensions.js +37 -0
  467. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/constants.js +3 -0
  468. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/cst/cst.js +187 -0
  469. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/cst/cst_visitor.js +121 -0
  470. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/errors_public.js +203 -0
  471. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/exceptions_public.js +51 -0
  472. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/checks.js +574 -0
  473. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/first.js +57 -0
  474. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/follow.js +62 -0
  475. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast.js +163 -0
  476. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_public.js +258 -0
  477. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_resolver_public.js +34 -0
  478. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/gast/gast_visitor_public.js +46 -0
  479. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/interpreter.js +544 -0
  480. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/keys.js +38 -0
  481. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/lookahead.js +489 -0
  482. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/resolver.js +56 -0
  483. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/grammar/rest.js +110 -0
  484. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/parser.js +232 -0
  485. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/context_assist.js +26 -0
  486. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/error_handler.js +81 -0
  487. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/gast_recorder.js +316 -0
  488. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/lexer_adapter.js +74 -0
  489. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/looksahead.js +106 -0
  490. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/parser_traits.js +5 -0
  491. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/perf_tracer.js +51 -0
  492. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_api.js +341 -0
  493. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recognizer_engine.js +643 -0
  494. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/recoverable.js +305 -0
  495. package/packages/less/node_modules/chevrotain/lib_esm/src/parse/parser/traits/tree_builder.js +288 -0
  496. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/lexer.js +885 -0
  497. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/lexer_errors_public.js +9 -0
  498. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/lexer_public.js +672 -0
  499. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/reg_exp.js +260 -0
  500. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/reg_exp_parser.js +18 -0
  501. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/tokens.js +114 -0
  502. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/tokens_constants.js +2 -0
  503. package/packages/less/node_modules/chevrotain/lib_esm/src/scan/tokens_public.js +87 -0
  504. package/packages/less/node_modules/chevrotain/lib_esm/src/text/range.js +30 -0
  505. package/packages/less/node_modules/chevrotain/lib_esm/src/utils/utils.js +420 -0
  506. package/packages/less/node_modules/chevrotain/lib_esm/src/version.js +5 -0
  507. package/packages/less/node_modules/chevrotain/package.json +142 -0
  508. package/packages/less/node_modules/debug/CHANGELOG.md +395 -0
  509. package/packages/less/node_modules/debug/LICENSE +19 -0
  510. package/packages/less/node_modules/debug/README.md +455 -0
  511. package/packages/less/node_modules/debug/dist/debug.js +912 -0
  512. package/packages/less/node_modules/debug/package.json +63 -0
  513. package/packages/less/node_modules/debug/src/browser.js +264 -0
  514. package/packages/less/node_modules/debug/src/common.js +266 -0
  515. package/packages/less/node_modules/debug/src/index.js +10 -0
  516. package/packages/less/node_modules/debug/src/node.js +257 -0
  517. package/packages/less/node_modules/eslint/CHANGELOG.md +5110 -0
  518. package/packages/less/node_modules/eslint/LICENSE +19 -0
  519. package/packages/less/node_modules/eslint/README.md +293 -0
  520. package/packages/less/node_modules/eslint/bin/eslint.js +79 -0
  521. package/packages/less/node_modules/eslint/conf/category-list.json +40 -0
  522. package/packages/less/node_modules/eslint/conf/config-schema.js +70 -0
  523. package/packages/less/node_modules/eslint/conf/default-cli-options.js +31 -0
  524. package/packages/less/node_modules/eslint/conf/environments.js +109 -0
  525. package/packages/less/node_modules/eslint/conf/eslint-all.js +29 -0
  526. package/packages/less/node_modules/eslint/conf/eslint-recommended.js +15 -0
  527. package/packages/less/node_modules/eslint/conf/replacements.json +22 -0
  528. package/packages/less/node_modules/eslint/lib/api.js +28 -0
  529. package/packages/less/node_modules/eslint/lib/built-in-rules-index.js +278 -0
  530. package/packages/less/node_modules/eslint/lib/cli-engine.js +796 -0
  531. package/packages/less/node_modules/eslint/lib/cli.js +235 -0
  532. package/packages/less/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js +683 -0
  533. package/packages/less/node_modules/eslint/lib/code-path-analysis/code-path-segment.js +245 -0
  534. package/packages/less/node_modules/eslint/lib/code-path-analysis/code-path-state.js +1440 -0
  535. package/packages/less/node_modules/eslint/lib/code-path-analysis/code-path.js +239 -0
  536. package/packages/less/node_modules/eslint/lib/code-path-analysis/debug-helpers.js +200 -0
  537. package/packages/less/node_modules/eslint/lib/code-path-analysis/fork-context.js +260 -0
  538. package/packages/less/node_modules/eslint/lib/code-path-analysis/id-generator.js +46 -0
  539. package/packages/less/node_modules/eslint/lib/config/autoconfig.js +358 -0
  540. package/packages/less/node_modules/eslint/lib/config/config-cache.js +130 -0
  541. package/packages/less/node_modules/eslint/lib/config/config-file.js +640 -0
  542. package/packages/less/node_modules/eslint/lib/config/config-initializer.js +654 -0
  543. package/packages/less/node_modules/eslint/lib/config/config-ops.js +404 -0
  544. package/packages/less/node_modules/eslint/lib/config/config-rule.js +319 -0
  545. package/packages/less/node_modules/eslint/lib/config/config-validator.js +279 -0
  546. package/packages/less/node_modules/eslint/lib/config/environments.js +84 -0
  547. package/packages/less/node_modules/eslint/lib/config/plugins.js +169 -0
  548. package/packages/less/node_modules/eslint/lib/config.js +377 -0
  549. package/packages/less/node_modules/eslint/lib/formatters/checkstyle.js +60 -0
  550. package/packages/less/node_modules/eslint/lib/formatters/codeframe.js +138 -0
  551. package/packages/less/node_modules/eslint/lib/formatters/compact.js +60 -0
  552. package/packages/less/node_modules/eslint/lib/formatters/html-template-message.html +8 -0
  553. package/packages/less/node_modules/eslint/lib/formatters/html-template-page.html +115 -0
  554. package/packages/less/node_modules/eslint/lib/formatters/html-template-result.html +6 -0
  555. package/packages/less/node_modules/eslint/lib/formatters/html.js +139 -0
  556. package/packages/less/node_modules/eslint/lib/formatters/jslint-xml.js +41 -0
  557. package/packages/less/node_modules/eslint/lib/formatters/json-with-metadata.js +16 -0
  558. package/packages/less/node_modules/eslint/lib/formatters/json.js +13 -0
  559. package/packages/less/node_modules/eslint/lib/formatters/junit.js +70 -0
  560. package/packages/less/node_modules/eslint/lib/formatters/stylish.js +100 -0
  561. package/packages/less/node_modules/eslint/lib/formatters/table.js +159 -0
  562. package/packages/less/node_modules/eslint/lib/formatters/tap.js +95 -0
  563. package/packages/less/node_modules/eslint/lib/formatters/unix.js +58 -0
  564. package/packages/less/node_modules/eslint/lib/formatters/visualstudio.js +63 -0
  565. package/packages/less/node_modules/eslint/lib/linter.js +1085 -0
  566. package/packages/less/node_modules/eslint/lib/load-rules.js +46 -0
  567. package/packages/less/node_modules/eslint/lib/options.js +246 -0
  568. package/packages/less/node_modules/eslint/lib/rules/accessor-pairs.js +167 -0
  569. package/packages/less/node_modules/eslint/lib/rules/array-bracket-newline.js +261 -0
  570. package/packages/less/node_modules/eslint/lib/rules/array-bracket-spacing.js +241 -0
  571. package/packages/less/node_modules/eslint/lib/rules/array-callback-return.js +258 -0
  572. package/packages/less/node_modules/eslint/lib/rules/array-element-newline.js +262 -0
  573. package/packages/less/node_modules/eslint/lib/rules/arrow-body-style.js +240 -0
  574. package/packages/less/node_modules/eslint/lib/rules/arrow-parens.js +164 -0
  575. package/packages/less/node_modules/eslint/lib/rules/arrow-spacing.js +161 -0
  576. package/packages/less/node_modules/eslint/lib/rules/block-scoped-var.js +122 -0
  577. package/packages/less/node_modules/eslint/lib/rules/block-spacing.js +147 -0
  578. package/packages/less/node_modules/eslint/lib/rules/brace-style.js +188 -0
  579. package/packages/less/node_modules/eslint/lib/rules/callback-return.js +182 -0
  580. package/packages/less/node_modules/eslint/lib/rules/camelcase.js +228 -0
  581. package/packages/less/node_modules/eslint/lib/rules/capitalized-comments.js +307 -0
  582. package/packages/less/node_modules/eslint/lib/rules/class-methods-use-this.js +118 -0
  583. package/packages/less/node_modules/eslint/lib/rules/comma-dangle.js +345 -0
  584. package/packages/less/node_modules/eslint/lib/rules/comma-spacing.js +195 -0
  585. package/packages/less/node_modules/eslint/lib/rules/comma-style.js +315 -0
  586. package/packages/less/node_modules/eslint/lib/rules/complexity.js +160 -0
  587. package/packages/less/node_modules/eslint/lib/rules/computed-property-spacing.js +187 -0
  588. package/packages/less/node_modules/eslint/lib/rules/consistent-return.js +197 -0
  589. package/packages/less/node_modules/eslint/lib/rules/consistent-this.js +151 -0
  590. package/packages/less/node_modules/eslint/lib/rules/constructor-super.js +397 -0
  591. package/packages/less/node_modules/eslint/lib/rules/curly.js +382 -0
  592. package/packages/less/node_modules/eslint/lib/rules/default-case.js +97 -0
  593. package/packages/less/node_modules/eslint/lib/rules/dot-location.js +96 -0
  594. package/packages/less/node_modules/eslint/lib/rules/dot-notation.js +169 -0
  595. package/packages/less/node_modules/eslint/lib/rules/eol-last.js +112 -0
  596. package/packages/less/node_modules/eslint/lib/rules/eqeqeq.js +186 -0
  597. package/packages/less/node_modules/eslint/lib/rules/for-direction.js +126 -0
  598. package/packages/less/node_modules/eslint/lib/rules/func-call-spacing.js +168 -0
  599. package/packages/less/node_modules/eslint/lib/rules/func-name-matching.js +251 -0
  600. package/packages/less/node_modules/eslint/lib/rules/func-names.js +179 -0
  601. package/packages/less/node_modules/eslint/lib/rules/func-style.js +98 -0
  602. package/packages/less/node_modules/eslint/lib/rules/function-paren-newline.js +233 -0
  603. package/packages/less/node_modules/eslint/lib/rules/generator-star-spacing.js +211 -0
  604. package/packages/less/node_modules/eslint/lib/rules/getter-return.js +186 -0
  605. package/packages/less/node_modules/eslint/lib/rules/global-require.js +81 -0
  606. package/packages/less/node_modules/eslint/lib/rules/guard-for-in.js +76 -0
  607. package/packages/less/node_modules/eslint/lib/rules/handle-callback-err.js +95 -0
  608. package/packages/less/node_modules/eslint/lib/rules/id-blacklist.js +127 -0
  609. package/packages/less/node_modules/eslint/lib/rules/id-length.js +122 -0
  610. package/packages/less/node_modules/eslint/lib/rules/id-match.js +225 -0
  611. package/packages/less/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +81 -0
  612. package/packages/less/node_modules/eslint/lib/rules/indent-legacy.js +1141 -0
  613. package/packages/less/node_modules/eslint/lib/rules/indent.js +1608 -0
  614. package/packages/less/node_modules/eslint/lib/rules/init-declarations.js +139 -0
  615. package/packages/less/node_modules/eslint/lib/rules/jsx-quotes.js +95 -0
  616. package/packages/less/node_modules/eslint/lib/rules/key-spacing.js +652 -0
  617. package/packages/less/node_modules/eslint/lib/rules/keyword-spacing.js +590 -0
  618. package/packages/less/node_modules/eslint/lib/rules/line-comment-position.js +123 -0
  619. package/packages/less/node_modules/eslint/lib/rules/linebreak-style.js +99 -0
  620. package/packages/less/node_modules/eslint/lib/rules/lines-around-comment.js +404 -0
  621. package/packages/less/node_modules/eslint/lib/rules/lines-around-directive.js +201 -0
  622. package/packages/less/node_modules/eslint/lib/rules/lines-between-class-members.js +144 -0
  623. package/packages/less/node_modules/eslint/lib/rules/max-classes-per-file.js +64 -0
  624. package/packages/less/node_modules/eslint/lib/rules/max-depth.js +154 -0
  625. package/packages/less/node_modules/eslint/lib/rules/max-len.js +386 -0
  626. package/packages/less/node_modules/eslint/lib/rules/max-lines-per-function.js +219 -0
  627. package/packages/less/node_modules/eslint/lib/rules/max-lines.js +148 -0
  628. package/packages/less/node_modules/eslint/lib/rules/max-nested-callbacks.js +117 -0
  629. package/packages/less/node_modules/eslint/lib/rules/max-params.js +103 -0
  630. package/packages/less/node_modules/eslint/lib/rules/max-statements-per-line.js +200 -0
  631. package/packages/less/node_modules/eslint/lib/rules/max-statements.js +175 -0
  632. package/packages/less/node_modules/eslint/lib/rules/multiline-comment-style.js +299 -0
  633. package/packages/less/node_modules/eslint/lib/rules/multiline-ternary.js +95 -0
  634. package/packages/less/node_modules/eslint/lib/rules/new-cap.js +282 -0
  635. package/packages/less/node_modules/eslint/lib/rules/new-parens.js +63 -0
  636. package/packages/less/node_modules/eslint/lib/rules/newline-after-var.js +256 -0
  637. package/packages/less/node_modules/eslint/lib/rules/newline-before-return.js +218 -0
  638. package/packages/less/node_modules/eslint/lib/rules/newline-per-chained-call.js +112 -0
  639. package/packages/less/node_modules/eslint/lib/rules/no-alert.js +127 -0
  640. package/packages/less/node_modules/eslint/lib/rules/no-array-constructor.js +54 -0
  641. package/packages/less/node_modules/eslint/lib/rules/no-async-promise-executor.js +39 -0
  642. package/packages/less/node_modules/eslint/lib/rules/no-await-in-loop.js +106 -0
  643. package/packages/less/node_modules/eslint/lib/rules/no-bitwise.js +119 -0
  644. package/packages/less/node_modules/eslint/lib/rules/no-buffer-constructor.js +45 -0
  645. package/packages/less/node_modules/eslint/lib/rules/no-caller.js +46 -0
  646. package/packages/less/node_modules/eslint/lib/rules/no-case-declarations.js +64 -0
  647. package/packages/less/node_modules/eslint/lib/rules/no-catch-shadow.js +80 -0
  648. package/packages/less/node_modules/eslint/lib/rules/no-class-assign.js +61 -0
  649. package/packages/less/node_modules/eslint/lib/rules/no-compare-neg-zero.js +61 -0
  650. package/packages/less/node_modules/eslint/lib/rules/no-cond-assign.js +149 -0
  651. package/packages/less/node_modules/eslint/lib/rules/no-confusing-arrow.js +83 -0
  652. package/packages/less/node_modules/eslint/lib/rules/no-console.js +138 -0
  653. package/packages/less/node_modules/eslint/lib/rules/no-const-assign.js +54 -0
  654. package/packages/less/node_modules/eslint/lib/rules/no-constant-condition.js +239 -0
  655. package/packages/less/node_modules/eslint/lib/rules/no-continue.js +39 -0
  656. package/packages/less/node_modules/eslint/lib/rules/no-control-regex.js +113 -0
  657. package/packages/less/node_modules/eslint/lib/rules/no-debugger.js +43 -0
  658. package/packages/less/node_modules/eslint/lib/rules/no-delete-var.js +42 -0
  659. package/packages/less/node_modules/eslint/lib/rules/no-div-regex.js +45 -0
  660. package/packages/less/node_modules/eslint/lib/rules/no-dupe-args.js +80 -0
  661. package/packages/less/node_modules/eslint/lib/rules/no-dupe-class-members.js +116 -0
  662. package/packages/less/node_modules/eslint/lib/rules/no-dupe-keys.js +142 -0
  663. package/packages/less/node_modules/eslint/lib/rules/no-duplicate-case.js +50 -0
  664. package/packages/less/node_modules/eslint/lib/rules/no-duplicate-imports.js +146 -0
  665. package/packages/less/node_modules/eslint/lib/rules/no-else-return.js +285 -0
  666. package/packages/less/node_modules/eslint/lib/rules/no-empty-character-class.js +64 -0
  667. package/packages/less/node_modules/eslint/lib/rules/no-empty-function.js +167 -0
  668. package/packages/less/node_modules/eslint/lib/rules/no-empty-pattern.js +43 -0
  669. package/packages/less/node_modules/eslint/lib/rules/no-empty.js +86 -0
  670. package/packages/less/node_modules/eslint/lib/rules/no-eq-null.js +46 -0
  671. package/packages/less/node_modules/eslint/lib/rules/no-eval.js +314 -0
  672. package/packages/less/node_modules/eslint/lib/rules/no-ex-assign.js +52 -0
  673. package/packages/less/node_modules/eslint/lib/rules/no-extend-native.js +181 -0
  674. package/packages/less/node_modules/eslint/lib/rules/no-extra-bind.js +173 -0
  675. package/packages/less/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +129 -0
  676. package/packages/less/node_modules/eslint/lib/rules/no-extra-label.js +146 -0
  677. package/packages/less/node_modules/eslint/lib/rules/no-extra-parens.js +756 -0
  678. package/packages/less/node_modules/eslint/lib/rules/no-extra-semi.js +127 -0
  679. package/packages/less/node_modules/eslint/lib/rules/no-fallthrough.js +142 -0
  680. package/packages/less/node_modules/eslint/lib/rules/no-floating-decimal.js +70 -0
  681. package/packages/less/node_modules/eslint/lib/rules/no-func-assign.js +66 -0
  682. package/packages/less/node_modules/eslint/lib/rules/no-global-assign.js +88 -0
  683. package/packages/less/node_modules/eslint/lib/rules/no-implicit-coercion.js +296 -0
  684. package/packages/less/node_modules/eslint/lib/rules/no-implicit-globals.js +58 -0
  685. package/packages/less/node_modules/eslint/lib/rules/no-implied-eval.js +164 -0
  686. package/packages/less/node_modules/eslint/lib/rules/no-inline-comments.js +68 -0
  687. package/packages/less/node_modules/eslint/lib/rules/no-inner-declarations.js +92 -0
  688. package/packages/less/node_modules/eslint/lib/rules/no-invalid-regexp.js +126 -0
  689. package/packages/less/node_modules/eslint/lib/rules/no-invalid-this.js +126 -0
  690. package/packages/less/node_modules/eslint/lib/rules/no-irregular-whitespace.js +239 -0
  691. package/packages/less/node_modules/eslint/lib/rules/no-iterator.js +41 -0
  692. package/packages/less/node_modules/eslint/lib/rules/no-label-var.js +72 -0
  693. package/packages/less/node_modules/eslint/lib/rules/no-labels.js +146 -0
  694. package/packages/less/node_modules/eslint/lib/rules/no-lone-blocks.js +115 -0
  695. package/packages/less/node_modules/eslint/lib/rules/no-lonely-if.js +85 -0
  696. package/packages/less/node_modules/eslint/lib/rules/no-loop-func.js +202 -0
  697. package/packages/less/node_modules/eslint/lib/rules/no-magic-numbers.js +167 -0
  698. package/packages/less/node_modules/eslint/lib/rules/no-misleading-character-class.js +193 -0
  699. package/packages/less/node_modules/eslint/lib/rules/no-mixed-operators.js +214 -0
  700. package/packages/less/node_modules/eslint/lib/rules/no-mixed-requires.js +223 -0
  701. package/packages/less/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +146 -0
  702. package/packages/less/node_modules/eslint/lib/rules/no-multi-assign.js +45 -0
  703. package/packages/less/node_modules/eslint/lib/rules/no-multi-spaces.js +134 -0
  704. package/packages/less/node_modules/eslint/lib/rules/no-multi-str.js +58 -0
  705. package/packages/less/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +139 -0
  706. package/packages/less/node_modules/eslint/lib/rules/no-native-reassign.js +93 -0
  707. package/packages/less/node_modules/eslint/lib/rules/no-negated-condition.js +85 -0
  708. package/packages/less/node_modules/eslint/lib/rules/no-negated-in-lhs.js +42 -0
  709. package/packages/less/node_modules/eslint/lib/rules/no-nested-ternary.js +37 -0
  710. package/packages/less/node_modules/eslint/lib/rules/no-new-func.js +48 -0
  711. package/packages/less/node_modules/eslint/lib/rules/no-new-object.js +38 -0
  712. package/packages/less/node_modules/eslint/lib/rules/no-new-require.js +38 -0
  713. package/packages/less/node_modules/eslint/lib/rules/no-new-symbol.js +46 -0
  714. package/packages/less/node_modules/eslint/lib/rules/no-new-wrappers.js +40 -0
  715. package/packages/less/node_modules/eslint/lib/rules/no-new.js +36 -0
  716. package/packages/less/node_modules/eslint/lib/rules/no-obj-calls.js +42 -0
  717. package/packages/less/node_modules/eslint/lib/rules/no-octal-escape.js +50 -0
  718. package/packages/less/node_modules/eslint/lib/rules/no-octal.js +38 -0
  719. package/packages/less/node_modules/eslint/lib/rules/no-param-reassign.js +184 -0
  720. package/packages/less/node_modules/eslint/lib/rules/no-path-concat.js +52 -0
  721. package/packages/less/node_modules/eslint/lib/rules/no-plusplus.js +65 -0
  722. package/packages/less/node_modules/eslint/lib/rules/no-process-env.js +42 -0
  723. package/packages/less/node_modules/eslint/lib/rules/no-process-exit.js +38 -0
  724. package/packages/less/node_modules/eslint/lib/rules/no-proto.js +41 -0
  725. package/packages/less/node_modules/eslint/lib/rules/no-prototype-builtins.js +57 -0
  726. package/packages/less/node_modules/eslint/lib/rules/no-redeclare.js +104 -0
  727. package/packages/less/node_modules/eslint/lib/rules/no-regex-spaces.js +116 -0
  728. package/packages/less/node_modules/eslint/lib/rules/no-restricted-globals.js +123 -0
  729. package/packages/less/node_modules/eslint/lib/rules/no-restricted-imports.js +282 -0
  730. package/packages/less/node_modules/eslint/lib/rules/no-restricted-modules.js +180 -0
  731. package/packages/less/node_modules/eslint/lib/rules/no-restricted-properties.js +176 -0
  732. package/packages/less/node_modules/eslint/lib/rules/no-restricted-syntax.js +65 -0
  733. package/packages/less/node_modules/eslint/lib/rules/no-return-assign.js +75 -0
  734. package/packages/less/node_modules/eslint/lib/rules/no-return-await.js +101 -0
  735. package/packages/less/node_modules/eslint/lib/rules/no-script-url.js +44 -0
  736. package/packages/less/node_modules/eslint/lib/rules/no-self-assign.js +219 -0
  737. package/packages/less/node_modules/eslint/lib/rules/no-self-compare.js +56 -0
  738. package/packages/less/node_modules/eslint/lib/rules/no-sequences.js +115 -0
  739. package/packages/less/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +60 -0
  740. package/packages/less/node_modules/eslint/lib/rules/no-shadow.js +191 -0
  741. package/packages/less/node_modules/eslint/lib/rules/no-spaced-func.js +79 -0
  742. package/packages/less/node_modules/eslint/lib/rules/no-sparse-arrays.js +46 -0
  743. package/packages/less/node_modules/eslint/lib/rules/no-sync.js +57 -0
  744. package/packages/less/node_modules/eslint/lib/rules/no-tabs.js +68 -0
  745. package/packages/less/node_modules/eslint/lib/rules/no-template-curly-in-string.js +40 -0
  746. package/packages/less/node_modules/eslint/lib/rules/no-ternary.js +37 -0
  747. package/packages/less/node_modules/eslint/lib/rules/no-this-before-super.js +301 -0
  748. package/packages/less/node_modules/eslint/lib/rules/no-throw-literal.js +46 -0
  749. package/packages/less/node_modules/eslint/lib/rules/no-trailing-spaces.js +174 -0
  750. package/packages/less/node_modules/eslint/lib/rules/no-undef-init.js +65 -0
  751. package/packages/less/node_modules/eslint/lib/rules/no-undef.js +78 -0
  752. package/packages/less/node_modules/eslint/lib/rules/no-undefined.js +80 -0
  753. package/packages/less/node_modules/eslint/lib/rules/no-underscore-dangle.js +209 -0
  754. package/packages/less/node_modules/eslint/lib/rules/no-unexpected-multiline.js +102 -0
  755. package/packages/less/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +369 -0
  756. package/packages/less/node_modules/eslint/lib/rules/no-unneeded-ternary.js +159 -0
  757. package/packages/less/node_modules/eslint/lib/rules/no-unreachable.js +214 -0
  758. package/packages/less/node_modules/eslint/lib/rules/no-unsafe-finally.js +110 -0
  759. package/packages/less/node_modules/eslint/lib/rules/no-unsafe-negation.js +87 -0
  760. package/packages/less/node_modules/eslint/lib/rules/no-unused-expressions.js +132 -0
  761. package/packages/less/node_modules/eslint/lib/rules/no-unused-labels.js +113 -0
  762. package/packages/less/node_modules/eslint/lib/rules/no-unused-vars.js +656 -0
  763. package/packages/less/node_modules/eslint/lib/rules/no-use-before-define.js +234 -0
  764. package/packages/less/node_modules/eslint/lib/rules/no-useless-call.js +83 -0
  765. package/packages/less/node_modules/eslint/lib/rules/no-useless-catch.js +52 -0
  766. package/packages/less/node_modules/eslint/lib/rules/no-useless-computed-key.js +77 -0
  767. package/packages/less/node_modules/eslint/lib/rules/no-useless-concat.js +111 -0
  768. package/packages/less/node_modules/eslint/lib/rules/no-useless-constructor.js +185 -0
  769. package/packages/less/node_modules/eslint/lib/rules/no-useless-escape.js +226 -0
  770. package/packages/less/node_modules/eslint/lib/rules/no-useless-rename.js +152 -0
  771. package/packages/less/node_modules/eslint/lib/rules/no-useless-return.js +300 -0
  772. package/packages/less/node_modules/eslint/lib/rules/no-var.js +331 -0
  773. package/packages/less/node_modules/eslint/lib/rules/no-void.js +40 -0
  774. package/packages/less/node_modules/eslint/lib/rules/no-warning-comments.js +159 -0
  775. package/packages/less/node_modules/eslint/lib/rules/no-whitespace-before-property.js +97 -0
  776. package/packages/less/node_modules/eslint/lib/rules/no-with.js +35 -0
  777. package/packages/less/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +119 -0
  778. package/packages/less/node_modules/eslint/lib/rules/object-curly-newline.js +302 -0
  779. package/packages/less/node_modules/eslint/lib/rules/object-curly-spacing.js +302 -0
  780. package/packages/less/node_modules/eslint/lib/rules/object-property-newline.js +94 -0
  781. package/packages/less/node_modules/eslint/lib/rules/object-shorthand.js +463 -0
  782. package/packages/less/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +89 -0
  783. package/packages/less/node_modules/eslint/lib/rules/one-var.js +526 -0
  784. package/packages/less/node_modules/eslint/lib/rules/operator-assignment.js +213 -0
  785. package/packages/less/node_modules/eslint/lib/rules/operator-linebreak.js +255 -0
  786. package/packages/less/node_modules/eslint/lib/rules/padded-blocks.js +282 -0
  787. package/packages/less/node_modules/eslint/lib/rules/padding-line-between-statements.js +643 -0
  788. package/packages/less/node_modules/eslint/lib/rules/prefer-arrow-callback.js +310 -0
  789. package/packages/less/node_modules/eslint/lib/rules/prefer-const.js +471 -0
  790. package/packages/less/node_modules/eslint/lib/rules/prefer-destructuring.js +274 -0
  791. package/packages/less/node_modules/eslint/lib/rules/prefer-named-capture-group.js +123 -0
  792. package/packages/less/node_modules/eslint/lib/rules/prefer-numeric-literals.js +114 -0
  793. package/packages/less/node_modules/eslint/lib/rules/prefer-object-spread.js +265 -0
  794. package/packages/less/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +129 -0
  795. package/packages/less/node_modules/eslint/lib/rules/prefer-reflect.js +123 -0
  796. package/packages/less/node_modules/eslint/lib/rules/prefer-rest-params.js +114 -0
  797. package/packages/less/node_modules/eslint/lib/rules/prefer-spread.js +87 -0
  798. package/packages/less/node_modules/eslint/lib/rules/prefer-template.js +289 -0
  799. package/packages/less/node_modules/eslint/lib/rules/quote-props.js +301 -0
  800. package/packages/less/node_modules/eslint/lib/rules/quotes.js +323 -0
  801. package/packages/less/node_modules/eslint/lib/rules/radix.js +174 -0
  802. package/packages/less/node_modules/eslint/lib/rules/require-atomic-updates.js +300 -0
  803. package/packages/less/node_modules/eslint/lib/rules/require-await.js +104 -0
  804. package/packages/less/node_modules/eslint/lib/rules/require-jsdoc.js +117 -0
  805. package/packages/less/node_modules/eslint/lib/rules/require-unicode-regexp.js +69 -0
  806. package/packages/less/node_modules/eslint/lib/rules/require-yield.js +74 -0
  807. package/packages/less/node_modules/eslint/lib/rules/rest-spread-spacing.js +118 -0
  808. package/packages/less/node_modules/eslint/lib/rules/semi-spacing.js +212 -0
  809. package/packages/less/node_modules/eslint/lib/rules/semi-style.js +147 -0
  810. package/packages/less/node_modules/eslint/lib/rules/semi.js +328 -0
  811. package/packages/less/node_modules/eslint/lib/rules/sort-imports.js +208 -0
  812. package/packages/less/node_modules/eslint/lib/rules/sort-keys.js +169 -0
  813. package/packages/less/node_modules/eslint/lib/rules/sort-vars.js +100 -0
  814. package/packages/less/node_modules/eslint/lib/rules/space-before-blocks.js +160 -0
  815. package/packages/less/node_modules/eslint/lib/rules/space-before-function-paren.js +145 -0
  816. package/packages/less/node_modules/eslint/lib/rules/space-in-parens.js +276 -0
  817. package/packages/less/node_modules/eslint/lib/rules/space-infix-ops.js +165 -0
  818. package/packages/less/node_modules/eslint/lib/rules/space-unary-ops.js +321 -0
  819. package/packages/less/node_modules/eslint/lib/rules/spaced-comment.js +375 -0
  820. package/packages/less/node_modules/eslint/lib/rules/strict.js +279 -0
  821. package/packages/less/node_modules/eslint/lib/rules/switch-colon-spacing.js +141 -0
  822. package/packages/less/node_modules/eslint/lib/rules/symbol-description.js +72 -0
  823. package/packages/less/node_modules/eslint/lib/rules/template-curly-spacing.js +124 -0
  824. package/packages/less/node_modules/eslint/lib/rules/template-tag-spacing.js +84 -0
  825. package/packages/less/node_modules/eslint/lib/rules/unicode-bom.js +73 -0
  826. package/packages/less/node_modules/eslint/lib/rules/use-isnan.js +40 -0
  827. package/packages/less/node_modules/eslint/lib/rules/valid-jsdoc.js +515 -0
  828. package/packages/less/node_modules/eslint/lib/rules/valid-typeof.js +85 -0
  829. package/packages/less/node_modules/eslint/lib/rules/vars-on-top.js +144 -0
  830. package/packages/less/node_modules/eslint/lib/rules/wrap-iife.js +160 -0
  831. package/packages/less/node_modules/eslint/lib/rules/wrap-regex.js +59 -0
  832. package/packages/less/node_modules/eslint/lib/rules/yield-star-spacing.js +127 -0
  833. package/packages/less/node_modules/eslint/lib/rules/yoda.js +318 -0
  834. package/packages/less/node_modules/eslint/lib/rules.js +110 -0
  835. package/packages/less/node_modules/eslint/lib/testers/rule-tester.js +602 -0
  836. package/packages/less/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js +57 -0
  837. package/packages/less/node_modules/eslint/lib/token-store/backward-token-cursor.js +58 -0
  838. package/packages/less/node_modules/eslint/lib/token-store/cursor.js +76 -0
  839. package/packages/less/node_modules/eslint/lib/token-store/cursors.js +92 -0
  840. package/packages/less/node_modules/eslint/lib/token-store/decorative-cursor.js +39 -0
  841. package/packages/less/node_modules/eslint/lib/token-store/filter-cursor.js +43 -0
  842. package/packages/less/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js +57 -0
  843. package/packages/less/node_modules/eslint/lib/token-store/forward-token-cursor.js +63 -0
  844. package/packages/less/node_modules/eslint/lib/token-store/index.js +633 -0
  845. package/packages/less/node_modules/eslint/lib/token-store/limit-cursor.js +40 -0
  846. package/packages/less/node_modules/eslint/lib/token-store/padded-token-cursor.js +38 -0
  847. package/packages/less/node_modules/eslint/lib/token-store/skip-cursor.js +42 -0
  848. package/packages/less/node_modules/eslint/lib/token-store/utils.js +104 -0
  849. package/packages/less/node_modules/eslint/lib/util/ajv.js +31 -0
  850. package/packages/less/node_modules/eslint/lib/util/apply-disable-directives.js +159 -0
  851. package/packages/less/node_modules/eslint/lib/util/ast-utils.js +1346 -0
  852. package/packages/less/node_modules/eslint/lib/util/config-comment-parser.js +141 -0
  853. package/packages/less/node_modules/eslint/lib/util/file-finder.js +144 -0
  854. package/packages/less/node_modules/eslint/lib/util/fix-tracker.js +120 -0
  855. package/packages/less/node_modules/eslint/lib/util/glob-utils.js +285 -0
  856. package/packages/less/node_modules/eslint/lib/util/glob.js +63 -0
  857. package/packages/less/node_modules/eslint/lib/util/hash.js +35 -0
  858. package/packages/less/node_modules/eslint/lib/util/ignored-paths.js +381 -0
  859. package/packages/less/node_modules/eslint/lib/util/interpolate.js +28 -0
  860. package/packages/less/node_modules/eslint/lib/util/keywords.js +67 -0
  861. package/packages/less/node_modules/eslint/lib/util/lint-result-cache.js +146 -0
  862. package/packages/less/node_modules/eslint/lib/util/logging.js +28 -0
  863. package/packages/less/node_modules/eslint/lib/util/module-resolver.js +83 -0
  864. package/packages/less/node_modules/eslint/lib/util/naming.js +107 -0
  865. package/packages/less/node_modules/eslint/lib/util/node-event-generator.js +308 -0
  866. package/packages/less/node_modules/eslint/lib/util/npm-utils.js +183 -0
  867. package/packages/less/node_modules/eslint/lib/util/path-utils.js +72 -0
  868. package/packages/less/node_modules/eslint/lib/util/patterns/letters.js +36 -0
  869. package/packages/less/node_modules/eslint/lib/util/report-translator.js +281 -0
  870. package/packages/less/node_modules/eslint/lib/util/rule-fixer.js +140 -0
  871. package/packages/less/node_modules/eslint/lib/util/safe-emitter.js +52 -0
  872. package/packages/less/node_modules/eslint/lib/util/source-code-fixer.js +152 -0
  873. package/packages/less/node_modules/eslint/lib/util/source-code-utils.js +105 -0
  874. package/packages/less/node_modules/eslint/lib/util/source-code.js +507 -0
  875. package/packages/less/node_modules/eslint/lib/util/timing.js +139 -0
  876. package/packages/less/node_modules/eslint/lib/util/traverser.js +193 -0
  877. package/packages/less/node_modules/eslint/lib/util/unicode/index.js +11 -0
  878. package/packages/less/node_modules/eslint/lib/util/unicode/is-combining-character.js +13 -0
  879. package/packages/less/node_modules/eslint/lib/util/unicode/is-emoji-modifier.js +13 -0
  880. package/packages/less/node_modules/eslint/lib/util/unicode/is-regional-indicator-symbol.js +13 -0
  881. package/packages/less/node_modules/eslint/lib/util/unicode/is-surrogate-pair.js +14 -0
  882. package/packages/less/node_modules/eslint/lib/util/xml-escape.js +34 -0
  883. package/packages/less/node_modules/eslint/messages/all-files-ignored.txt +8 -0
  884. package/packages/less/node_modules/eslint/messages/extend-config-missing.txt +3 -0
  885. package/packages/less/node_modules/eslint/messages/failed-to-read-json.txt +3 -0
  886. package/packages/less/node_modules/eslint/messages/file-not-found.txt +2 -0
  887. package/packages/less/node_modules/eslint/messages/no-config-found.txt +7 -0
  888. package/packages/less/node_modules/eslint/messages/plugin-missing.txt +11 -0
  889. package/packages/less/node_modules/eslint/messages/whitespace-found.txt +3 -0
  890. package/packages/less/node_modules/eslint/package.json +128 -0
  891. package/packages/less/node_modules/espree/CHANGELOG.md +446 -0
  892. package/packages/less/node_modules/espree/LICENSE +22 -0
  893. package/packages/less/node_modules/espree/README.md +164 -0
  894. package/packages/less/node_modules/espree/espree.js +172 -0
  895. package/packages/less/node_modules/espree/lib/ast-node-types.js +96 -0
  896. package/packages/less/node_modules/espree/lib/espree.js +309 -0
  897. package/packages/less/node_modules/espree/lib/features.js +29 -0
  898. package/packages/less/node_modules/espree/lib/token-translator.js +262 -0
  899. package/packages/less/node_modules/espree/lib/visitor-keys.js +123 -0
  900. package/packages/less/node_modules/espree/package.json +62 -0
  901. package/packages/less/node_modules/source-map/CHANGELOG.md +301 -0
  902. package/packages/less/node_modules/source-map/LICENSE +28 -0
  903. package/packages/less/node_modules/source-map/README.md +742 -0
  904. package/packages/less/node_modules/source-map/dist/source-map.debug.js +3234 -0
  905. package/packages/less/node_modules/source-map/dist/source-map.js +3233 -0
  906. package/packages/less/node_modules/source-map/dist/source-map.min.js +2 -0
  907. package/packages/less/node_modules/source-map/dist/source-map.min.js.map +1 -0
  908. package/packages/less/node_modules/source-map/lib/array-set.js +121 -0
  909. package/packages/less/node_modules/source-map/lib/base64-vlq.js +140 -0
  910. package/packages/less/node_modules/source-map/lib/base64.js +67 -0
  911. package/packages/less/node_modules/source-map/lib/binary-search.js +111 -0
  912. package/packages/less/node_modules/source-map/lib/mapping-list.js +79 -0
  913. package/packages/less/node_modules/source-map/lib/quick-sort.js +114 -0
  914. package/packages/less/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  915. package/packages/less/node_modules/source-map/lib/source-map-generator.js +425 -0
  916. package/packages/less/node_modules/source-map/lib/source-node.js +413 -0
  917. package/packages/less/node_modules/source-map/lib/util.js +488 -0
  918. package/packages/less/node_modules/source-map/package.json +73 -0
  919. package/packages/less/node_modules/source-map/source-map.d.ts +98 -0
  920. package/packages/less/node_modules/source-map/source-map.js +8 -0
  921. package/packages/less/node_modules/strip-ansi/index.js +4 -0
  922. package/packages/less/node_modules/strip-ansi/license +9 -0
  923. package/packages/less/node_modules/strip-ansi/package.json +52 -0
  924. package/packages/less/node_modules/strip-ansi/readme.md +39 -0
  925. package/packages/less/tmp/less.cjs.js +10536 -0
  926. package/test/browser/common.js +11 -49
  927. package/test/browser/generator/benchmark.config.js +50 -0
  928. package/test/browser/generator/generate.js +78 -0
  929. package/test/browser/generator/runner.config.js +180 -0
  930. package/test/browser/generator/runner.js +2 -0
  931. package/test/browser/generator/template.js +83 -0
  932. package/test/browser/less.min.js +3 -3
  933. package/test/browser/less.min.js.map +1 -1
  934. package/test/browser/runner-browser-options.js +0 -6
  935. package/test/browser/runner-browser-spec.js +1 -1
  936. package/test/browser/runner-main-spec.js +1 -1
  937. package/test/browser/runner-modify-vars-spec.js +1 -1
  938. package/test/browser/runner-production-spec.js +1 -1
  939. package/test/css/comments.css +1 -1
  940. package/test/css/css-3.css +5 -5
  941. package/test/css/css-escapes.css +1 -0
  942. package/test/css/css-guards.css +1 -1
  943. package/test/css/debug/linenumbers-all.css +5 -5
  944. package/test/css/debug/linenumbers-comments.css +5 -5
  945. package/test/css/debug/linenumbers-mediaquery.css +5 -5
  946. package/test/css/extend-chaining.css +3 -3
  947. package/test/css/extend-media.css +1 -1
  948. package/test/css/extend-nest.css +1 -1
  949. package/test/css/filemanagerPlugin/filemanager.css +1 -1
  950. package/test/css/functions-each.css +1 -1
  951. package/test/css/import-once.css +2 -2
  952. package/test/css/import-reference-issues.css +1 -1
  953. package/test/css/import-reference.css +6 -6
  954. package/test/css/import.css +1 -1
  955. package/test/css/javascript.css +1 -1
  956. package/test/css/legacy/legacy.css +1 -1
  957. package/test/css/math/parens-division/mixins-args.css +1 -1
  958. package/test/css/math/parens-division/parens.css +1 -1
  959. package/test/css/math/strict/mixins-args.css +1 -1
  960. package/test/css/math/strict/parens.css +1 -1
  961. package/test/css/math/strict-legacy/mixins-args.css +1 -1
  962. package/test/css/math/strict-legacy/parens.css +1 -1
  963. package/test/css/media.css +14 -14
  964. package/test/css/merge.css +10 -10
  965. package/test/css/mixins-guards.css +6 -6
  966. package/test/css/mixins.css +2 -2
  967. package/test/css/namespacing/namespacing-3.css +16 -1
  968. package/test/css/namespacing/namespacing-4.css +1 -1
  969. package/test/css/namespacing/namespacing-functions.css +6 -0
  970. package/test/css/no-strict-math/mixins-guards.css +1 -1
  971. package/test/css/permissive-parse.css +1 -1
  972. package/test/css/plugin.css +9 -9
  973. package/test/css/postProcessorPlugin/postProcessor.css +2 -2
  974. package/test/css/preProcessorPlugin/preProcessor.css +1 -1
  975. package/test/css/selectors.css +2 -2
  976. package/test/css/variables.css +1 -1
  977. package/test/css/visitorPlugin/visitor.css +1 -1
  978. package/test/less/comments.less +1 -1
  979. package/test/less/css-3.less +5 -5
  980. package/test/less/css-escapes.less +3 -1
  981. package/test/less/css-guards.less +2 -2
  982. package/test/less/debug/import/test.less +2 -2
  983. package/test/less/debug/linenumbers.less +3 -3
  984. package/test/less/errors/color-func-invalid-color.less +1 -1
  985. package/test/less/errors/color-func-invalid-color.txt +1 -1
  986. package/test/less/errors/plugin-1.txt +2 -2
  987. package/test/less/errors/plugin-2.txt +1 -2
  988. package/test/less/errors/plugin-3.txt +1 -2
  989. package/test/less/errors/property-ie5-hack.less +1 -1
  990. package/test/less/extend-chaining.less +3 -3
  991. package/test/less/extend-media.less +1 -1
  992. package/test/less/extend-nest.less +1 -1
  993. package/test/less/filemanagerPlugin/filemanager.less +1 -1
  994. package/test/less/functions-each.less +1 -1
  995. package/test/less/import/import-reference.less +1 -1
  996. package/test/less/import/import-test-f.less +1 -1
  997. package/test/less/import-reference-issues/global-scope-import.less +2 -2
  998. package/test/less/import-reference-issues/global-scope-nested.less +1 -1
  999. package/test/less/import-reference-issues.less +2 -2
  1000. package/test/less/import-reference.less +1 -1
  1001. package/test/less/javascript.less +1 -1
  1002. package/test/less/legacy/legacy.less +1 -1
  1003. package/test/less/math/parens-division/mixins-args.less +4 -4
  1004. package/test/less/math/parens-division/parens.less +1 -1
  1005. package/test/less/math/strict/mixins-args.less +4 -4
  1006. package/test/less/math/strict/parens.less +1 -1
  1007. package/test/less/math/strict-legacy/mixins-args.less +4 -4
  1008. package/test/less/math/strict-legacy/parens.less +1 -1
  1009. package/test/less/media.less +9 -9
  1010. package/test/less/merge.less +10 -10
  1011. package/test/less/mixins-guards.less +8 -8
  1012. package/test/less/mixins-important.less +3 -3
  1013. package/test/less/mixins.less +2 -2
  1014. package/test/less/namespacing/namespacing-3.less +25 -2
  1015. package/test/less/namespacing/namespacing-4.less +1 -1
  1016. package/test/less/namespacing/namespacing-5.less +2 -2
  1017. package/test/less/namespacing/namespacing-functions.less +26 -0
  1018. package/test/less/no-strict-math/mixins-guards.less +2 -2
  1019. package/test/less/permissive-parse.less +1 -1
  1020. package/test/less/plugin.less +9 -9
  1021. package/test/less/postProcessorPlugin/postProcessor.less +2 -2
  1022. package/test/less/preProcessorPlugin/preProcessor.less +1 -1
  1023. package/test/less/selectors.less +1 -1
  1024. package/test/less/sourcemaps/imported.css +1 -1
  1025. package/test/less/variables.less +1 -1
  1026. package/test/less/visitorPlugin/visitor.less +1 -1
  1027. package/test/less-test.js +1 -9
  1028. package/test/less.js +11 -0
  1029. package/.DS_Store +0 -0
  1030. package/test/.DS_Store +0 -0
  1031. package/test/browser/onload.js +0 -13
  1032. package/test/browser/test-runner-template.tmpl +0 -105
  1033. package/test/browser/vendor/jasmine-jsreporter.js +0 -391
  1034. package/test/browser/vendor/promise.js +0 -2
  1035. package/test/css/.DS_Store +0 -0
  1036. package/test/css/math/.DS_Store +0 -0
  1037. package/test/less/.DS_Store +0 -0
  1038. package/test/less/math/.DS_Store +0 -0
@@ -0,0 +1,2961 @@
1
+ export as namespace chevrotain
2
+
3
+ export declare const VERSION: string
4
+
5
+ /**
6
+ * This class does not actually exists nor is exposed at runtime.
7
+ * This is just a helper to avoid duplications in the Type Definitions
8
+ * Of `CstParser` and `EmbeddedActionsParser`
9
+ */
10
+ declare abstract class BaseParser {
11
+ /**
12
+ * This must be called at the end of a Parser constructor.
13
+ * See: http://sap.github.io/chevrotain/docs/tutorial/step2_parsing.html#under-the-hood
14
+ */
15
+ protected performSelfAnalysis(): void
16
+
17
+ /**
18
+ * It is recommended to reuse the same Parser instance
19
+ * by passing an empty array to the input argument
20
+ * and only later setting the input by using the input property.
21
+ * See: http://sap.github.io/chevrotain/docs/FAQ.html#major-performance-benefits
22
+ *
23
+ * @param tokenVocabulary - A data structure containing all the Tokens used by the Parser.
24
+ * @param config - The Parser's configuration.
25
+ */
26
+ constructor(tokenVocabulary: TokenVocabulary, config?: IParserConfig)
27
+
28
+ errors: IRecognitionException[]
29
+
30
+ /**
31
+ * Flag indicating the Parser is at the recording phase.
32
+ * Can be used to implement methods similar to {@link BaseParser.ACTION}
33
+ * Or any other logic to requires knowledge of the recording phase.
34
+ * See:
35
+ * - https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording
36
+ * to learn more on the recording phase and how Chevrotain works.
37
+ */
38
+ RECORDING_PHASE: boolean
39
+
40
+ /**
41
+ * Resets the parser state, should be overridden for custom parsers which "carry" additional state.
42
+ * When overriding, remember to also invoke the super implementation!
43
+ */
44
+ reset(): void
45
+
46
+ getBaseCstVisitorConstructor(): {
47
+ new (...args: any[]): ICstVisitor<any, any>
48
+ }
49
+
50
+ getBaseCstVisitorConstructorWithDefaults(): {
51
+ new (...args: any[]): ICstVisitor<any, any>
52
+ }
53
+
54
+ getGAstProductions(): Record<string, Rule>
55
+
56
+ getSerializedGastProductions(): ISerializedGast[]
57
+
58
+ /**
59
+ * @param startRuleName
60
+ * @param precedingInput - The token vector up to (not including) the content assist point
61
+ */
62
+ computeContentAssist(
63
+ startRuleName: string,
64
+ precedingInput: IToken[]
65
+ ): ISyntacticContentAssistPath[]
66
+
67
+ /**
68
+ * @param grammarRule - The rule to try and parse in backtracking mode.
69
+ * @param args - argumens to be passed to the grammar rule execution
70
+ *
71
+ * @return a lookahead function that will try to parse the given grammarRule and will return true if succeed.
72
+ */
73
+ protected BACKTRACK<T>(
74
+ grammarRule: (...args: any[]) => T,
75
+ args?: any[]
76
+ ): () => boolean
77
+
78
+ /**
79
+ * The Semantic Actions wrapper.
80
+ * Should be used to wrap semantic actions that either:
81
+ * - May fail when executing in "recording phase".
82
+ * - Have global side effects that should be avoided during "recording phase".
83
+ *
84
+ * For more information see:
85
+ * - https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording
86
+ */
87
+ protected ACTION<T>(impl: () => T): T
88
+
89
+ /**
90
+ * Like `CONSUME` with the numerical suffix as a parameter, e.g:
91
+ * consume(0, X) === CONSUME(X)
92
+ * consume(1, X) === CONSUME1(X)
93
+ * consume(2, X) === CONSUME2(X)
94
+ * ...
95
+ * @see CONSUME
96
+ */
97
+ protected consume(
98
+ idx: number,
99
+ tokType: TokenType,
100
+ options?: ConsumeMethodOpts
101
+ ): IToken
102
+
103
+ /**
104
+ * Like `OPTION` with the numerical suffix as a parameter, e.g:
105
+ * option(0, X) === OPTION(X)
106
+ * option(1, X) === OPTION1(X)
107
+ * option(2, X) === OPTION2(X)
108
+ * ...
109
+ * @see SUBRULE
110
+ */
111
+ protected option<OUT>(
112
+ idx: number,
113
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
114
+ ): OUT
115
+
116
+ /**
117
+ * Like `OR` with the numerical suffix as a parameter, e.g:
118
+ * or(0, X) === OR(X)
119
+ * or(1, X) === OR1(X)
120
+ * or(2, X) === OR2(X)
121
+ * ...
122
+ * @see OR
123
+ */
124
+ protected or(idx: number, altsOrOpts: IOrAlt[] | OrMethodOpts): any
125
+
126
+ /**
127
+ * Like `MANY` with the numerical suffix as a parameter, e.g:
128
+ * many(0, X) === MANY(X)
129
+ * many(1, X) === MANY1(X)
130
+ * many(2, X) === MANY2(X)
131
+ * ...
132
+ * @see MANY
133
+ */
134
+ protected many(
135
+ idx: number,
136
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
137
+ ): void
138
+
139
+ /**
140
+ * Like `AT_LEAST_ONE` with the numerical suffix as a parameter, e.g:
141
+ * atLeastOne(0, X) === AT_LEAST_ONE(X)
142
+ * atLeastOne(1, X) === AT_LEAST_ONE1(X)
143
+ * atLeastOne(2, X) === AT_LEAST_ONE2(X)
144
+ * ...
145
+ * @see AT_LEAST_ONE
146
+ */
147
+ protected atLeastOne(
148
+ idx: number,
149
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
150
+ ): void
151
+
152
+ /**
153
+ *
154
+ * A Parsing DSL method use to consume a single Token.
155
+ * In EBNF terms this is equivalent to a Terminal.
156
+ *
157
+ * A Token will be consumed, IFF the next token in the token vector matches <tokType>.
158
+ * otherwise the parser may attempt to perform error recovery (if enabled).
159
+ *
160
+ * The index in the method name indicates the unique occurrence of a terminal consumption
161
+ * inside a the top level rule. What this means is that if a terminal appears
162
+ * more than once in a single rule, each appearance must have a **different** index.
163
+ *
164
+ * For example:
165
+ * ```
166
+ * this.RULE("qualifiedName", () => {
167
+ * this.CONSUME1(Identifier);
168
+ * this.MANY(() => {
169
+ * this.CONSUME1(Dot);
170
+ * // here we use CONSUME2 because the terminal
171
+ * // 'Identifier' has already appeared previously in the
172
+ * // the rule 'parseQualifiedName'
173
+ * this.CONSUME2(Identifier);
174
+ * });
175
+ * })
176
+ * ```
177
+ *
178
+ * - See more details on the [unique suffixes requirement](http://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES).
179
+ *
180
+ * @param tokType - The Type of the token to be consumed.
181
+ * @param options - optional properties to modify the behavior of CONSUME.
182
+ */
183
+ protected CONSUME(
184
+ tokType: TokenType,
185
+ options?: ConsumeMethodOpts
186
+ ): IToken
187
+
188
+ /**
189
+ * @see CONSUME
190
+ * @hidden
191
+ */
192
+ protected CONSUME1(
193
+ tokType: TokenType,
194
+ options?: ConsumeMethodOpts
195
+ ): IToken
196
+
197
+ /**
198
+ * @see CONSUME
199
+ * @hidden
200
+ */
201
+ protected CONSUME2(
202
+ tokType: TokenType,
203
+ options?: ConsumeMethodOpts
204
+ ): IToken
205
+
206
+ /**
207
+ * @see CONSUME
208
+ * @hidden
209
+ */
210
+ protected CONSUME3(
211
+ tokType: TokenType,
212
+ options?: ConsumeMethodOpts
213
+ ): IToken
214
+
215
+ /**
216
+ * @see CONSUME
217
+ * @hidden
218
+ */
219
+ protected CONSUME4(
220
+ tokType: TokenType,
221
+ options?: ConsumeMethodOpts
222
+ ): IToken
223
+
224
+ /**
225
+ * @see CONSUME
226
+ * @hidden
227
+ */
228
+ protected CONSUME5(
229
+ tokType: TokenType,
230
+ options?: ConsumeMethodOpts
231
+ ): IToken
232
+
233
+ /**
234
+ * @see CONSUME
235
+ * @hidden
236
+ */
237
+ protected CONSUME6(
238
+ tokType: TokenType,
239
+ options?: ConsumeMethodOpts
240
+ ): IToken
241
+
242
+ /**
243
+ * @see CONSUME
244
+ * @hidden
245
+ */
246
+ protected CONSUME7(
247
+ tokType: TokenType,
248
+ options?: ConsumeMethodOpts
249
+ ): IToken
250
+
251
+ /**
252
+ * @see CONSUME
253
+ * @hidden
254
+ */
255
+ protected CONSUME8(
256
+ tokType: TokenType,
257
+ options?: ConsumeMethodOpts
258
+ ): IToken
259
+
260
+ /**
261
+ * @see CONSUME
262
+ * @hidden
263
+ */
264
+ protected CONSUME9(
265
+ tokType: TokenType,
266
+ options?: ConsumeMethodOpts
267
+ ): IToken
268
+
269
+ /**
270
+ * Parsing DSL Method that Indicates an Optional production.
271
+ * in EBNF notation this is equivalent to: "[...]".
272
+ *
273
+ * Note that there are two syntax forms:
274
+ * - Passing the grammar action directly:
275
+ * ```
276
+ * this.OPTION(() => {
277
+ * this.CONSUME(Digit)}
278
+ * );
279
+ * ```
280
+ *
281
+ * - using an "options" object:
282
+ * ```
283
+ * this.OPTION({
284
+ * GATE:predicateFunc,
285
+ * DEF: () => {
286
+ * this.CONSUME(Digit)
287
+ * }});
288
+ * ```
289
+ *
290
+ * The optional 'GATE' property in "options" object form can be used to add constraints
291
+ * to invoking the grammar action.
292
+ *
293
+ * As in CONSUME the index in the method name indicates the occurrence
294
+ * of the optional production in it's top rule.
295
+ *
296
+ * @param actionORMethodDef - The grammar action to optionally invoke once
297
+ * or an "OPTIONS" object describing the grammar action and optional properties.
298
+ */
299
+ // TODO: return `OUT | undefined` explicitly
300
+ protected OPTION<OUT>(
301
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
302
+ ): OUT
303
+
304
+ /**
305
+ * @see OPTION
306
+ * @hidden
307
+ */
308
+ protected OPTION1<OUT>(
309
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
310
+ ): OUT
311
+
312
+ /**
313
+ * @see OPTION
314
+ * @hidden
315
+ */
316
+ protected OPTION2<OUT>(
317
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
318
+ ): OUT
319
+
320
+ /**
321
+ * @see OPTION
322
+ * @hidden
323
+ */
324
+ protected OPTION3<OUT>(
325
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
326
+ ): OUT
327
+
328
+ /**
329
+ * @see OPTION
330
+ * @hidden
331
+ */
332
+ protected OPTION4<OUT>(
333
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
334
+ ): OUT
335
+
336
+ /**
337
+ * @see OPTION
338
+ * @hidden
339
+ */
340
+ protected OPTION5<OUT>(
341
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
342
+ ): OUT
343
+
344
+ /**
345
+ * @see OPTION
346
+ * @hidden
347
+ */
348
+ protected OPTION6<OUT>(
349
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
350
+ ): OUT
351
+
352
+ /**
353
+ * @see OPTION
354
+ * @hidden
355
+ */
356
+ protected OPTION7<OUT>(
357
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
358
+ ): OUT
359
+
360
+ /**
361
+ * @see OPTION
362
+ * @hidden
363
+ */
364
+ protected OPTION8<OUT>(
365
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
366
+ ): OUT
367
+
368
+ /**
369
+ * @see OPTION
370
+ * @hidden
371
+ */
372
+ protected OPTION9<OUT>(
373
+ actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
374
+ ): OUT
375
+
376
+ /**
377
+ * Parsing DSL method that indicates a choice between a set of alternatives must be made.
378
+ * This is equivalent to an EBNF alternation (A | B | C | D ...), except
379
+ * that the alternatives are ordered like in a PEG grammar.
380
+ * This means that the **first** matching alternative is always chosen.
381
+ *
382
+ * There are several forms for the inner alternatives array:
383
+ *
384
+ * - Passing alternatives array directly:
385
+ * ```
386
+ * this.OR([
387
+ * { ALT:() => { this.CONSUME(One) }},
388
+ * { ALT:() => { this.CONSUME(Two) }},
389
+ * { ALT:() => { this.CONSUME(Three) }}
390
+ * ])
391
+ * ```
392
+ *
393
+ * - Passing alternative array directly with predicates (GATE):
394
+ * ```
395
+ * this.OR([
396
+ * { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }},
397
+ * { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }},
398
+ * { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }}
399
+ * ])
400
+ * ```
401
+ *
402
+ * - These syntax forms can also be mixed:
403
+ * ```
404
+ * this.OR([
405
+ * {
406
+ * GATE: predicateFunc1,
407
+ * ALT:() => { this.CONSUME(One) }
408
+ * },
409
+ * { ALT:() => { this.CONSUME(Two) }},
410
+ * { ALT:() => { this.CONSUME(Three) }}
411
+ * ])
412
+ * ```
413
+ *
414
+ * - Additionally an "options" object may be used:
415
+ * ```
416
+ * this.OR({
417
+ * DEF:[
418
+ * { ALT:() => { this.CONSUME(One) }},
419
+ * { ALT:() => { this.CONSUME(Two) }},
420
+ * { ALT:() => { this.CONSUME(Three) }}
421
+ * ],
422
+ * // OPTIONAL property
423
+ * ERR_MSG: "A Number"
424
+ * })
425
+ * ```
426
+ *
427
+ * The 'predicateFuncX' in the long form can be used to add constraints to choosing the alternative.
428
+ *
429
+ * As in CONSUME the index in the method name indicates the occurrence
430
+ * of the alternation production in it's top rule.
431
+ *
432
+ * @param altsOrOpts - A set of alternatives or an "OPTIONS" object describing the alternatives and optional properties.
433
+ *
434
+ * @returns The result of invoking the chosen alternative.
435
+ */
436
+ protected OR(altsOrOpts: IOrAlt[] | OrMethodOpts): any
437
+
438
+ /**
439
+ * @see OR
440
+ * @hidden
441
+ */
442
+ protected OR1(altsOrOpts: IOrAlt[] | OrMethodOpts): any
443
+
444
+ /**
445
+ * @see OR
446
+ * @hidden
447
+ */
448
+ protected OR2(altsOrOpts: IOrAlt[] | OrMethodOpts): any
449
+
450
+ /**
451
+ * @see OR
452
+ * @hidden
453
+ */
454
+ protected OR3(altsOrOpts: IOrAlt[] | OrMethodOpts): any
455
+
456
+ /**
457
+ * @see OR
458
+ * @hidden
459
+ */
460
+ protected OR4(altsOrOpts: IOrAlt[] | OrMethodOpts): any
461
+
462
+ /**
463
+ * @see OR
464
+ * @hidden
465
+ */
466
+ protected OR5(altsOrOpts: IOrAlt[] | OrMethodOpts): any
467
+
468
+ /**
469
+ * @see OR
470
+ * @hidden
471
+ */
472
+ protected OR6(altsOrOpts: IOrAlt[] | OrMethodOpts): any
473
+
474
+ /**
475
+ * @see OR
476
+ * @hidden
477
+ */
478
+ protected OR7(altsOrOpts: IOrAlt[] | OrMethodOpts): any
479
+
480
+ /**
481
+ * @see OR
482
+ * @hidden
483
+ */
484
+ protected OR8(altsOrOpts: IOrAlt[] | OrMethodOpts): any
485
+
486
+ /**
487
+ * @see OR
488
+ * @hidden
489
+ */
490
+ protected OR9(altsOrOpts: IOrAlt[] | OrMethodOpts): any
491
+
492
+ /**
493
+ * Parsing DSL method, that indicates a repetition of zero or more.
494
+ * This is equivalent to EBNF repetition {...}.
495
+ *
496
+ * Note that there are two syntax forms:
497
+ * - Passing the grammar action directly:
498
+ * ```
499
+ * this.MANY(() => {
500
+ * this.CONSUME(Comma)
501
+ * this.CONSUME(Digit)
502
+ * })
503
+ * ```
504
+ *
505
+ * - using an "options" object:
506
+ * ```
507
+ * this.MANY({
508
+ * GATE: predicateFunc,
509
+ * DEF: () => {
510
+ * this.CONSUME(Comma)
511
+ * this.CONSUME(Digit)
512
+ * }
513
+ * });
514
+ * ```
515
+ *
516
+ * The optional 'GATE' property in "options" object form can be used to add constraints
517
+ * to invoking the grammar action.
518
+ *
519
+ * As in CONSUME the index in the method name indicates the occurrence
520
+ * of the repetition production in it's top rule.
521
+ *
522
+ * @param actionORMethodDef - The grammar action to optionally invoke multiple times
523
+ * or an "OPTIONS" object describing the grammar action and optional properties.
524
+ *
525
+ */
526
+ protected MANY(
527
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
528
+ ): void
529
+
530
+ /**
531
+ * @see MANY
532
+ * @hidden
533
+ */
534
+ protected MANY1(
535
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
536
+ ): void
537
+
538
+ /**
539
+ * @see MANY
540
+ * @hidden
541
+ */
542
+ protected MANY2(
543
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
544
+ ): void
545
+
546
+ /**
547
+ * @see MANY
548
+ * @hidden
549
+ */
550
+ protected MANY3(
551
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
552
+ ): void
553
+
554
+ /**
555
+ * @see MANY
556
+ * @hidden
557
+ */
558
+ protected MANY4(
559
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
560
+ ): void
561
+
562
+ /**
563
+ * @see MANY
564
+ * @hidden
565
+ */
566
+ protected MANY5(
567
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
568
+ ): void
569
+
570
+ /**
571
+ * @see MANY
572
+ * @hidden
573
+ */
574
+ protected MANY6(
575
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
576
+ ): void
577
+
578
+ /**
579
+ * @see MANY
580
+ * @hidden
581
+ */
582
+ protected MANY7(
583
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
584
+ ): void
585
+
586
+ /**
587
+ * @see MANY
588
+ * @hidden
589
+ */
590
+ protected MANY8(
591
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
592
+ ): void
593
+
594
+ /**
595
+ * @see MANY
596
+ * @hidden
597
+ */
598
+ protected MANY9(
599
+ actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
600
+ ): void
601
+
602
+ /**
603
+ * Parsing DSL method, that indicates a repetition of zero or more with a separator
604
+ * Token between the repetitions.
605
+ *
606
+ * Example:
607
+ *
608
+ * ```
609
+ * this.MANY_SEP({
610
+ * SEP:Comma,
611
+ * DEF: () => {
612
+ * this.CONSUME(Number};
613
+ * // ...
614
+ * })
615
+ * ```
616
+ *
617
+ * Note that because this DSL method always requires more than one argument the options object is always required
618
+ * and it is not possible to use a shorter form like in the MANY DSL method.
619
+ *
620
+ * Note that for the purposes of deciding on whether or not another iteration exists
621
+ * Only a single Token is examined (The separator). Therefore if the grammar being implemented is
622
+ * so "crazy" to require multiple tokens to identify an item separator please use the more basic DSL methods
623
+ * to implement it.
624
+ *
625
+ * As in CONSUME the index in the method name indicates the occurrence
626
+ * of the repetition production in it's top rule.
627
+ *
628
+ * @param options - An object defining the grammar of each iteration and the separator between iterations
629
+ *
630
+ */
631
+ protected MANY_SEP(options: ManySepMethodOpts<any>): void
632
+
633
+ /**
634
+ * @see MANY_SEP
635
+ * @hidden
636
+ */
637
+ protected MANY_SEP1(options: ManySepMethodOpts<any>): void
638
+
639
+ /**
640
+ * @see MANY_SEP
641
+ * @hidden
642
+ */
643
+ protected MANY_SEP2(options: ManySepMethodOpts<any>): void
644
+
645
+ /**
646
+ * @see MANY_SEP
647
+ * @hidden
648
+ */
649
+ protected MANY_SEP3(options: ManySepMethodOpts<any>): void
650
+
651
+ /**
652
+ * @see MANY_SEP
653
+ * @hidden
654
+ */
655
+ protected MANY_SEP4(options: ManySepMethodOpts<any>): void
656
+
657
+ /**
658
+ * @see MANY_SEP
659
+ * @hidden
660
+ */
661
+ protected MANY_SEP5(options: ManySepMethodOpts<any>): void
662
+
663
+ /**
664
+ * @see MANY_SEP
665
+ * @hidden
666
+ */
667
+ protected MANY_SEP6(options: ManySepMethodOpts<any>): void
668
+
669
+ /**
670
+ * @see MANY_SEP
671
+ * @hidden
672
+ */
673
+ protected MANY_SEP7(options: ManySepMethodOpts<any>): void
674
+
675
+ /**
676
+ * @see MANY_SEP
677
+ * @hidden
678
+ */
679
+ protected MANY_SEP8(options: ManySepMethodOpts<any>): void
680
+
681
+ /**
682
+ * @see MANY_SEP
683
+ * @hidden
684
+ */
685
+ protected MANY_SEP9(options: ManySepMethodOpts<any>): void
686
+
687
+ /**
688
+ * Convenience method, same as MANY but the repetition is of one or more.
689
+ * failing to match at least one repetition will result in a parsing error and
690
+ * cause a parsing error.
691
+ *
692
+ * @see MANY
693
+ *
694
+ * @param actionORMethodDef - The grammar action to optionally invoke multiple times
695
+ * or an "OPTIONS" object describing the grammar action and optional properties.
696
+ *
697
+ */
698
+ protected AT_LEAST_ONE(
699
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
700
+ ): void
701
+
702
+ /**
703
+ * @see AT_LEAST_ONE
704
+ * @hidden
705
+ */
706
+ protected AT_LEAST_ONE1(
707
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
708
+ ): void
709
+
710
+ /**
711
+ * @see AT_LEAST_ONE
712
+ * @hidden
713
+ */
714
+ protected AT_LEAST_ONE2(
715
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
716
+ ): void
717
+
718
+ /**
719
+ * @see AT_LEAST_ONE
720
+ * @hidden
721
+ */
722
+ protected AT_LEAST_ONE3(
723
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
724
+ ): void
725
+
726
+ /**
727
+ * @see AT_LEAST_ONE
728
+ * @hidden
729
+ */
730
+ protected AT_LEAST_ONE4(
731
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
732
+ ): void
733
+
734
+ /**
735
+ * @see AT_LEAST_ONE
736
+ * @hidden
737
+ */
738
+ protected AT_LEAST_ONE5(
739
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
740
+ ): void
741
+
742
+ /**
743
+ * @see AT_LEAST_ONE
744
+ * @hidden
745
+ */
746
+ protected AT_LEAST_ONE6(
747
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
748
+ ): void
749
+
750
+ /**
751
+ * @see AT_LEAST_ONE
752
+ * @hidden
753
+ */
754
+ protected AT_LEAST_ONE7(
755
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
756
+ ): void
757
+
758
+ /**
759
+ * @see AT_LEAST_ONE
760
+ * @hidden
761
+ */
762
+ protected AT_LEAST_ONE8(
763
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
764
+ ): void
765
+
766
+ /**
767
+ * @see AT_LEAST_ONE
768
+ * @hidden
769
+ */
770
+ protected AT_LEAST_ONE9(
771
+ actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
772
+ ): void
773
+
774
+ /**
775
+ * Convenience method, same as MANY_SEP but the repetition is of one or more.
776
+ * failing to match at least one repetition will result in a parsing error and
777
+ * cause the parser to attempt error recovery.
778
+ *
779
+ * Note that an additional optional property ERR_MSG can be used to provide custom error messages.
780
+ *
781
+ * @see MANY_SEP
782
+ *
783
+ * @param options - An object defining the grammar of each iteration and the separator between iterations
784
+ *
785
+ * @return {ISeparatedIterationResult<OUT>}
786
+ */
787
+ protected AT_LEAST_ONE_SEP(
788
+ options: AtLeastOneSepMethodOpts<any>
789
+ ): void
790
+
791
+ /**
792
+ * @see AT_LEAST_ONE_SEP
793
+ * @hidden
794
+ */
795
+ protected AT_LEAST_ONE_SEP1(
796
+ options: AtLeastOneSepMethodOpts<any>
797
+ ): void
798
+
799
+ /**
800
+ * @see AT_LEAST_ONE_SEP
801
+ * @hidden
802
+ */
803
+ protected AT_LEAST_ONE_SEP2(
804
+ options: AtLeastOneSepMethodOpts<any>
805
+ ): void
806
+
807
+ /**
808
+ * @see AT_LEAST_ONE_SEP
809
+ * @hidden
810
+ */
811
+ protected AT_LEAST_ONE_SEP3(
812
+ options: AtLeastOneSepMethodOpts<any>
813
+ ): void
814
+
815
+ /**
816
+ * @see AT_LEAST_ONE_SEP
817
+ * @hidden
818
+ */
819
+ protected AT_LEAST_ONE_SEP4(
820
+ options: AtLeastOneSepMethodOpts<any>
821
+ ): void
822
+
823
+ /**
824
+ * @see AT_LEAST_ONE_SEP
825
+ * @hidden
826
+ */
827
+ protected AT_LEAST_ONE_SEP5(
828
+ options: AtLeastOneSepMethodOpts<any>
829
+ ): void
830
+
831
+ /**
832
+ * @see AT_LEAST_ONE_SEP
833
+ * @hidden
834
+ */
835
+ protected AT_LEAST_ONE_SEP6(
836
+ options: AtLeastOneSepMethodOpts<any>
837
+ ): void
838
+
839
+ /**
840
+ * @see AT_LEAST_ONE_SEP
841
+ * @hidden
842
+ */
843
+ protected AT_LEAST_ONE_SEP7(
844
+ options: AtLeastOneSepMethodOpts<any>
845
+ ): void
846
+
847
+ /**
848
+ * @see AT_LEAST_ONE_SEP
849
+ * @hidden
850
+ */
851
+ protected AT_LEAST_ONE_SEP8(
852
+ options: AtLeastOneSepMethodOpts<any>
853
+ ): void
854
+
855
+ /**
856
+ * @see AT_LEAST_ONE_SEP
857
+ * @hidden
858
+ */
859
+ protected AT_LEAST_ONE_SEP9(
860
+ options: AtLeastOneSepMethodOpts<any>
861
+ ): void
862
+
863
+ /**
864
+ * Returns an "imaginary" Token to insert when Single Token Insertion is done
865
+ * Override this if you require special behavior in your grammar.
866
+ * For example if an IntegerToken is required provide one with the image '0' so it would be valid syntactically.
867
+ */
868
+ protected getTokenToInsert(tokType: TokenType): IToken
869
+
870
+ /**
871
+ * By default all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers
872
+ * for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional
873
+ * semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning
874
+ * depending on its int value and context (Inserting an integer 0 in cardinality: "[1..]" will cause semantic issues
875
+ * as the max of the cardinality will be greater than the min value (and this is a false error!).
876
+ */
877
+ protected canTokenTypeBeInsertedInRecovery(
878
+ tokType: TokenType
879
+ ): boolean
880
+
881
+ /**
882
+ * @deprecated - will be removed in the future
883
+ */
884
+ protected getNextPossibleTokenTypes(
885
+ grammarPath: ITokenGrammarPath
886
+ ): TokenType[]
887
+
888
+ input: IToken[]
889
+
890
+ protected SKIP_TOKEN(): IToken
891
+
892
+ /**
893
+ * Look-Ahead for the Token Vector
894
+ * LA(1) is the next Token ahead.
895
+ * LA(n) is the nth Token ahead.
896
+ * LA(0) is the previously consumed Token.
897
+ *
898
+ * Looking beyond the end of the Token Vector or before its begining
899
+ * will return in an IToken of type EOF {@link EOF}.
900
+ * This behavior can be used to avoid infinite loops.
901
+ *
902
+ * This is often used to implement custom lookahead logic for GATES.
903
+ * https://sap.github.io/chevrotain/docs/features/gates.html
904
+ */
905
+ protected LA(howMuch: number): IToken
906
+ }
907
+
908
+ /**
909
+ * @deprecated Soft deprecated, CstParser or EmbeddedActionsParser instead.
910
+ * - {@link CstParser}
911
+ * - {@link EmbeddedActionsParser}
912
+ */
913
+ export declare class Parser extends BaseParser {
914
+ /**
915
+ * @deprecated use {@link Parser.performSelfAnalysis} **instance** method instead.
916
+ */
917
+ protected static performSelfAnalysis(parserInstance: Parser): void
918
+
919
+ /**
920
+ *
921
+ * @param name - The name of the rule.
922
+ * @param implementation - The implementation of the rule.
923
+ * @param [config] - The rule's optional configuration.
924
+ *
925
+ * @returns - The parsing rule which is the production implementation wrapped with the parsing logic that handles
926
+ * Parser state / error recovery&reporting/ ...
927
+ */
928
+ protected RULE<T>(
929
+ name: string,
930
+ implementation: (...implArgs: any[]) => T,
931
+ config?: IRuleConfig<T>
932
+ ): (idxInCallingRule?: number, ...args: any[]) => T | any
933
+
934
+ /**
935
+ * Same as {@link Parser.RULE}, but should only be used in
936
+ * "extending" grammars to override rules/productions from the super grammar.
937
+ * See [Parser Inheritance Example](https://github.com/SAP/chevrotain/tree/master/examples/parser/inheritance).
938
+ */
939
+ protected OVERRIDE_RULE<T>(
940
+ name: string,
941
+ impl: (...implArgs: any[]) => T,
942
+ config?: IRuleConfig<T>
943
+ ): (idxInCallingRule?: number, ...args: any[]) => T | any
944
+
945
+ protected SUBRULE<T>(
946
+ ruleToCall: (idx: number) => T,
947
+ options?: SubruleMethodOpts
948
+ ): T
949
+
950
+ /**
951
+ * @see SUBRULE
952
+ * @hidden
953
+ */
954
+ protected SUBRULE1<T>(
955
+ ruleToCall: (idx: number) => T,
956
+ options?: SubruleMethodOpts
957
+ ): T
958
+
959
+ /**
960
+ * @see SUBRULE
961
+ * @hidden
962
+ */
963
+ protected SUBRULE2<T>(
964
+ ruleToCall: (idx: number) => T,
965
+ options?: SubruleMethodOpts
966
+ ): T
967
+
968
+ /**
969
+ * @see SUBRULE
970
+ * @hidden
971
+ */
972
+ protected SUBRULE3<T>(
973
+ ruleToCall: (idx: number) => T,
974
+ options?: SubruleMethodOpts
975
+ ): T
976
+
977
+ /**
978
+ * @see SUBRULE
979
+ * @hidden
980
+ */
981
+ protected SUBRULE4<T>(
982
+ ruleToCall: (idx: number) => T,
983
+ options?: SubruleMethodOpts
984
+ ): T
985
+
986
+ /**
987
+ * @see SUBRULE
988
+ * @hidden
989
+ */
990
+ protected SUBRULE5<T>(
991
+ ruleToCall: (idx: number) => T,
992
+ options?: SubruleMethodOpts
993
+ ): T
994
+
995
+ /**
996
+ * @see SUBRULE
997
+ * @hidden
998
+ */
999
+ protected SUBRULE6<T>(
1000
+ ruleToCall: (idx: number) => T,
1001
+ options?: SubruleMethodOpts
1002
+ ): T
1003
+
1004
+ /**
1005
+ * @see SUBRULE
1006
+ * @hidden
1007
+ */
1008
+ protected SUBRULE7<T>(
1009
+ ruleToCall: (idx: number) => T,
1010
+ options?: SubruleMethodOpts
1011
+ ): T
1012
+
1013
+ /**
1014
+ * @see SUBRULE
1015
+ * @hidden
1016
+ */
1017
+ protected SUBRULE8<T>(
1018
+ ruleToCall: (idx: number) => T,
1019
+ options?: SubruleMethodOpts
1020
+ ): T
1021
+
1022
+ /**
1023
+ * @see SUBRULE
1024
+ * @hidden
1025
+ */
1026
+ protected SUBRULE9<T>(
1027
+ ruleToCall: (idx: number) => T,
1028
+ options?: SubruleMethodOpts
1029
+ ): T
1030
+ }
1031
+
1032
+ /**
1033
+ * A Parser that outputs a Concrete Syntax Tree.
1034
+ * See:
1035
+ * - https://sap.github.io/chevrotain/docs/tutorial/step3_adding_actions_root.html#alternatives
1036
+ * - https://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html
1037
+ * For in depth docs.
1038
+ */
1039
+ export declare class CstParser extends BaseParser {
1040
+ // TODO: remove `outputCST` from the config options in the constructor
1041
+ /**
1042
+ * @deprecated use {@link Parser.performSelfAnalysis} **instance** method instead.
1043
+ */
1044
+ protected static performSelfAnalysis(parserInstance: Parser): void
1045
+
1046
+ /**
1047
+ * Creates a Grammar Rule
1048
+ */
1049
+ protected RULE(
1050
+ name: string,
1051
+ implementation: (...implArgs: any[]) => any,
1052
+ config?: IRuleConfig<CstNode>
1053
+ ): (idxInCallingRule?: number, ...args: any[]) => CstNode
1054
+
1055
+ /**
1056
+ * Overrides a Grammar Rule
1057
+ * See usage example in: https://github.com/SAP/chevrotain/blob/master/examples/parser/versioning/versioning.js
1058
+ */
1059
+ protected OVERRIDE_RULE<T>(
1060
+ name: string,
1061
+ implementation: (...implArgs: any[]) => any,
1062
+ config?: IRuleConfig<CstNode>
1063
+ ): (idxInCallingRule?: number, ...args: any[]) => CstNode
1064
+
1065
+ /**
1066
+ * Like `SUBRULE` with the numerical suffix as a parameter, e.g:
1067
+ * subrule(0, X) === SUBRULE(X)
1068
+ * subrule(1, X) === SUBRULE1(X)
1069
+ * subrule(2, X) === SUBRULE2(X)
1070
+ * ...
1071
+ * @see SUBRULE
1072
+ */
1073
+ protected subrule(
1074
+ idx: number,
1075
+ ruleToCall: (idx: number) => CstNode,
1076
+ options?: SubruleMethodOpts
1077
+ ): CstNode
1078
+
1079
+ /**
1080
+ * The Parsing DSL Method is used by one rule to call another.
1081
+ * It is equivalent to a non-Terminal in EBNF notation.
1082
+ *
1083
+ * This may seem redundant as it does not actually do much.
1084
+ * However using it is **mandatory** for all sub rule invocations.
1085
+ *
1086
+ * Calling another rule without wrapping in SUBRULE(...)
1087
+ * will cause errors/mistakes in the Parser's self analysis phase,
1088
+ * which will lead to errors in error recovery/automatic lookahead calculation
1089
+ * and any other functionality relying on the Parser's self analysis
1090
+ * output.
1091
+ *
1092
+ * As in CONSUME the index in the method name indicates the occurrence
1093
+ * of the sub rule invocation in its rule.
1094
+ *
1095
+ */
1096
+ protected SUBRULE(
1097
+ ruleToCall: (idx: number) => CstNode,
1098
+ options?: SubruleMethodOpts
1099
+ ): CstNode
1100
+
1101
+ /**
1102
+ * @see SUBRULE
1103
+ * @hidden
1104
+ */
1105
+ protected SUBRULE1(
1106
+ ruleToCall: (idx: number) => CstNode,
1107
+ options?: SubruleMethodOpts
1108
+ ): CstNode
1109
+
1110
+ /**
1111
+ * @see SUBRULE
1112
+ * @hidden
1113
+ */
1114
+ protected SUBRULE2(
1115
+ ruleToCall: (idx: number) => CstNode,
1116
+ options?: SubruleMethodOpts
1117
+ ): CstNode
1118
+
1119
+ /**
1120
+ * @see SUBRULE
1121
+ * @hidden
1122
+ */
1123
+ protected SUBRULE3(
1124
+ ruleToCall: (idx: number) => CstNode,
1125
+ options?: SubruleMethodOpts
1126
+ ): CstNode
1127
+
1128
+ /**
1129
+ * @see SUBRULE
1130
+ * @hidden
1131
+ */
1132
+ protected SUBRULE4(
1133
+ ruleToCall: (idx: number) => CstNode,
1134
+ options?: SubruleMethodOpts
1135
+ ): CstNode
1136
+
1137
+ /**
1138
+ * @see SUBRULE
1139
+ * @hidden
1140
+ */
1141
+ protected SUBRULE5(
1142
+ ruleToCall: (idx: number) => CstNode,
1143
+ options?: SubruleMethodOpts
1144
+ ): CstNode
1145
+
1146
+ /**
1147
+ * @see SUBRULE
1148
+ * @hidden
1149
+ */
1150
+ protected SUBRULE6(
1151
+ ruleToCall: (idx: number) => CstNode,
1152
+ options?: SubruleMethodOpts
1153
+ ): CstNode
1154
+
1155
+ /**
1156
+ * @see SUBRULE
1157
+ * @hidden
1158
+ */
1159
+ protected SUBRULE7(
1160
+ ruleToCall: (idx: number) => CstNode,
1161
+ options?: SubruleMethodOpts
1162
+ ): CstNode
1163
+
1164
+ /**
1165
+ * @see SUBRULE
1166
+ * @hidden
1167
+ */
1168
+ protected SUBRULE8(
1169
+ ruleToCall: (idx: number) => CstNode,
1170
+ options?: SubruleMethodOpts
1171
+ ): CstNode
1172
+
1173
+ /**
1174
+ * @see SUBRULE
1175
+ * @hidden
1176
+ */
1177
+ protected SUBRULE9(
1178
+ ruleToCall: (idx: number) => CstNode,
1179
+ options?: SubruleMethodOpts
1180
+ ): CstNode
1181
+ }
1182
+
1183
+ /**
1184
+ * A Parser that relies on end user's embedded actions to control its output.
1185
+ * For more details see:
1186
+ * - https://sap.github.io/chevrotain/docs/tutorial/step3_adding_actions_root.html#alternatives
1187
+ * - https://sap.github.io/chevrotain/docs/tutorial/step3b_adding_actions_embedded.html#simple-example
1188
+ */
1189
+ export declare class EmbeddedActionsParser extends BaseParser {
1190
+ /**
1191
+ * @deprecated use {@link Parser.performSelfAnalysis} **instance** method instead.
1192
+ */
1193
+ protected static performSelfAnalysis(parserInstance: Parser): void
1194
+
1195
+ // TODO: remove `outputCST` from the config options in the constructor
1196
+
1197
+ /**
1198
+ * Creates a Grammar Rule
1199
+ */
1200
+ protected RULE<T>(
1201
+ name: string,
1202
+ implementation: (...implArgs: any[]) => T,
1203
+ config?: IRuleConfig<T>
1204
+ ): (idxInCallingRule?: number, ...args: any[]) => T
1205
+
1206
+ /**
1207
+ * Overrides a Grammar Rule
1208
+ * See usage example in: https://github.com/SAP/chevrotain/blob/master/examples/parser/versioning/versioning.js
1209
+ */
1210
+ protected OVERRIDE_RULE<T>(
1211
+ name: string,
1212
+ impl: (...implArgs: any[]) => T,
1213
+ config?: IRuleConfig<T>
1214
+ ): (idxInCallingRule?: number, ...args: any[]) => T
1215
+
1216
+ /**
1217
+ * Like `SUBRULE` with the numerical suffix as a parameter, e.g:
1218
+ * subrule(0, X) === SUBRULE(X)
1219
+ * subrule(1, X) === SUBRULE1(X)
1220
+ * subrule(2, X) === SUBRULE2(X)
1221
+ * ...
1222
+ * @see SUBRULE
1223
+ */
1224
+ protected subrule<T>(
1225
+ idx: number,
1226
+ ruleToCall: (idx: number) => T,
1227
+ options?: SubruleMethodOpts
1228
+ ): T
1229
+
1230
+ /**
1231
+ * The Parsing DSL Method is used by one rule to call another.
1232
+ * It is equivalent to a non-Terminal in EBNF notation.
1233
+ *
1234
+ * This may seem redundant as it does not actually do much.
1235
+ * However using it is **mandatory** for all sub rule invocations.
1236
+ *
1237
+ * Calling another rule without wrapping in SUBRULE(...)
1238
+ * will cause errors/mistakes in the Parser's self analysis phase,
1239
+ * which will lead to errors in error recovery/automatic lookahead calculation
1240
+ * and any other functionality relying on the Parser's self analysis
1241
+ * output.
1242
+ *
1243
+ * As in CONSUME the index in the method name indicates the occurrence
1244
+ * of the sub rule invocation in its rule.
1245
+ *
1246
+ */
1247
+ protected SUBRULE<T>(
1248
+ ruleToCall: (idx: number) => T,
1249
+ options?: SubruleMethodOpts
1250
+ ): T
1251
+
1252
+ /**
1253
+ * @see SUBRULE
1254
+ * @hidden
1255
+ */
1256
+ protected SUBRULE1<T>(
1257
+ ruleToCall: (idx: number) => T,
1258
+ options?: SubruleMethodOpts
1259
+ ): T
1260
+
1261
+ /**
1262
+ * @see SUBRULE
1263
+ * @hidden
1264
+ */
1265
+ protected SUBRULE2<T>(
1266
+ ruleToCall: (idx: number) => T,
1267
+ options?: SubruleMethodOpts
1268
+ ): T
1269
+
1270
+ /**
1271
+ * @see SUBRULE
1272
+ * @hidden
1273
+ */
1274
+ protected SUBRULE3<T>(
1275
+ ruleToCall: (idx: number) => T,
1276
+ options?: SubruleMethodOpts
1277
+ ): T
1278
+
1279
+ /**
1280
+ * @see SUBRULE
1281
+ * @hidden
1282
+ */
1283
+ protected SUBRULE4<T>(
1284
+ ruleToCall: (idx: number) => T,
1285
+ options?: SubruleMethodOpts
1286
+ ): T
1287
+
1288
+ /**
1289
+ * @see SUBRULE
1290
+ * @hidden
1291
+ */
1292
+ protected SUBRULE5<T>(
1293
+ ruleToCall: (idx: number) => T,
1294
+ options?: SubruleMethodOpts
1295
+ ): T
1296
+
1297
+ /**
1298
+ * @see SUBRULE
1299
+ * @hidden
1300
+ */
1301
+ protected SUBRULE6<T>(
1302
+ ruleToCall: (idx: number) => T,
1303
+ options?: SubruleMethodOpts
1304
+ ): T
1305
+
1306
+ /**
1307
+ * @see SUBRULE
1308
+ * @hidden
1309
+ */
1310
+ protected SUBRULE7<T>(
1311
+ ruleToCall: (idx: number) => T,
1312
+ options?: SubruleMethodOpts
1313
+ ): T
1314
+
1315
+ /**
1316
+ * @see SUBRULE
1317
+ * @hidden
1318
+ */
1319
+ protected SUBRULE8<T>(
1320
+ ruleToCall: (idx: number) => T,
1321
+ options?: SubruleMethodOpts
1322
+ ): T
1323
+
1324
+ /**
1325
+ * @see SUBRULE
1326
+ * @hidden
1327
+ */
1328
+ protected SUBRULE9<T>(
1329
+ ruleToCall: (idx: number) => T,
1330
+ options?: SubruleMethodOpts
1331
+ ): T
1332
+ }
1333
+
1334
+ export declare enum ParserDefinitionErrorType {
1335
+ INVALID_RULE_NAME = 0,
1336
+ DUPLICATE_RULE_NAME = 1,
1337
+ INVALID_RULE_OVERRIDE = 2,
1338
+ DUPLICATE_PRODUCTIONS = 3,
1339
+ UNRESOLVED_SUBRULE_REF = 4,
1340
+ LEFT_RECURSION = 5,
1341
+ NONE_LAST_EMPTY_ALT = 6,
1342
+ AMBIGUOUS_ALTS = 7,
1343
+ CONFLICT_TOKENS_RULES_NAMESPACE = 8,
1344
+ INVALID_TOKEN_NAME = 9,
1345
+ INVALID_NESTED_RULE_NAME = 10,
1346
+ DUPLICATE_NESTED_NAME = 11,
1347
+ NO_NON_EMPTY_LOOKAHEAD = 12,
1348
+ AMBIGUOUS_PREFIX_ALTS = 13,
1349
+ TOO_MANY_ALTS = 14
1350
+ }
1351
+
1352
+ export interface ILexerDefinitionError {
1353
+ message: string
1354
+ type: LexerDefinitionErrorType
1355
+ tokenTypes?: TokenType[]
1356
+ }
1357
+
1358
+ export declare class Lexer {
1359
+ static SKIPPED: string
1360
+
1361
+ /**
1362
+ * A Constant to mark "abstract" TokenTypes that are used
1363
+ * purely as token categories.
1364
+ * See: {@link createToken.categories}
1365
+ */
1366
+ static NA: RegExp
1367
+ lexerDefinitionErrors: ILexerDefinitionError[]
1368
+
1369
+ /**
1370
+ * @param lexerDefinition -
1371
+ * Structure composed of Tokens Types this lexer will identify.
1372
+ *
1373
+ * In the simple case the structure is an array of TokenTypes.
1374
+ * In the case of {@link IMultiModeLexerDefinition} the structure is an object with two properties:
1375
+ * 1. a "modes" property where each value is an array of TokenTypes.
1376
+ * 2. a "defaultMode" property specifying the initial lexer mode.
1377
+ *
1378
+ * for example:
1379
+ *
1380
+ * ```
1381
+ * {
1382
+ * modes : {
1383
+ * modeX : [Token1, Token2],
1384
+ * modeY : [Token3, Token4]
1385
+ * },
1386
+ *
1387
+ * defaultMode : "modeY"
1388
+ * }
1389
+ * ```
1390
+ *
1391
+ * A lexer with {@link MultiModesDefinition} is simply multiple Lexers where only one Lexer(mode) can be active at the same time.
1392
+ * This is useful for lexing languages where there are different lexing rules depending on context.
1393
+ *
1394
+ * The current lexing mode is selected via a "mode stack".
1395
+ * The last (peek) value in the stack will be the current mode of the lexer.
1396
+ * Defining entering and exiting lexer modes is done using the "push_mode" and "pop_mode" properites
1397
+ * of the {@link createToken.config} parameter.
1398
+ *
1399
+ * - The Lexer will match the **first** pattern that matches, Therefor the order of Token Types is significant.
1400
+ * For example when one pattern may match a prefix of another pattern.
1401
+ *
1402
+ * Note that there are situations in which we may wish to order the longer pattern after the shorter one.
1403
+ * For example: [keywords vs Identifiers](https://github.com/SAP/chevrotain/tree/master/examples/lexer/keywords_vs_identifiers).
1404
+ */
1405
+ constructor(
1406
+ lexerDefinition: TokenType[] | IMultiModeLexerDefinition,
1407
+ config?: ILexerConfig
1408
+ )
1409
+
1410
+ /**
1411
+ * Will lex(Tokenize) a string.
1412
+ * Note that this can be called repeatedly on different strings as this method
1413
+ * does not modify the state of the Lexer.
1414
+ *
1415
+ * @param text - The string to lex
1416
+ * @param [initialMode] - The initial Lexer Mode to start with, by default this will be the first mode in the lexer's
1417
+ * definition. If the lexer has no explicit modes it will be the implicit single 'default_mode' mode.
1418
+ */
1419
+ tokenize(text: string, initialMode?: string): ILexingResult
1420
+ }
1421
+
1422
+ export interface ILexingResult {
1423
+ tokens: IToken[]
1424
+ groups: {
1425
+ [groupName: string]: IToken[]
1426
+ }
1427
+ errors: ILexingError[]
1428
+ }
1429
+
1430
+ export interface ILexingError {
1431
+ offset: number
1432
+ line: number
1433
+ column: number
1434
+ length: number
1435
+ message: string
1436
+ }
1437
+
1438
+ export interface ILexerConfig {
1439
+ /**
1440
+ * An optional flag indicating that lexer definition errors
1441
+ * should not automatically cause an error to be raised.
1442
+ * This can be useful when wishing to indicate lexer errors in another manner
1443
+ * than simply throwing an error (for example in an online playground).
1444
+ */
1445
+ deferDefinitionErrorsHandling?: boolean
1446
+
1447
+ /**
1448
+ * "full" location information means all six combinations of /(end|start)(Line|Column|Offset)/ properties.
1449
+ * "onlyStart" means that only startLine, startColumn and startOffset will be tracked
1450
+ * "onlyOffset" means that only the startOffset will be tracked.
1451
+ *
1452
+ * The less position tracking the faster the Lexer will be and the less memory used.
1453
+ * However the difference is not large (~10% On V8), thus reduced location tracking options should only be used
1454
+ * in edge cases where every last ounce of performance is needed.
1455
+ */
1456
+ // TODO: consider renaming this to LocationTracking to align with NodeLocationTracking option on the ParserConfig.
1457
+ positionTracking?: "full" | "onlyStart" | "onlyOffset"
1458
+
1459
+ /**
1460
+ * A regExp defining custom line terminators.
1461
+ * This will be used to calculate the line and column information.
1462
+ *
1463
+ * Note that the regExp should use the global flag, for example: /\n/g
1464
+ *
1465
+ * The default is: /\n|\r\n?/g
1466
+ *
1467
+ * But some grammars have a different definition, for example in ECMAScript:
1468
+ * https://www.ecma-international.org/ecma-262/8.0/index.html#sec-line-terminators
1469
+ * U+2028 and U+2029 are also treated as line terminators.
1470
+ *
1471
+ * In that case we would use /\n|\r|\u2028|\u2029/g
1472
+ *
1473
+ * Note that it is also possible to supply an optimized RegExp like implementation
1474
+ * as only a subset of the RegExp APIs is needed, {@link ILineTerminatorsTester}
1475
+ * for details.
1476
+ *
1477
+ * keep in mind that for the default pattern: /\n|\r\n?/g an optimized implementation is already built-in.
1478
+ * This means the optimization is only relevant for lexers overriding the default pattern.
1479
+ */
1480
+ lineTerminatorsPattern?: RegExp | ILineTerminatorsTester
1481
+
1482
+ /**
1483
+ * Characters or CharCodes that represent line terminators for this lexer.
1484
+ * This always needs to be provided when using a custom {@link ILexerConfig.lineTerminatorsPattern}.
1485
+ * In the future this duplication may be removed or reduced.
1486
+ */
1487
+ lineTerminatorCharacters?: (number | string)[]
1488
+
1489
+ /**
1490
+ * When true this flag will cause the Lexer to throw an Error
1491
+ * When it is unable to perform all of its performance optimizations.
1492
+ *
1493
+ * In addition error messages will be printed to the console with details
1494
+ * how to resolve the optimizations issues.
1495
+ *
1496
+ * Use this flag to guarantee higher lexer performance.
1497
+ * The optimizations can boost the lexer's performance anywhere from 30%
1498
+ * to 100%+ depending on the number of TokenTypes used.
1499
+ */
1500
+ ensureOptimizations?: boolean
1501
+
1502
+ /**
1503
+ * Can be used to disable lexer optimizations
1504
+ * If there is a suspicion they are causing incorrect behavior.
1505
+ * Note that this would have negative performance implications.
1506
+ */
1507
+ safeMode?: boolean
1508
+
1509
+ /**
1510
+ * A custom error message provider.
1511
+ * Can be used to override the default error messages.
1512
+ * For example:
1513
+ * - Translating the error messages to a different languages.
1514
+ * - Changing the formatting.
1515
+ */
1516
+ errorMessageProvider?: ILexerErrorMessageProvider
1517
+
1518
+ /**
1519
+ * Enabling this flag will print performance tracing logs during lexer
1520
+ * Initialization (constructor invocation), this is useful to narrow down the cause
1521
+ * of the initialization performance problem.
1522
+ *
1523
+ * You can also pass a numerical value which affects the verbosity
1524
+ * of the traces, this number is the maximum nesting level of the traces, e.g:
1525
+ * 0: Traces disabled === 'false'
1526
+ * 1: Top Level traces only.
1527
+ * 2: One level of nested inner traces.
1528
+ * ...
1529
+ *
1530
+ * Note that passing the boolean `true` is identical to passing the numerical value `infinity`
1531
+ */
1532
+ traceInitPerf?: boolean | number
1533
+
1534
+ /**
1535
+ * This flag will avoid running the Lexer validations during Lexer initialization.
1536
+ *
1537
+ * This can substantially improve the Lexer's initialization (constructor) time.
1538
+ * @see ILexerConfig.traceInitPerf to measure the Lexer validations cost for your Lexer.
1539
+ *
1540
+ * Note that the Lexer validations are **extremely useful** during development time,
1541
+ * e.g: Detecting empty/invalid regExp Patterns.
1542
+ * So they should not be skipped during development flows.
1543
+ * - For example: via a conditional that checks an env variable.
1544
+ */
1545
+ skipValidations?: boolean
1546
+ }
1547
+
1548
+ export interface ILexerErrorMessageProvider {
1549
+ /**
1550
+ * An Unexpected Character Error occurs when the lexer is unable to match a range of one or more
1551
+ * characters in the input text against any of the Token Types in it's Lexer definition
1552
+ *
1553
+ * @param fullText - Full original input text.
1554
+ *
1555
+ * @param startOffset - Offset in input text where error starts.
1556
+ *
1557
+ * @param length - Error length.
1558
+ *
1559
+ * @param line - Line number where the error occured. (optional)
1560
+ * Will not be provided when lexer is not defined to track lines/columns
1561
+ *
1562
+ * @param column - Column number where the error occured. (optional)
1563
+ * Will not be provided when lexer is not defined to track lines/columns
1564
+ */
1565
+ buildUnexpectedCharactersMessage(
1566
+ fullText: string,
1567
+ startOffset: number,
1568
+ length: number,
1569
+ line?: number,
1570
+ column?: number
1571
+ ): string
1572
+
1573
+ /**
1574
+ * Unable To Pop Lexer Mode Error happens when lexer tries to pop the last remaining mode from the mode stack
1575
+ * so that there is no longer any active lexer mode
1576
+ * This error only relevant for multi-mode lexers
1577
+ *
1578
+ * @param token - The Token that requested pop mode.
1579
+ */
1580
+ buildUnableToPopLexerModeMessage(token: IToken): string
1581
+ }
1582
+
1583
+ /**
1584
+ * This is the default logic Chevrotain uses to construct lexing error messages.
1585
+ * It can be used as a reference or as a starting point customize a lexer's
1586
+ * error messages.
1587
+ *
1588
+ * - See: {@link ILexerConfig.errorMessageProvider}
1589
+ */
1590
+ export declare const defaultLexerErrorProvider: ILexerErrorMessageProvider
1591
+
1592
+ /**
1593
+ * A subset of the regExp interface.
1594
+ * Needed to compute line/column info by a chevrotain lexer.
1595
+ */
1596
+ export interface ILineTerminatorsTester {
1597
+ /**
1598
+ * Just like regExp.test
1599
+ */
1600
+ test: (text: string) => boolean
1601
+
1602
+ /**
1603
+ * Just like the regExp lastIndex with the global flag enabled
1604
+ * It should be updated after every match to point to the offset where the next
1605
+ * match attempt starts.
1606
+ */
1607
+ lastIndex: number
1608
+ }
1609
+
1610
+ export type TokenPattern =
1611
+ | RegExp
1612
+ | string
1613
+ | CustomPatternMatcherFunc
1614
+ | ICustomPattern
1615
+
1616
+ export interface ITokenConfig {
1617
+ name: string
1618
+
1619
+ /**
1620
+ * Categories enable polymorphism on Token Types.
1621
+ * A TokenType X with categories C1, C2, ... ,Cn can
1622
+ * be matched by the parser against any of those categories.
1623
+ * In practical terms this means that:
1624
+ * CONSUME(C1) can match a Token of type X.
1625
+ */
1626
+ categories?: TokenType | TokenType[]
1627
+
1628
+ /**
1629
+ * The Label is a human readable name to be used
1630
+ * in error messages and syntax diagrams.
1631
+ *
1632
+ * For example a TokenType may be called LCurly, which is
1633
+ * short for "left curly brace". The much easier to understand
1634
+ * label could simply be "{".
1635
+ */
1636
+ label?: string
1637
+
1638
+ /**
1639
+ * This defines what sequence of characters would be matched
1640
+ * To this TokenType when Lexing.
1641
+ *
1642
+ * For Custom Patterns see: http://sap.github.io/chevrotain/docs/guide/custom_token_patterns.html
1643
+ */
1644
+ pattern?: TokenPattern
1645
+
1646
+ /**
1647
+ * The group property will cause the lexer to collect
1648
+ * Tokens of this type separately from the other Tokens.
1649
+ *
1650
+ * For example this could be used to collect comments for
1651
+ * post processing.
1652
+ *
1653
+ * See: https://github.com/SAP/chevrotain/tree/master/examples/lexer/token_groups
1654
+ */
1655
+ group?: string
1656
+
1657
+ /**
1658
+ * A name of a Lexer mode to "enter" once this Token Type has been matched.
1659
+ * Lexer modes can be used to support different sets of possible Tokens Types
1660
+ *
1661
+ * Lexer Modes work as a stack of Lexers, so "entering" a mode means pushing it to the top of the stack.
1662
+ *
1663
+ * See: https://github.com/SAP/chevrotain/tree/master/examples/lexer/multi_mode_lexer
1664
+ */
1665
+ push_mode?: string
1666
+
1667
+ /**
1668
+ * If "pop_mode" is true the Lexer will pop the last mode of the modes stack and
1669
+ * continue lexing using the new mode at the top of the stack.
1670
+ *
1671
+ * See: https://github.com/SAP/chevrotain/tree/master/examples/lexer/multi_mode_lexer
1672
+ */
1673
+ pop_mode?: boolean
1674
+
1675
+ /**
1676
+ * The "longer_alt" property will cause the Lexer to attempt matching against another Token Type
1677
+ * every time this Token Type has been matched.
1678
+ *
1679
+ * This feature can be useful when two Token Types have common prefixes which
1680
+ * cannot be resolved (only) by the ordering of the Tokens in the lexer definition.
1681
+ *
1682
+ * For example see: https://github.com/SAP/chevrotain/tree/master/examples/lexer/keywords_vs_identifiers
1683
+ * For resolving the keywords vs Identifier ambiguity.
1684
+ */
1685
+ longer_alt?: TokenType
1686
+
1687
+ /**
1688
+ * Can a String matching this Token Type's pattern possibly contain a line terminator?
1689
+ * If true and the line_breaks property is not also true this will cause inaccuracies in the Lexer's line / column tracking.
1690
+ */
1691
+ line_breaks?: boolean
1692
+
1693
+ /**
1694
+ * Possible starting characters or charCodes of the pattern.
1695
+ * These will be used to optimize the Lexer's performance.
1696
+ *
1697
+ * These are normally **automatically** computed, however the option to explicitly
1698
+ * specify those can enable optimizations even when the automatic analysis fails.
1699
+ *
1700
+ * e.g:
1701
+ * * strings hints should be one character long.
1702
+ * ```
1703
+ * { start_chars_hint: ["a", "b"] }
1704
+ * ```
1705
+ *
1706
+ * * number hints are the result of running ".charCodeAt(0)" on the strings.
1707
+ * ```
1708
+ * { start_chars_hint: [97, 98] }
1709
+ * ```
1710
+ *
1711
+ * * For unicode characters outside the BMP use the first of their surrogate pairs.
1712
+ * for example: The '💩' character is represented by surrogate pairs: '\uD83D\uDCA9'
1713
+ * and D83D is 55357 in decimal.
1714
+ * * Note that "💩".charCodeAt(0) === 55357
1715
+ */
1716
+ start_chars_hint?: (string | number)[]
1717
+ }
1718
+
1719
+ /**
1720
+ * Creates a new TokenType which can then be used
1721
+ * to define a Lexer and Parser
1722
+ */
1723
+ export declare function createToken(config: ITokenConfig): TokenType
1724
+
1725
+ /**
1726
+ * Utility to create Chevrotain IToken "instances"
1727
+ * Note that Chevrotain tokens are not real TokenTypes instances
1728
+ * and thus the instanceOf cannot be used with them.
1729
+ */
1730
+ export declare function createTokenInstance(
1731
+ tokType: TokenType,
1732
+ image: string,
1733
+ startOffset: number,
1734
+ endOffset: number,
1735
+ startLine: number,
1736
+ endLine: number,
1737
+ startColumn: number,
1738
+ endColumn: number
1739
+ ): IToken
1740
+
1741
+ /**
1742
+ * API #1 [Custom Token Patterns](http://sap.github.io/chevrotain/docs/guide/custom_token_patterns.html).
1743
+ */
1744
+ export declare type CustomPatternMatcherFunc = (
1745
+ /**
1746
+ * The full input string.
1747
+ */
1748
+ text: string,
1749
+ /**
1750
+ * The offset at which to attempt a match
1751
+ */
1752
+ offset: number,
1753
+ /**
1754
+ * Previously scanned Tokens
1755
+ */
1756
+ tokens: IToken[],
1757
+ /**
1758
+ * Token Groups
1759
+ */
1760
+ groups: {
1761
+ [groupName: string]: IToken[]
1762
+ }
1763
+ ) => CustomPatternMatcherReturn | RegExpExecArray | null // RegExpExecArray included for legacy reasons
1764
+
1765
+ export type CustomPatternMatcherReturn = [string] & { payload?: any }
1766
+
1767
+ export interface TokenType {
1768
+ name: string
1769
+ GROUP?: string
1770
+ PATTERN?: TokenPattern
1771
+ LABEL?: string
1772
+ LONGER_ALT?: TokenType
1773
+ POP_MODE?: boolean
1774
+ PUSH_MODE?: string
1775
+ LINE_BREAKS?: boolean
1776
+ CATEGORIES?: TokenType[]
1777
+ tokenTypeIdx?: number
1778
+ categoryMatches?: number[]
1779
+ categoryMatchesMap?: {
1780
+ [tokType: number]: boolean
1781
+ }
1782
+ isParent?: boolean
1783
+ START_CHARS_HINT?: (string | number)[]
1784
+ }
1785
+
1786
+ /**
1787
+ * API #2 for [Custom Token Patterns](http://sap.github.io/chevrotain/docs/guide/custom_token_patterns.html).
1788
+ */
1789
+ interface ICustomPattern {
1790
+ exec: CustomPatternMatcherFunc
1791
+ }
1792
+
1793
+ /**
1794
+ * Things to note:
1795
+ * - The offset range is inclusive to exclusive.
1796
+ *
1797
+ * - A lineTerminator as the last character does not effect the Token's line numbering.
1798
+ * In other words a new line only starts **after** a line terminator.
1799
+ *
1800
+ * - A Token's image is it's **literal** text.
1801
+ * e.g unicode escaping is untouched.
1802
+ */
1803
+ export interface IToken {
1804
+ /** The textual representation of the Token as it appeared in the text. */
1805
+ image: string
1806
+ /** Offset of the first character of the Token. */
1807
+ startOffset: number
1808
+ /** Line of the first character of the Token. */
1809
+ startLine?: number
1810
+ /** Column of the first character of the Token. */
1811
+ startColumn?: number
1812
+ /** Offset of the last character of the Token. */
1813
+ endOffset?: number
1814
+ /** Line of the last character of the Token. */
1815
+ endLine?: number
1816
+ /** Column of the last character of the Token. */
1817
+ endColumn?: number
1818
+ /** this marks if a Token does not really exist and has been inserted "artificially" during parsing in rule error recovery. */
1819
+ isInsertedInRecovery?: boolean
1820
+ /** An number index representing the type of the Token use <getTokenConstructor> to get the Token Type from a token "instance" */
1821
+ tokenTypeIdx: number
1822
+ /**
1823
+ * The actual Token Type of this Token "instance"
1824
+ * This is the same Object returned by the "createToken" API.
1825
+ * This property is very useful for debugging the Lexing and Parsing phases.
1826
+ */
1827
+ tokenType: TokenType
1828
+
1829
+ /**
1830
+ * Custom Payload value, this is an optional feature of Custom Token Patterns
1831
+ * For additional details see the docs:
1832
+ * https://sap.github.io/chevrotain/docs/guide/custom_token_patterns.html#custom-payloads
1833
+ */
1834
+ payload?: any
1835
+ }
1836
+
1837
+ export declare function tokenName(tokType: TokenType): string
1838
+
1839
+ /**
1840
+ * Returns a human readable label for a TokenType if such exists,
1841
+ * otherwise will return the TokenType's name.
1842
+ *
1843
+ * Labels are useful in improving the readability of error messages and syntax diagrams.
1844
+ * To define labels provide the label property in the {@link createToken} config parameter.
1845
+ */
1846
+ export declare function tokenLabel(tokType: TokenType): string
1847
+
1848
+ /**
1849
+ * A Utility method to check if a token is of the type of the argument Token class.
1850
+ * This utility is needed because Chevrotain tokens support "categories" which means
1851
+ * A TokenType may have multiple categories.
1852
+ *
1853
+ * This means a simple comparison using the {@link IToken.tokenType} property may not suffice.
1854
+ * For example:
1855
+ *
1856
+ * ```
1857
+ * import { createToken, tokenMatcher, Lexer } from "chevrotain"
1858
+ *
1859
+ * // An "abstract" Token used only for categorization purposes.
1860
+ * const NumberTokType = createToken({ name: "NumberTokType", pattern: Lexer.NA })
1861
+ *
1862
+ * const IntegerTokType = createToken({
1863
+ * name: "IntegerTokType",
1864
+ * pattern: /\d+/,
1865
+ * // Integer "Is A" Number
1866
+ * categories: [NumberTokType]
1867
+ * })
1868
+ *
1869
+ * const DecimalTokType = createToken({
1870
+ * name: "DecimalTokType",
1871
+ * pattern: /\d+\.\d+/,
1872
+ * // Double "Is A" Number
1873
+ * categories: [NumberTokType]
1874
+ * })
1875
+ *
1876
+ * // Will always be false as the tokenType property can only
1877
+ * // be Integer or Double Token Types as the Number TokenType is "abstract".
1878
+ * if (myToken.tokenType === NumberTokType) { /* ... *\/ }
1879
+ *
1880
+ * // Will be true when myToken is of Type Integer or Double.
1881
+ * // Because the hierarchy defined by the categories is taken into account.
1882
+ * if (tokenMatcher(myToken, NumberTokType) { /* ... *\/ }
1883
+ * ```
1884
+ *
1885
+ * @returns true iff the token matches the TokenType.
1886
+ */
1887
+ export function tokenMatcher(token: IToken, tokType: TokenType): boolean
1888
+
1889
+ export declare type MultiModesDefinition = {
1890
+ [modeName: string]: TokenType[]
1891
+ }
1892
+
1893
+ export interface IMultiModeLexerDefinition {
1894
+ modes: MultiModesDefinition
1895
+ defaultMode: string
1896
+ }
1897
+
1898
+ export type TokenTypeDictionary = { [tokenName: string]: TokenType }
1899
+
1900
+ export declare type TokenVocabulary =
1901
+ | TokenTypeDictionary
1902
+ | TokenType[]
1903
+ | IMultiModeLexerDefinition
1904
+
1905
+ export interface IRuleConfig<T> {
1906
+ /**
1907
+ * The function which will be invoked to produce the returned value for a production that have not been
1908
+ * successfully executed and the parser recovered from.
1909
+ */
1910
+ recoveryValueFunc?: () => T
1911
+ /**
1912
+ * Enable/Disable re-sync error recovery for this specific production.
1913
+ */
1914
+ resyncEnabled?: boolean
1915
+ }
1916
+
1917
+ export interface DSLMethodOpts<T> {
1918
+ /**
1919
+ * in-lined method name
1920
+ */
1921
+ NAME?: string
1922
+ /**
1923
+ * The Grammar to process in this method.
1924
+ */
1925
+ DEF: GrammarAction<T>
1926
+ /**
1927
+ * A semantic constraint on this DSL method
1928
+ * @see https://github.com/SAP/chevrotain/blob/master/examples/parser/predicate_lookahead/predicate_lookahead.js
1929
+ * For farther details.
1930
+ */
1931
+ GATE?: () => boolean
1932
+
1933
+ /**
1934
+ * Maximum number of "following tokens" which would be used to
1935
+ * Choose between the alternatives.
1936
+ *
1937
+ * By default this value is determined by the {@link IParserConfig.maxLookahead} value.
1938
+ * A Higher value may be used for a specific DSL method to resolve ambiguities
1939
+ * And a lower value may be used to resolve slow initialization times issues.
1940
+ *
1941
+ * TODO: create full docs and link
1942
+ */
1943
+ MAX_LOOKAHEAD?: number
1944
+ }
1945
+
1946
+ export interface DSLMethodOptsWithErr<T> extends DSLMethodOpts<T> {
1947
+ /**
1948
+ * Short title/classification to what is being matched.
1949
+ * Will be used in the error message,.
1950
+ * If none is provided, the error message will include the names of the expected
1951
+ * Tokens sequences which start the method's inner grammar
1952
+ */
1953
+ ERR_MSG?: string
1954
+ }
1955
+
1956
+ export interface OrMethodOpts {
1957
+ NAME?: string
1958
+ /**
1959
+ * The set of alternatives,
1960
+ * See detailed description in {@link Parser.OR}
1961
+ */
1962
+ DEF: IOrAlt[]
1963
+ /**
1964
+ * A description for the alternatives used in error messages
1965
+ * If none is provided, the error message will include the names of the expected
1966
+ * Tokens sequences which may start each alternative.
1967
+ */
1968
+ ERR_MSG?: string
1969
+
1970
+ /**
1971
+ * A Flag indicating that **all** ambiguities in this alternation should
1972
+ * be ignored.
1973
+ *
1974
+ * This flag should only be used in rare circumstances,
1975
+ * As normally alternation ambiguities should be resolved in other ways:
1976
+ * - Re-ordering the alternatives.
1977
+ * - Re-factoring the grammar to extract common prefixes before alternation.
1978
+ * - Using gates {@link IOrAlt.GATE} to implement custom lookahead logic.
1979
+ * - Using the more granular {@link IOrAlt.IGNORE_AMBIGUITIES} on a **specific** alternative.
1980
+ */
1981
+ IGNORE_AMBIGUITIES?: boolean
1982
+
1983
+ /**
1984
+ * Maximum number of "following tokens" which would be used to
1985
+ * Choose between the alternatives.
1986
+ *
1987
+ * By default this value is determined by the {@link IParserConfig.maxLookahead} value.
1988
+ * A Higher value may be used for a specific DSL method to resolve ambiguities
1989
+ * And a lower value may be used to resolve slow initialization times issues.
1990
+ *
1991
+ * TODO: create full docs and link
1992
+ */
1993
+ MAX_LOOKAHEAD?: number
1994
+ }
1995
+
1996
+ export interface ManySepMethodOpts<T> {
1997
+ NAME?: string
1998
+ /**
1999
+ * The grammar to process in each iteration.
2000
+ */
2001
+ DEF: GrammarAction<T>
2002
+ /**
2003
+ * The separator between each iteration.
2004
+ */
2005
+ SEP: TokenType
2006
+
2007
+ /**
2008
+ * @see DSLMethodOpts.MAX_LOOKAHEAD
2009
+ */
2010
+ MAX_LOOKAHEAD?: number
2011
+ }
2012
+
2013
+ export interface AtLeastOneSepMethodOpts<T> extends ManySepMethodOpts<T> {
2014
+ /**
2015
+ * Short title/classification to what is being matched.
2016
+ * Will be used in the error message,.
2017
+ * If none is provided, the error message will include the names of the expected
2018
+ * Tokens sequences which start the method's inner grammar.
2019
+ */
2020
+ ERR_MSG?: string
2021
+ }
2022
+
2023
+ export interface ConsumeMethodOpts {
2024
+ /**
2025
+ * A custom Error message if the Token could not be consumed.
2026
+ * This will override any error message provided by the parser's "errorMessageProvider"
2027
+ */
2028
+ ERR_MSG?: string
2029
+ /**
2030
+ * A label to be used instead of the TokenType name in the created CST.
2031
+ */
2032
+ LABEL?: string
2033
+ }
2034
+
2035
+ export interface SubruleMethodOpts {
2036
+ /**
2037
+ * The arguments to parameterized rules, see:
2038
+ * https://github.com/SAP/chevrotain/blob/master/examples/parser/parametrized_rules/parametrized.js
2039
+ */
2040
+ ARGS?: any[]
2041
+ /**
2042
+ * A label to be used instead of the subrule's name in the created CST.
2043
+ */
2044
+ LABEL?: string
2045
+ }
2046
+
2047
+ export declare type GrammarAction<OUT> = () => OUT
2048
+
2049
+ /**
2050
+ * TODO: remove this in next major version this `IOrAlt` is enough
2051
+ * @deprecated
2052
+ */
2053
+ export declare type IAnyOrAlt = any
2054
+
2055
+ export interface IOrAlt {
2056
+ NAME?: string
2057
+ GATE?: () => boolean
2058
+ ALT: () => any
2059
+ /**
2060
+ * A Flag indicating that any ambiguities involving this
2061
+ * specific alternative Should be ignored.
2062
+ *
2063
+ * This flag will be **implicitly** enabled if a GATE is used
2064
+ * as the assumption is that the GATE is used to resolve an ambiguity.
2065
+ */
2066
+ IGNORE_AMBIGUITIES?: boolean
2067
+ }
2068
+
2069
+ export interface IOrAltWithGate extends IOrAlt {
2070
+ // TODO: deprecate this interface
2071
+ }
2072
+
2073
+ export interface ICstVisitor<IN, OUT> {
2074
+ visit(cstNode: CstNode | CstNode[], param?: IN): OUT
2075
+ validateVisitor(): void
2076
+ }
2077
+
2078
+ /**
2079
+ * A [Concrete Syntax Tree](http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html) Node.
2080
+ * This structure represents the whole parse tree of the grammar
2081
+ * This means that information on each and every Token is present.
2082
+ * This is unlike an AST (Abstract Syntax Tree) where some of the syntactic information is missing.
2083
+ *
2084
+ * For example given an ECMAScript grammar, an AST would normally not contain information on the location
2085
+ * of Commas, Semi colons, redundant parenthesis ect, however a CST would have that information.
2086
+ */
2087
+ export interface CstNode {
2088
+ readonly name: string
2089
+ readonly children: CstChildrenDictionary
2090
+ readonly recoveredNode?: boolean
2091
+
2092
+ /**
2093
+ * Will only be present if the {@link IParserConfig.nodeLocationTracking} is
2094
+ * **not** set to "none".
2095
+ * See: http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html#cstnode-location
2096
+ * For more details.
2097
+ */
2098
+ readonly location?: CstNodeLocation
2099
+ /**
2100
+ * Only relevant for [in-lined](http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html#in-lined-rules) rules.
2101
+ * the fullName will **also** include the name of the top level rule containing this nested rule.
2102
+ */
2103
+ readonly fullName?: string
2104
+ }
2105
+
2106
+ /**
2107
+ * The Column/Line properties will only be present when
2108
+ * The {@link IParserConfig.nodeLocationTracking} is set to "full".
2109
+ */
2110
+ export interface CstNodeLocation {
2111
+ startOffset: number
2112
+ startLine: number
2113
+ startColumn?: number
2114
+ endOffset?: number
2115
+ endLine?: number
2116
+ endColumn?: number
2117
+ }
2118
+
2119
+ export declare type CstChildrenDictionary = {
2120
+ [identifier: string]: CstElement[]
2121
+ }
2122
+
2123
+ export declare type CstElement = IToken | CstNode
2124
+
2125
+ export declare type nodeLocationTrackingOptions = "full" | "onlyOffset" | "none"
2126
+
2127
+ export interface IParserConfig {
2128
+ /**
2129
+ * Is the error recovery / fault tolerance of the Chevrotain Parser enabled.
2130
+ */
2131
+ recoveryEnabled?: boolean
2132
+ /**
2133
+ * Maximum number of tokens the parser will use to choose between alternatives.
2134
+ * By default this value is `4`.
2135
+ * In the future it may be reduced to `3` due to performance considerations.
2136
+ */
2137
+ maxLookahead?: number
2138
+ /**
2139
+ * @deprecated - use the IGNORE_AMBIGUITIES flag on the relevant DSL method instead
2140
+ * - {@link IOrAlt.IGNORE_AMBIGUITIES}
2141
+ * - {@link OrMethodOpts.IGNORE_AMBIGUITIES}
2142
+ *
2143
+ * Used to mark parser definition errors that should be ignored.
2144
+ * For example:
2145
+ *
2146
+ * ```
2147
+ * {
2148
+ * myCustomRule : {
2149
+ * OR3 : true
2150
+ * },
2151
+ * myOtherRule : {
2152
+ * OPTION1 : true,
2153
+ * OR4 : true
2154
+ * }
2155
+ * }
2156
+ * ```
2157
+ *
2158
+ * Be careful when ignoring errors, they are usually there for a reason :).
2159
+ */
2160
+ ignoredIssues?: IgnoredParserIssues
2161
+ /**
2162
+ * Enable This Flag to to support Dynamically defined Tokens.
2163
+ * This will disable performance optimizations which cannot work if the whole Token vocabulary is not known
2164
+ * During Parser initialization.
2165
+ *
2166
+ * See [runnable example](https://github.com/SAP/chevrotain/tree/master/examples/parser/dynamic_tokens)
2167
+ */
2168
+ dynamicTokensEnabled?: boolean
2169
+ /**
2170
+ * @deprecated - extend either CstParser or EmbeddedActionsParser to control this flag instead
2171
+ * - @see CstParser
2172
+ * - @see EmbeddedActionsParser
2173
+ *
2174
+ * Enable automatic Concrete Syntax Tree creation
2175
+ * For in-depth docs on [Concrete Syntax Trees](http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html):
2176
+ */
2177
+ outputCst?: boolean
2178
+ /**
2179
+ * Enable computation of CST nodes location.
2180
+ * By default this is set to "none", meaning this feature is disabled.
2181
+ * See: http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html#cstnode-location
2182
+ * For more details.
2183
+ */
2184
+ nodeLocationTracking?: nodeLocationTrackingOptions
2185
+ /**
2186
+ * A custom error message provider.
2187
+ * Can be used to override the default error messages.
2188
+ * For example:
2189
+ * - Translating the error messages to a different languages.
2190
+ * - Changing the formatting.
2191
+ * - Providing special error messages under certain conditions, e.g: missing semicolons.
2192
+ */
2193
+ errorMessageProvider?: IParserErrorMessageProvider
2194
+ /**
2195
+ * Enabling this flag will print performance tracing logs during parser
2196
+ * Initialization (constructor invocation), this is useful to narrow down the cause
2197
+ * of the initialization performance problem.
2198
+ *
2199
+ * You can also pass a numerical value which affects the verbosity
2200
+ * of the traces, this number is the maximum nesting level of the traces, e.g:
2201
+ * 0: Traces disabled === 'false'
2202
+ * 1: Top Level traces only.
2203
+ * 2: One level of nested inner traces.
2204
+ * ...
2205
+ *
2206
+ * Note that passing the boolean `true` is identical to passing the numerical value `infinity`
2207
+ */
2208
+ traceInitPerf?: boolean | number
2209
+ /**
2210
+ * This flag will avoid running the grammar validations during Parser initialization.
2211
+ *
2212
+ * This can substantially improve the Parser's initialization (constructor) time.
2213
+ * @see IParserConfig.traceInitPerf to measure the grammar validations cost for your parser.
2214
+ *
2215
+ * Note that the grammar validations are **extremely useful** during development time,
2216
+ * e.g: detecting ambiguities / left recursion.
2217
+ * So they should not be skipped during development flows.
2218
+ * - For example: via a conditional that checks an env variable.
2219
+ */
2220
+ skipValidations?: boolean
2221
+ }
2222
+
2223
+ /**
2224
+ * See: {@link IParserConfig.ignoredIssues}
2225
+ */
2226
+ export declare type IgnoredParserIssues = {
2227
+ [ruleName: string]: IgnoredRuleIssues
2228
+ }
2229
+
2230
+ /**
2231
+ * See: {@link IParserConfig.ignoredIssues}
2232
+ */
2233
+ export declare type IgnoredRuleIssues = {
2234
+ [dslNameAndOccurrence: string]: boolean
2235
+ }
2236
+
2237
+ export interface IParserErrorMessageProvider {
2238
+ /**
2239
+ * Mismatched Token Error happens when the parser attempted to consume a terminal and failed.
2240
+ * It corresponds to a failed {@link Parser.CONSUME} in Chevrotain DSL terms.
2241
+ *
2242
+ * @param options.expected - The expected Token Type.
2243
+ *
2244
+ * @param options.actual - The actual Token "instance".
2245
+ *
2246
+ * @param options.previous - The previous Token "instance".
2247
+ * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed.
2248
+ *
2249
+ * @param options.ruleName - The rule in which the error occurred.
2250
+ */
2251
+ buildMismatchTokenMessage?(options: {
2252
+ expected: TokenType
2253
+ actual: IToken
2254
+ previous: IToken
2255
+ ruleName: string
2256
+ }): string
2257
+ /**
2258
+ * A Redundant Input Error happens when the parser has completed parsing but there
2259
+ * is still unprocessed input remaining.
2260
+ *
2261
+ * @param options.firstRedundant - The first unprocessed token "instance".
2262
+ *
2263
+ * @param options.ruleName - The rule in which the error occurred.
2264
+ */
2265
+ buildNotAllInputParsedMessage?(options: {
2266
+ firstRedundant: IToken
2267
+ ruleName: string
2268
+ }): string
2269
+ /**
2270
+ * A No Viable Alternative Error happens when the parser cannot detect any valid alternative in an alternation.
2271
+ * It corresponds to a failed {@link Parser.OR} in Chevrotain DSL terms.
2272
+ *
2273
+ * @param options.expectedPathsPerAlt - First level of the array represents each alternative
2274
+ * The next two levels represent valid (expected) paths in each alternative.
2275
+ *
2276
+ * @param options.actual - The actual sequence of tokens encountered.
2277
+ *
2278
+ * @param options.previous - The previous Token "instance".
2279
+ * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed.
2280
+ *
2281
+ * @param options.customUserDescription - A user may provide custom error message descriptor in the {@link Parser.AT_LEAST_ONE} DSL method
2282
+ * options parameter, this is that custom message.
2283
+ *
2284
+ * @param options.ruleName - The rule in which the error occurred.
2285
+ */
2286
+ buildNoViableAltMessage?(options: {
2287
+ expectedPathsPerAlt: TokenType[][][]
2288
+ actual: IToken[]
2289
+ previous: IToken
2290
+ customUserDescription: string
2291
+ ruleName: string
2292
+ }): string
2293
+ /**
2294
+ * An Early Exit Error happens when the parser cannot detect the first mandatory iteration of a repetition.
2295
+ * It corresponds to a failed {@link Parser.AT_LEAST_ONE} or {@link Parser.AT_LEAST_ONE_SEP} in Chevrotain DSL terms.
2296
+ *
2297
+ * @param options.expectedIterationPaths - The valid (expected) paths in the first iteration.
2298
+ *
2299
+ * @param options.actual - The actual sequence of tokens encountered.
2300
+ *
2301
+ * @param options.previous - The previous Token "instance".
2302
+ * This is useful if options.actual[0] is of type chevrotain.EOF and you need to know the last token parsed.
2303
+ *
2304
+ * @param options.customUserDescription - A user may provide custom error message descriptor in the {@link Parser.AT_LEAST_ONE} DSL method
2305
+ * options parameter, this is that custom message.
2306
+ *
2307
+ * @param options.ruleName - The rule in which the error occurred.
2308
+ */
2309
+ buildEarlyExitMessage?(options: {
2310
+ expectedIterationPaths: TokenType[][]
2311
+ actual: IToken[]
2312
+ previous: IToken
2313
+ customUserDescription: string
2314
+ ruleName: string
2315
+ }): string
2316
+ }
2317
+
2318
+ export interface IRecognizerContext {
2319
+ /**
2320
+ * A copy of the parser's rule stack at the "time" the RecognitionException occurred.
2321
+ * This can be used to help debug parsing errors (How did we get here?).
2322
+ */
2323
+ ruleStack: string[]
2324
+ /**
2325
+ * A copy of the parser's rule occurrence stack at the "time" the RecognitionException occurred.
2326
+ * This can be used to help debug parsing errors (How did we get here?).
2327
+ */
2328
+ ruleOccurrenceStack: number[]
2329
+ }
2330
+
2331
+ export declare type ISeparatedIterationResult<OUT> = {
2332
+ values: OUT[]
2333
+ separators: IToken[]
2334
+ }
2335
+
2336
+ export interface ISerializedGast {
2337
+ type:
2338
+ | "NonTerminal"
2339
+ | "Flat"
2340
+ | "Option"
2341
+ | "RepetitionMandatory"
2342
+ | "RepetitionMandatoryWithSeparator"
2343
+ | "Repetition"
2344
+ | "RepetitionWithSeparator"
2345
+ | "Alternation"
2346
+ | "Terminal"
2347
+ | "Rule"
2348
+ definition?: ISerializedGast[]
2349
+ }
2350
+
2351
+ /**
2352
+ * Structure for the path the parser "took" to reach a certain position
2353
+ * in the grammar.
2354
+ */
2355
+ export interface IGrammarPath {
2356
+ /**
2357
+ * The Grammar rules invoked and still unterminated to reach this Grammar Path.
2358
+ */
2359
+ ruleStack: string[]
2360
+ /**
2361
+ * The occurrence index (SUBRULE1/2/3/5/...) of each Grammar rule invoked and still unterminated.
2362
+ * Used to distinguish between **different** invocations of the same subrule at the same top level rule.
2363
+ */
2364
+ occurrenceStack: number[]
2365
+ }
2366
+
2367
+ export interface ISyntacticContentAssistPath extends IGrammarPath {
2368
+ nextTokenType: TokenType
2369
+ nextTokenOccurrence: number
2370
+ }
2371
+
2372
+ export interface ITokenGrammarPath extends IGrammarPath {
2373
+ lastTok: TokenType
2374
+ lastTokOccurrence: number
2375
+ }
2376
+
2377
+ export declare enum LexerDefinitionErrorType {
2378
+ MISSING_PATTERN = 0,
2379
+ INVALID_PATTERN = 1,
2380
+ EOI_ANCHOR_FOUND = 2,
2381
+ UNSUPPORTED_FLAGS_FOUND = 3,
2382
+ DUPLICATE_PATTERNS_FOUND = 4,
2383
+ INVALID_GROUP_TYPE_FOUND = 5,
2384
+ PUSH_MODE_DOES_NOT_EXIST = 6,
2385
+ MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7,
2386
+ MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8,
2387
+ MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9,
2388
+ LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10,
2389
+ SOI_ANCHOR_FOUND = 11,
2390
+ EMPTY_MATCH_PATTERN = 12,
2391
+ NO_LINE_BREAKS_FLAGS = 13,
2392
+ UNREACHABLE_PATTERN = 14,
2393
+ IDENTIFY_TERMINATOR = 15,
2394
+ CUSTOM_LINE_BREAK = 16
2395
+ }
2396
+
2397
+ /**
2398
+ * Type of End Of File Token.
2399
+ */
2400
+ export declare const EOF: TokenType
2401
+
2402
+ /**
2403
+ * Convenience used to express an **empty** alternative in an OR (alternation).
2404
+ * can be used to more clearly describe the intent in a case of empty alternation.
2405
+ *
2406
+ * For example:
2407
+ *
2408
+ * 1. without using EMPTY_ALT:
2409
+ * ```
2410
+ * this.OR([
2411
+ * {ALT: () => {
2412
+ * this.CONSUME1(OneTok)
2413
+ * return "1"
2414
+ * }},
2415
+ * {ALT: () => {
2416
+ * this.CONSUME1(TwoTok)
2417
+ * return "2"
2418
+ * }},
2419
+ * // implicitly empty because there are no invoked grammar
2420
+ * // rules (OR/MANY/CONSUME...) inside this alternative.
2421
+ * {ALT: () => {
2422
+ * return "666"
2423
+ * }},
2424
+ * ])
2425
+ * ```
2426
+ *
2427
+ * 2. using EMPTY_ALT:
2428
+ * ```
2429
+ * this.OR([
2430
+ * {ALT: () => {
2431
+ * this.CONSUME1(OneTok)
2432
+ * return "1"
2433
+ * }},
2434
+ * {ALT: () => {
2435
+ * this.CONSUME1(TwoTok)
2436
+ * return "2"
2437
+ * }},
2438
+ * // explicitly empty, clearer intent
2439
+ * {ALT: EMPTY_ALT("666")},
2440
+ * ])
2441
+ * ```
2442
+ */
2443
+ export declare function EMPTY_ALT<T>(value?: T): () => T
2444
+
2445
+ /**
2446
+ * This is the default logic Chevrotain uses to construct error messages.
2447
+ * It can be used as a reference or as a starting point customize a parser's
2448
+ * error messages.
2449
+ *
2450
+ * - See: {@link IParserConfig.errorMessageProvider}
2451
+ */
2452
+ export declare const defaultParserErrorProvider: IParserErrorMessageProvider
2453
+
2454
+ /**
2455
+ * A Chevrotain Parser runtime exception.
2456
+ */
2457
+ export interface IRecognitionException {
2458
+ name: string
2459
+ message: string
2460
+ /**
2461
+ * The token which caused the parser error.
2462
+ */
2463
+ token: IToken
2464
+ /**
2465
+ * Additional tokens which have been re-synced in error recovery due to the original error.
2466
+ * This information can be used the calculate the whole text area which has been skipped due to an error.
2467
+ * For example for displaying with a red underline in a text editor.
2468
+ */
2469
+ resyncedTokens: IToken[]
2470
+ context: IRecognizerContext
2471
+ }
2472
+
2473
+ /**
2474
+ * A utility to detect if an Error is a Chevrotain Parser's runtime exception.
2475
+ */
2476
+ export declare function isRecognitionException(error: Error): boolean
2477
+
2478
+ // TODO refactor exceptions constructors to classes
2479
+
2480
+ /**
2481
+ * An exception of this type will be saved in {@link Parser.errors} when {@link Parser.CONSUME}
2482
+ * was called but failed to match the expected Token Type.
2483
+ */
2484
+ export declare class MismatchedTokenException extends Error {
2485
+ constructor(message: string, token: IToken, previousToken: IToken)
2486
+ }
2487
+
2488
+ /**
2489
+ * An exception of this type will be saved in {@link Parser.errors} when {@link Parser.OR}
2490
+ * was called yet none of the possible alternatives could be matched.
2491
+ */
2492
+ export declare class NoViableAltException extends Error {
2493
+ constructor(message: string, token: IToken, previousToken: IToken)
2494
+ }
2495
+
2496
+ /**
2497
+ * An exception of this type will be saved in {@link Parser.errors} when
2498
+ * the parser has finished yet there exists remaining input (tokens) that has not processed.
2499
+ */
2500
+ export declare class NotAllInputParsedException extends Error {
2501
+ constructor(message: string, token: IToken)
2502
+ }
2503
+
2504
+ /**
2505
+ * An exception of this type will be saved in {@link Parser.errors} when {@link Parser.AT_LEAST_ONE}
2506
+ * or {@link Parser.AT_LEAST_ONE_SEP} was called but failed to match even a single iteration.
2507
+ */
2508
+ export declare class EarlyExitException extends Error {
2509
+ constructor(message: string, token: IToken, previousToken: IToken)
2510
+ }
2511
+
2512
+ export interface IOptionallyNamedProduction {
2513
+ name?: string
2514
+ }
2515
+ export interface IProduction {
2516
+ accept(visitor: IGASTVisitor): void
2517
+ }
2518
+
2519
+ export interface IProductionWithOccurrence extends IProduction {
2520
+ idx: number
2521
+ }
2522
+
2523
+ /**
2524
+ * A very basic implementation of a Visitor Pattern
2525
+ * For the Grammar AST structure.
2526
+ *
2527
+ * This may be useful for advanced users who create custom logic on the grammar AST.
2528
+ * For example, custom validations or introspection.
2529
+ */
2530
+ export abstract class GAstVisitor {
2531
+ visit(node: IProduction): any
2532
+
2533
+ abstract visitNonTerminal(node: NonTerminal): any
2534
+
2535
+ abstract visitFlat(node: Flat): any
2536
+
2537
+ abstract visitOption(node: Option): any
2538
+
2539
+ abstract visitRepetition(node: Repetition): any
2540
+
2541
+ abstract visitRepetitionMandatory(node: RepetitionMandatory): any
2542
+
2543
+ abstract visitRepetitionMandatoryWithSeparator(
2544
+ node: RepetitionMandatoryWithSeparator
2545
+ ): any
2546
+
2547
+ abstract visitRepetitionWithSeparator(node: RepetitionWithSeparator): any
2548
+
2549
+ abstract visitAlternation(node: Alternation): any
2550
+
2551
+ abstract visitTerminal(node: Terminal): any
2552
+
2553
+ abstract visitRule(node: Rule): any
2554
+ }
2555
+
2556
+ /**
2557
+ * The Grammar AST class representing a top level {@link Parser.RULE} call.
2558
+ */
2559
+ export declare class Rule {
2560
+ name: string
2561
+ orgText: string
2562
+ definition: IProduction[]
2563
+
2564
+ constructor(options: {
2565
+ name: string
2566
+ definition: IProduction[]
2567
+ orgText?: string
2568
+ })
2569
+
2570
+ accept(visitor: IGASTVisitor): void
2571
+ }
2572
+
2573
+ /**
2574
+ * The Grammar AST class representing a top level {@link Parser.SUBRULE} call.
2575
+ */
2576
+ export declare class NonTerminal implements IProductionWithOccurrence {
2577
+ nonTerminalName: string
2578
+ referencedRule: Rule
2579
+ idx: number
2580
+ constructor(options: {
2581
+ nonTerminalName: string
2582
+ referencedRule?: Rule
2583
+ idx?: number
2584
+ })
2585
+ definition: IProduction[]
2586
+ accept(visitor: IGASTVisitor): void
2587
+ }
2588
+
2589
+ /**
2590
+ * The Grammar AST class used to represent a sequence.
2591
+ * This is normally only used in {@link Alternation} to distinguish
2592
+ * between the different alternatives.
2593
+ */
2594
+ export declare class Flat implements IOptionallyNamedProduction {
2595
+ name: string
2596
+ definition: IProduction[]
2597
+
2598
+ constructor(options: { definition: IProduction[]; name?: string })
2599
+
2600
+ accept(visitor: IGASTVisitor): void
2601
+ }
2602
+
2603
+ /**
2604
+ * The Grammar AST class representing a {@link Parser.OPTION} call.
2605
+ */
2606
+ export declare class Option
2607
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2608
+ idx: number
2609
+ name?: string
2610
+ definition: IProduction[]
2611
+
2612
+ constructor(options: {
2613
+ definition: IProduction[]
2614
+ idx?: number
2615
+ name?: string
2616
+ })
2617
+
2618
+ accept(visitor: IGASTVisitor): void
2619
+ }
2620
+
2621
+ /**
2622
+ * The Grammar AST class representing a {@link Parser.AT_LEAST_ONE} call.
2623
+ */
2624
+ export declare class RepetitionMandatory
2625
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2626
+ name: string
2627
+ idx: number
2628
+ definition: IProduction[]
2629
+
2630
+ constructor(options: {
2631
+ definition: IProduction[]
2632
+ idx?: number
2633
+ name?: string
2634
+ })
2635
+
2636
+ accept(visitor: IGASTVisitor): void
2637
+ }
2638
+
2639
+ /**
2640
+ * The Grammar AST class representing a {@link Parser.AT_LEAST_ONE_SEP} call.
2641
+ */
2642
+ export declare class RepetitionMandatoryWithSeparator
2643
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2644
+ separator: TokenType
2645
+ idx: number
2646
+ name: string
2647
+ definition: IProduction[]
2648
+
2649
+ constructor(options: {
2650
+ definition: IProduction[]
2651
+ separator: TokenType
2652
+ idx?: number
2653
+ name?: string
2654
+ })
2655
+
2656
+ accept(visitor: IGASTVisitor): void
2657
+ }
2658
+
2659
+ /**
2660
+ * The Grammar AST class representing a {@link Parser.MANY} call.
2661
+ */
2662
+ export declare class Repetition
2663
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2664
+ separator: TokenType
2665
+ idx: number
2666
+ name: string
2667
+ definition: IProduction[]
2668
+
2669
+ constructor(options: {
2670
+ definition: IProduction[]
2671
+ idx?: number
2672
+ name?: string
2673
+ })
2674
+
2675
+ accept(visitor: IGASTVisitor): void
2676
+ }
2677
+
2678
+ /**
2679
+ * The Grammar AST class representing a {@link Parser.MANY_SEP} call.
2680
+ */
2681
+ export declare class RepetitionWithSeparator
2682
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2683
+ separator: TokenType
2684
+ idx: number
2685
+ name: string
2686
+ definition: IProduction[]
2687
+
2688
+ constructor(options: {
2689
+ definition: IProduction[]
2690
+ separator: TokenType
2691
+ idx?: number
2692
+ name?: string
2693
+ })
2694
+
2695
+ accept(visitor: IGASTVisitor): void
2696
+ }
2697
+
2698
+ /**
2699
+ * The Grammar AST class representing a {@link Parser.OR} call.
2700
+ */
2701
+ export declare class Alternation
2702
+ implements IProductionWithOccurrence, IOptionallyNamedProduction {
2703
+ idx: number
2704
+ name: string
2705
+ definition: IProduction[]
2706
+
2707
+ constructor(options: {
2708
+ definition: IProduction[]
2709
+ idx?: number
2710
+ name?: string
2711
+ })
2712
+
2713
+ accept(visitor: IGASTVisitor): void
2714
+ }
2715
+
2716
+ /**
2717
+ * The Grammar AST class representing a {@link Parser.CONSUME} call.
2718
+ */
2719
+ export declare class Terminal implements IProductionWithOccurrence {
2720
+ terminalType: TokenType
2721
+ idx: number
2722
+ constructor(options: { terminalType: TokenType; idx?: number })
2723
+ accept(visitor: IGASTVisitor): void
2724
+ }
2725
+
2726
+ export interface IGASTVisitor {
2727
+ visit(prod: IProduction): any
2728
+ }
2729
+
2730
+ /**
2731
+ * Serialize a Grammar to a JSON Object.
2732
+ *
2733
+ * This can be useful for scenarios requiring exporting the grammar structure
2734
+ * for example drawing syntax diagrams.
2735
+ */
2736
+ export declare function serializeGrammar(topRules: Rule[]): ISerializedGast[]
2737
+
2738
+ /**
2739
+ * Like {@link serializeGrammar} but for a single GAST Production instead of a set of Rules.
2740
+ */
2741
+ export declare function serializeProduction(node: IProduction): ISerializedGast
2742
+
2743
+ /**
2744
+ * A utility to resolve a grammar AST (rules parameter).
2745
+ * "Resolving" means assigning the appropiate value for all {@link NonTerminal.referencedRule}
2746
+ * properties in the grammar AST.
2747
+ *
2748
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html)
2749
+ */
2750
+ export declare function resolveGrammar(options: {
2751
+ rules: Rule[]
2752
+ errMsgProvider?: IGrammarResolverErrorMessageProvider
2753
+ }): IParserDefinitionError[]
2754
+
2755
+ /**
2756
+ * A utility to validate a grammar AST (rules parameter).
2757
+ * For example: left recursion detection, ambiguity detection, ...
2758
+ *
2759
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html)
2760
+ */
2761
+ export declare function validateGrammar(options: {
2762
+ rules: Rule[]
2763
+ /**
2764
+ * The maximum lookahead used in the grammar.
2765
+ * This number is needed to perform ambiguity detection.
2766
+ */
2767
+ maxLookahead: number
2768
+ /**
2769
+ * The Token Types used by the grammar.
2770
+ */
2771
+ tokenTypes: TokenType[]
2772
+ grammarName: string
2773
+ errMsgProvider: IGrammarValidatorErrorMessageProvider
2774
+ ignoredIssues?: IgnoredParserIssues
2775
+ }): IParserDefinitionError[]
2776
+
2777
+ /**
2778
+ * A utility for assigning unique occurence indices to a grammar AST (rules parameter).
2779
+ * This can be useful when using Chevrotain to create custom APIs.
2780
+ *
2781
+ * - FAQ: [Why are these unique occurences needed](http://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES)
2782
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html)
2783
+ */
2784
+ export declare function assignOccurrenceIndices(options: {
2785
+ rules: Rule[]
2786
+ }): void
2787
+
2788
+ /**
2789
+ * The default grammar validations errror message provider used by Chevrotain.
2790
+ * this can be used as the basis for custom error providers when using Chevrotain's
2791
+ * custom APIs.
2792
+ *
2793
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html#grammar-validations)
2794
+ */
2795
+ export declare const defaultGrammarValidatorErrorProvider: IGrammarValidatorErrorMessageProvider
2796
+
2797
+ /**
2798
+ * The default grammar resolver errror message provider used by Chevrotain.
2799
+ * this can be used as the basis for custom error providers when using Chevrotain's
2800
+ * custom APIs.
2801
+ *
2802
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html#grammar-validations)
2803
+ */
2804
+ export declare const defaultGrammarResolverErrorProvider: IGrammarResolverErrorMessageProvider
2805
+
2806
+ /**
2807
+ * Implementing this interface enables customizing grammar validation errors
2808
+ * when using custom APIs.
2809
+ *
2810
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html#grammar-validations)
2811
+ */
2812
+ export interface IGrammarValidatorErrorMessageProvider {
2813
+ buildDuplicateFoundError(
2814
+ topLevelRule: Rule,
2815
+ duplicateProds: IProductionWithOccurrence[]
2816
+ ): string
2817
+ buildInvalidNestedRuleNameError(
2818
+ topLevelRule: Rule,
2819
+ nestedProd: IOptionallyNamedProduction
2820
+ ): string
2821
+ buildDuplicateNestedRuleNameError(
2822
+ topLevelRule: Rule,
2823
+ nestedProd: IOptionallyNamedProduction[]
2824
+ ): string
2825
+ buildNamespaceConflictError(topLevelRule: Rule): string
2826
+ buildAlternationPrefixAmbiguityError(options: {
2827
+ topLevelRule: Rule
2828
+ prefixPath: TokenType[]
2829
+ ambiguityIndices: number[]
2830
+ alternation: Alternation
2831
+ }): string
2832
+ buildAlternationAmbiguityError(options: {
2833
+ topLevelRule: Rule
2834
+ prefixPath: TokenType[]
2835
+ ambiguityIndices: number[]
2836
+ alternation: Alternation
2837
+ }): string
2838
+ buildEmptyRepetitionError(options: {
2839
+ topLevelRule: Rule
2840
+ repetition: IProductionWithOccurrence
2841
+ }): string
2842
+ buildTokenNameError(options: {
2843
+ tokenType: TokenType
2844
+ expectedPattern: RegExp
2845
+ }): any
2846
+ buildEmptyAlternationError(options: {
2847
+ topLevelRule: Rule
2848
+ alternation: Alternation
2849
+ emptyChoiceIdx: number
2850
+ }): any
2851
+ buildTooManyAlternativesError(options: {
2852
+ topLevelRule: Rule
2853
+ alternation: Alternation
2854
+ }): string
2855
+ buildLeftRecursionError(options: {
2856
+ topLevelRule: Rule
2857
+ leftRecursionPath: Rule[]
2858
+ }): string
2859
+ buildInvalidRuleNameError(options: {
2860
+ topLevelRule: Rule
2861
+ expectedPattern: RegExp
2862
+ }): string
2863
+ buildDuplicateRuleNameError(options: {
2864
+ topLevelRule: Rule | string
2865
+ grammarName: string
2866
+ }): string
2867
+ }
2868
+
2869
+ /**
2870
+ * Implementing this interface enables customizing grammar resolving errors
2871
+ * when using custom APIs.
2872
+ *
2873
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html#grammar-validations)
2874
+ */
2875
+ export interface IGrammarResolverErrorMessageProvider {
2876
+ buildRuleNotFoundError(
2877
+ topLevelRule: Rule,
2878
+ undefinedRule: NonTerminal
2879
+ ): string
2880
+ }
2881
+
2882
+ /**
2883
+ * Structure of grammar validations errors.
2884
+ *
2885
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html#grammar-validations)
2886
+ */
2887
+ export interface IParserDefinitionError {
2888
+ message: string
2889
+ type: ParserDefinitionErrorType
2890
+ ruleName?: string
2891
+ }
2892
+
2893
+ /**
2894
+ * @deprecated
2895
+ * This function no longer does anything, Avoid using this function
2896
+ * As it will be removed in future versions.
2897
+ */
2898
+ export declare function clearCache(): void
2899
+
2900
+ /**
2901
+ * Structure of configuration object for {@link createSyntaxDiagramsCode}
2902
+ */
2903
+ export interface ICreateSyntaxDiagramsConfig {
2904
+ /**
2905
+ * Base Url to load the runtime resources for rendering the diagrams
2906
+ */
2907
+ resourceBase?: string
2908
+ /**
2909
+ * Url to load the styleSheet, replace with your own for styling customization.
2910
+ */
2911
+ css?: string
2912
+ }
2913
+
2914
+ /**
2915
+ * Will generate an html source code (text).
2916
+ * This html text will render syntax diagrams for the provided grammar.
2917
+ *
2918
+ * - See detailed docs for [Syntax Diagrams](http://sap.github.io/chevrotain/docs/guide/generating_syntax_diagrams.html).
2919
+ */
2920
+ export declare function createSyntaxDiagramsCode(
2921
+ grammar: ISerializedGast[],
2922
+ config?: ICreateSyntaxDiagramsConfig
2923
+ ): string
2924
+
2925
+ /**
2926
+ * Generate A Parser factory from a set of Rules.
2927
+ *
2928
+ * This variant will Create a factory function that once invoked with a IParserConfig will return
2929
+ * a Parser Object.
2930
+ *
2931
+ * - Note that this happens using the Function constructor (a type of "eval") so it will not work in environments
2932
+ * where content security policy is enabled, such as certain websites, Chrome extensions ect...
2933
+ *
2934
+ * This means this function is best used for development flows to reduce the feedback loops
2935
+ * or for productive flows targeting node.js only.
2936
+ *
2937
+ * For productive flows targeting a browser runtime see {@link generateParserModule}.
2938
+ *
2939
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html).
2940
+ */
2941
+ export declare function generateParserFactory(options: {
2942
+ name: string
2943
+ rules: Rule[]
2944
+ tokenVocabulary: TokenVocabulary
2945
+ }): (config?: IParserConfig) => Parser
2946
+
2947
+ /**
2948
+ * Generate A Parser's text from a set of Rules.
2949
+ *
2950
+ * This variant will generate the **string literal** for a UMD module https://github.com/umdjs/umd
2951
+ * That exports a Parser Constructor.
2952
+ *
2953
+ * - Note that the constructor exposed by the generated module must receive the TokenVocabulary as the first
2954
+ * argument, the IParser config can be passed as the second argument.
2955
+ *
2956
+ * - See detailed docs for [Custom APIs](http://sap.github.io/chevrotain/docs/guide/custom_apis.html).
2957
+ */
2958
+ export declare function generateParserModule(options: {
2959
+ name: string
2960
+ rules: Rule[]
2961
+ }): string