create-docusaurus 0.0.0-4483 → 0.0.0-4487

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 (872) hide show
  1. package/lib/index.js +3 -4
  2. package/package.json +3 -3
  3. package/templates/classic/package.json +3 -3
  4. package/templates/classic-typescript/package.json +4 -4
  5. package/templates/facebook/package.json +3 -3
  6. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/CHANGELOG.md +0 -18
  7. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/LICENSE +0 -21
  8. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/README.md +0 -91
  9. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/camel-case.js +0 -13
  10. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/extract.js +0 -462
  11. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/get-template.js +0 -7
  12. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/index.js +0 -6
  13. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/literal.js +0 -23
  14. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object-parse.js +0 -15
  15. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object-parser.js +0 -357
  16. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object-stringifier.js +0 -153
  17. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object-stringify.js +0 -9
  18. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object-syntax.js +0 -11
  19. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/object.js +0 -24
  20. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/package.json +0 -119
  21. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-parse.js +0 -19
  22. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-parser-helper.js +0 -260
  23. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-parser.js +0 -20
  24. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-safe-parse.js +0 -19
  25. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-safe-parser.js +0 -21
  26. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-stringifier.js +0 -23
  27. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-stringify.js +0 -9
  28. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/template-tokenize.js +0 -67
  29. package/templates/facebook/node_modules/@stylelint/postcss-css-in-js/un-camel-case.js +0 -13
  30. package/templates/facebook/node_modules/@stylelint/postcss-markdown/CHANGELOG.md +0 -13
  31. package/templates/facebook/node_modules/@stylelint/postcss-markdown/LICENSE +0 -21
  32. package/templates/facebook/node_modules/@stylelint/postcss-markdown/README.md +0 -92
  33. package/templates/facebook/node_modules/@stylelint/postcss-markdown/extract.js +0 -42
  34. package/templates/facebook/node_modules/@stylelint/postcss-markdown/index.js +0 -5
  35. package/templates/facebook/node_modules/@stylelint/postcss-markdown/package.json +0 -63
  36. package/templates/facebook/node_modules/autoprefixer/LICENSE +0 -20
  37. package/templates/facebook/node_modules/autoprefixer/README.md +0 -73
  38. package/templates/facebook/node_modules/autoprefixer/bin/autoprefixer +0 -22
  39. package/templates/facebook/node_modules/autoprefixer/data/prefixes.js +0 -714
  40. package/templates/facebook/node_modules/autoprefixer/lib/at-rule.js +0 -62
  41. package/templates/facebook/node_modules/autoprefixer/lib/autoprefixer.js +0 -150
  42. package/templates/facebook/node_modules/autoprefixer/lib/brackets.js +0 -64
  43. package/templates/facebook/node_modules/autoprefixer/lib/browsers.js +0 -96
  44. package/templates/facebook/node_modules/autoprefixer/lib/declaration.js +0 -243
  45. package/templates/facebook/node_modules/autoprefixer/lib/hacks/align-content.js +0 -79
  46. package/templates/facebook/node_modules/autoprefixer/lib/hacks/align-items.js +0 -76
  47. package/templates/facebook/node_modules/autoprefixer/lib/hacks/align-self.js +0 -84
  48. package/templates/facebook/node_modules/autoprefixer/lib/hacks/animation.js +0 -35
  49. package/templates/facebook/node_modules/autoprefixer/lib/hacks/appearance.js +0 -39
  50. package/templates/facebook/node_modules/autoprefixer/lib/hacks/backdrop-filter.js +0 -35
  51. package/templates/facebook/node_modules/autoprefixer/lib/hacks/background-clip.js +0 -41
  52. package/templates/facebook/node_modules/autoprefixer/lib/hacks/background-size.js +0 -38
  53. package/templates/facebook/node_modules/autoprefixer/lib/hacks/block-logical.js +0 -48
  54. package/templates/facebook/node_modules/autoprefixer/lib/hacks/border-image.js +0 -33
  55. package/templates/facebook/node_modules/autoprefixer/lib/hacks/border-radius.js +0 -62
  56. package/templates/facebook/node_modules/autoprefixer/lib/hacks/break-props.js +0 -76
  57. package/templates/facebook/node_modules/autoprefixer/lib/hacks/color-adjust.js +0 -40
  58. package/templates/facebook/node_modules/autoprefixer/lib/hacks/cross-fade.js +0 -54
  59. package/templates/facebook/node_modules/autoprefixer/lib/hacks/display-flex.js +0 -94
  60. package/templates/facebook/node_modules/autoprefixer/lib/hacks/display-grid.js +0 -41
  61. package/templates/facebook/node_modules/autoprefixer/lib/hacks/filter-value.js +0 -31
  62. package/templates/facebook/node_modules/autoprefixer/lib/hacks/filter.js +0 -33
  63. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-basis.js +0 -72
  64. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-direction.js +0 -108
  65. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-flow.js +0 -81
  66. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-grow.js +0 -57
  67. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-shrink.js +0 -72
  68. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-spec.js +0 -22
  69. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex-wrap.js +0 -40
  70. package/templates/facebook/node_modules/autoprefixer/lib/hacks/flex.js +0 -85
  71. package/templates/facebook/node_modules/autoprefixer/lib/hacks/fullscreen.js +0 -40
  72. package/templates/facebook/node_modules/autoprefixer/lib/hacks/gradient.js +0 -519
  73. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-area.js +0 -52
  74. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-column-align.js +0 -48
  75. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-end.js +0 -62
  76. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-row-align.js +0 -48
  77. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-row-column.js +0 -52
  78. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js +0 -149
  79. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-start.js +0 -55
  80. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-template-areas.js +0 -101
  81. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-template.js +0 -90
  82. package/templates/facebook/node_modules/autoprefixer/lib/hacks/grid-utils.js +0 -1123
  83. package/templates/facebook/node_modules/autoprefixer/lib/hacks/image-rendering.js +0 -71
  84. package/templates/facebook/node_modules/autoprefixer/lib/hacks/image-set.js +0 -38
  85. package/templates/facebook/node_modules/autoprefixer/lib/hacks/inline-logical.js +0 -40
  86. package/templates/facebook/node_modules/autoprefixer/lib/hacks/intrinsic.js +0 -74
  87. package/templates/facebook/node_modules/autoprefixer/lib/hacks/justify-content.js +0 -85
  88. package/templates/facebook/node_modules/autoprefixer/lib/hacks/mask-border.js +0 -46
  89. package/templates/facebook/node_modules/autoprefixer/lib/hacks/mask-composite.js +0 -104
  90. package/templates/facebook/node_modules/autoprefixer/lib/hacks/order.js +0 -72
  91. package/templates/facebook/node_modules/autoprefixer/lib/hacks/overscroll-behavior.js +0 -54
  92. package/templates/facebook/node_modules/autoprefixer/lib/hacks/pixelated.js +0 -58
  93. package/templates/facebook/node_modules/autoprefixer/lib/hacks/place-self.js +0 -55
  94. package/templates/facebook/node_modules/autoprefixer/lib/hacks/placeholder-shown.js +0 -36
  95. package/templates/facebook/node_modules/autoprefixer/lib/hacks/placeholder.js +0 -56
  96. package/templates/facebook/node_modules/autoprefixer/lib/hacks/text-decoration-skip-ink.js +0 -38
  97. package/templates/facebook/node_modules/autoprefixer/lib/hacks/text-decoration.js +0 -36
  98. package/templates/facebook/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js +0 -33
  99. package/templates/facebook/node_modules/autoprefixer/lib/hacks/transform-decl.js +0 -105
  100. package/templates/facebook/node_modules/autoprefixer/lib/hacks/user-select.js +0 -36
  101. package/templates/facebook/node_modules/autoprefixer/lib/hacks/writing-mode.js +0 -59
  102. package/templates/facebook/node_modules/autoprefixer/lib/info.js +0 -149
  103. package/templates/facebook/node_modules/autoprefixer/lib/old-selector.js +0 -88
  104. package/templates/facebook/node_modules/autoprefixer/lib/old-value.js +0 -30
  105. package/templates/facebook/node_modules/autoprefixer/lib/prefixer.js +0 -167
  106. package/templates/facebook/node_modules/autoprefixer/lib/prefixes.js +0 -471
  107. package/templates/facebook/node_modules/autoprefixer/lib/processor.js +0 -703
  108. package/templates/facebook/node_modules/autoprefixer/lib/resolution.js +0 -125
  109. package/templates/facebook/node_modules/autoprefixer/lib/selector.js +0 -198
  110. package/templates/facebook/node_modules/autoprefixer/lib/supports.js +0 -346
  111. package/templates/facebook/node_modules/autoprefixer/lib/transition.js +0 -411
  112. package/templates/facebook/node_modules/autoprefixer/lib/utils.js +0 -103
  113. package/templates/facebook/node_modules/autoprefixer/lib/value.js +0 -164
  114. package/templates/facebook/node_modules/autoprefixer/package.json +0 -30
  115. package/templates/facebook/node_modules/known-css-properties/LICENSE +0 -21
  116. package/templates/facebook/node_modules/known-css-properties/README.md +0 -48
  117. package/templates/facebook/node_modules/known-css-properties/data/all.json +0 -1144
  118. package/templates/facebook/node_modules/known-css-properties/index.js +0 -1
  119. package/templates/facebook/node_modules/known-css-properties/package.json +0 -56
  120. package/templates/facebook/node_modules/meow/index.d.ts +0 -315
  121. package/templates/facebook/node_modules/meow/index.js +0 -236
  122. package/templates/facebook/node_modules/meow/license +0 -9
  123. package/templates/facebook/node_modules/meow/package.json +0 -77
  124. package/templates/facebook/node_modules/meow/readme.md +0 -352
  125. package/templates/facebook/node_modules/picocolors/LICENSE +0 -15
  126. package/templates/facebook/node_modules/picocolors/README.md +0 -23
  127. package/templates/facebook/node_modules/picocolors/package.json +0 -25
  128. package/templates/facebook/node_modules/picocolors/picocolors.browser.js +0 -4
  129. package/templates/facebook/node_modules/picocolors/picocolors.d.ts +0 -5
  130. package/templates/facebook/node_modules/picocolors/picocolors.js +0 -60
  131. package/templates/facebook/node_modules/picocolors/types.ts +0 -30
  132. package/templates/facebook/node_modules/postcss/LICENSE +0 -20
  133. package/templates/facebook/node_modules/postcss/README.md +0 -43
  134. package/templates/facebook/node_modules/postcss/lib/at-rule.js +0 -127
  135. package/templates/facebook/node_modules/postcss/lib/comment.js +0 -55
  136. package/templates/facebook/node_modules/postcss/lib/container.js +0 -774
  137. package/templates/facebook/node_modules/postcss/lib/css-syntax-error.js +0 -296
  138. package/templates/facebook/node_modules/postcss/lib/declaration.js +0 -96
  139. package/templates/facebook/node_modules/postcss/lib/input.js +0 -214
  140. package/templates/facebook/node_modules/postcss/lib/lazy-result.js +0 -437
  141. package/templates/facebook/node_modules/postcss/lib/list.js +0 -93
  142. package/templates/facebook/node_modules/postcss/lib/map-generator.js +0 -347
  143. package/templates/facebook/node_modules/postcss/lib/node.js +0 -606
  144. package/templates/facebook/node_modules/postcss/lib/parse.js +0 -40
  145. package/templates/facebook/node_modules/postcss/lib/parser.js +0 -609
  146. package/templates/facebook/node_modules/postcss/lib/postcss.d.ts +0 -1283
  147. package/templates/facebook/node_modules/postcss/lib/postcss.js +0 -285
  148. package/templates/facebook/node_modules/postcss/lib/previous-map.js +0 -172
  149. package/templates/facebook/node_modules/postcss/lib/processor.js +0 -264
  150. package/templates/facebook/node_modules/postcss/lib/result.js +0 -213
  151. package/templates/facebook/node_modules/postcss/lib/root.js +0 -122
  152. package/templates/facebook/node_modules/postcss/lib/rule.js +0 -116
  153. package/templates/facebook/node_modules/postcss/lib/stringifier.js +0 -362
  154. package/templates/facebook/node_modules/postcss/lib/stringify.js +0 -18
  155. package/templates/facebook/node_modules/postcss/lib/terminal-highlight.js +0 -84
  156. package/templates/facebook/node_modules/postcss/lib/tokenize.js +0 -295
  157. package/templates/facebook/node_modules/postcss/lib/vendor.js +0 -53
  158. package/templates/facebook/node_modules/postcss/lib/warn-once.js +0 -17
  159. package/templates/facebook/node_modules/postcss/lib/warning.js +0 -131
  160. package/templates/facebook/node_modules/postcss/package.json +0 -37
  161. package/templates/facebook/node_modules/postcss-html/LICENSE +0 -21
  162. package/templates/facebook/node_modules/postcss-html/README.md +0 -78
  163. package/templates/facebook/node_modules/postcss-html/extract.js +0 -122
  164. package/templates/facebook/node_modules/postcss-html/index.js +0 -5
  165. package/templates/facebook/node_modules/postcss-html/package.json +0 -63
  166. package/templates/facebook/node_modules/postcss-html/template-parse.js +0 -14
  167. package/templates/facebook/node_modules/postcss-html/template-parser.js +0 -9
  168. package/templates/facebook/node_modules/postcss-html/template-safe-parse.js +0 -14
  169. package/templates/facebook/node_modules/postcss-html/template-safe-parser.js +0 -9
  170. package/templates/facebook/node_modules/postcss-html/template-tokenize.js +0 -49
  171. package/templates/facebook/node_modules/postcss-safe-parser/CHANGELOG.md +0 -51
  172. package/templates/facebook/node_modules/postcss-safe-parser/LICENSE +0 -20
  173. package/templates/facebook/node_modules/postcss-safe-parser/README.md +0 -33
  174. package/templates/facebook/node_modules/postcss-safe-parser/lib/safe-parse.js +0 -13
  175. package/templates/facebook/node_modules/postcss-safe-parser/lib/safe-parser.js +0 -115
  176. package/templates/facebook/node_modules/postcss-safe-parser/package.json +0 -102
  177. package/templates/facebook/node_modules/postcss-syntax/LICENSE +0 -21
  178. package/templates/facebook/node_modules/postcss-syntax/README.md +0 -85
  179. package/templates/facebook/node_modules/postcss-syntax/document.js +0 -41
  180. package/templates/facebook/node_modules/postcss-syntax/get-lang.js +0 -111
  181. package/templates/facebook/node_modules/postcss-syntax/get-syntax.js +0 -63
  182. package/templates/facebook/node_modules/postcss-syntax/index.js +0 -26
  183. package/templates/facebook/node_modules/postcss-syntax/load-syntax.js +0 -23
  184. package/templates/facebook/node_modules/postcss-syntax/normal-opts.js +0 -11
  185. package/templates/facebook/node_modules/postcss-syntax/package.json +0 -102
  186. package/templates/facebook/node_modules/postcss-syntax/parse-style.js +0 -127
  187. package/templates/facebook/node_modules/postcss-syntax/parse.js +0 -34
  188. package/templates/facebook/node_modules/postcss-syntax/parser.js +0 -18
  189. package/templates/facebook/node_modules/postcss-syntax/patch-postcss.js +0 -77
  190. package/templates/facebook/node_modules/postcss-syntax/processor.js +0 -29
  191. package/templates/facebook/node_modules/postcss-syntax/stringify.js +0 -20
  192. package/templates/facebook/node_modules/postcss-syntax/syntax.js +0 -37
  193. package/templates/facebook/node_modules/remark/index.js +0 -7
  194. package/templates/facebook/node_modules/remark/package.json +0 -46
  195. package/templates/facebook/node_modules/remark/readme.md +0 -260
  196. package/templates/facebook/node_modules/remark/types/index.d.ts +0 -19
  197. package/templates/facebook/node_modules/remark-parse/index.js +0 -24
  198. package/templates/facebook/node_modules/remark-parse/package.json +0 -46
  199. package/templates/facebook/node_modules/remark-parse/readme.md +0 -197
  200. package/templates/facebook/node_modules/remark-parse/types/index.d.ts +0 -14
  201. package/templates/facebook/node_modules/remark-stringify/index.js +0 -23
  202. package/templates/facebook/node_modules/remark-stringify/license +0 -22
  203. package/templates/facebook/node_modules/remark-stringify/package.json +0 -46
  204. package/templates/facebook/node_modules/remark-stringify/readme.md +0 -217
  205. package/templates/facebook/node_modules/remark-stringify/types/index.d.ts +0 -14
  206. package/templates/facebook/node_modules/stylelint/CHANGELOG.md +0 -1701
  207. package/templates/facebook/node_modules/stylelint/CONTRIBUTING.md +0 -81
  208. package/templates/facebook/node_modules/stylelint/LICENSE +0 -20
  209. package/templates/facebook/node_modules/stylelint/README.md +0 -48
  210. package/templates/facebook/node_modules/stylelint/bin/stylelint.js +0 -8
  211. package/templates/facebook/node_modules/stylelint/docs/about/linting.md +0 -34
  212. package/templates/facebook/node_modules/stylelint/docs/about/semantic-versioning.md +0 -37
  213. package/templates/facebook/node_modules/stylelint/docs/about/syntaxes.md +0 -18
  214. package/templates/facebook/node_modules/stylelint/docs/about/vision.md +0 -63
  215. package/templates/facebook/node_modules/stylelint/docs/developer-guide/formatters.md +0 -77
  216. package/templates/facebook/node_modules/stylelint/docs/developer-guide/plugins.md +0 -324
  217. package/templates/facebook/node_modules/stylelint/docs/developer-guide/processors.md +0 -28
  218. package/templates/facebook/node_modules/stylelint/docs/developer-guide/rules.md +0 -244
  219. package/templates/facebook/node_modules/stylelint/docs/developer-guide/syntaxes.md +0 -35
  220. package/templates/facebook/node_modules/stylelint/docs/developer-guide/system-tests.md +0 -23
  221. package/templates/facebook/node_modules/stylelint/docs/maintainer-guide/issues.md +0 -94
  222. package/templates/facebook/node_modules/stylelint/docs/maintainer-guide/pull-requests.md +0 -33
  223. package/templates/facebook/node_modules/stylelint/docs/maintainer-guide/releases.md +0 -47
  224. package/templates/facebook/node_modules/stylelint/docs/toc.md +0 -37
  225. package/templates/facebook/node_modules/stylelint/docs/user-guide/configure.md +0 -420
  226. package/templates/facebook/node_modules/stylelint/docs/user-guide/errors.md +0 -29
  227. package/templates/facebook/node_modules/stylelint/docs/user-guide/get-started.md +0 -55
  228. package/templates/facebook/node_modules/stylelint/docs/user-guide/ignore-code.md +0 -88
  229. package/templates/facebook/node_modules/stylelint/docs/user-guide/integrations/editor.md +0 -12
  230. package/templates/facebook/node_modules/stylelint/docs/user-guide/integrations/other.md +0 -19
  231. package/templates/facebook/node_modules/stylelint/docs/user-guide/integrations/task-runner.md +0 -10
  232. package/templates/facebook/node_modules/stylelint/docs/user-guide/rules/about.md +0 -203
  233. package/templates/facebook/node_modules/stylelint/docs/user-guide/rules/combine.md +0 -360
  234. package/templates/facebook/node_modules/stylelint/docs/user-guide/rules/list.md +0 -399
  235. package/templates/facebook/node_modules/stylelint/docs/user-guide/rules/regex.md +0 -29
  236. package/templates/facebook/node_modules/stylelint/docs/user-guide/usage/cli.md +0 -195
  237. package/templates/facebook/node_modules/stylelint/docs/user-guide/usage/node-api.md +0 -169
  238. package/templates/facebook/node_modules/stylelint/docs/user-guide/usage/options.md +0 -208
  239. package/templates/facebook/node_modules/stylelint/docs/user-guide/usage/postcss-plugin.md +0 -84
  240. package/templates/facebook/node_modules/stylelint/lib/assignDisabledRanges.js +0 -407
  241. package/templates/facebook/node_modules/stylelint/lib/augmentConfig.js +0 -359
  242. package/templates/facebook/node_modules/stylelint/lib/cli.js +0 -544
  243. package/templates/facebook/node_modules/stylelint/lib/createPartialStylelintResult.js +0 -103
  244. package/templates/facebook/node_modules/stylelint/lib/createPlugin.js +0 -15
  245. package/templates/facebook/node_modules/stylelint/lib/createStylelint.js +0 -88
  246. package/templates/facebook/node_modules/stylelint/lib/createStylelintResult.js +0 -39
  247. package/templates/facebook/node_modules/stylelint/lib/descriptionlessDisables.js +0 -62
  248. package/templates/facebook/node_modules/stylelint/lib/formatters/compactFormatter.js +0 -20
  249. package/templates/facebook/node_modules/stylelint/lib/formatters/index.js +0 -12
  250. package/templates/facebook/node_modules/stylelint/lib/formatters/jsonFormatter.js +0 -20
  251. package/templates/facebook/node_modules/stylelint/lib/formatters/stringFormatter.js +0 -225
  252. package/templates/facebook/node_modules/stylelint/lib/formatters/tapFormatter.js +0 -39
  253. package/templates/facebook/node_modules/stylelint/lib/formatters/unixFormatter.js +0 -26
  254. package/templates/facebook/node_modules/stylelint/lib/formatters/verboseFormatter.js +0 -61
  255. package/templates/facebook/node_modules/stylelint/lib/getConfigForFile.js +0 -61
  256. package/templates/facebook/node_modules/stylelint/lib/getPostcssResult.js +0 -182
  257. package/templates/facebook/node_modules/stylelint/lib/index.js +0 -33
  258. package/templates/facebook/node_modules/stylelint/lib/invalidScopeDisables.js +0 -50
  259. package/templates/facebook/node_modules/stylelint/lib/isPathIgnored.js +0 -48
  260. package/templates/facebook/node_modules/stylelint/lib/lintPostcssResult.js +0 -134
  261. package/templates/facebook/node_modules/stylelint/lib/lintSource.js +0 -133
  262. package/templates/facebook/node_modules/stylelint/lib/needlessDisables.js +0 -110
  263. package/templates/facebook/node_modules/stylelint/lib/normalizeAllRuleSettings.js +0 -41
  264. package/templates/facebook/node_modules/stylelint/lib/normalizeRuleSettings.js +0 -74
  265. package/templates/facebook/node_modules/stylelint/lib/postcssPlugin.js +0 -25
  266. package/templates/facebook/node_modules/stylelint/lib/prepareReturnValue.js +0 -59
  267. package/templates/facebook/node_modules/stylelint/lib/printConfig.js +0 -58
  268. package/templates/facebook/node_modules/stylelint/lib/reference/keywordSets.js +0 -690
  269. package/templates/facebook/node_modules/stylelint/lib/reference/mathFunctions.js +0 -3
  270. package/templates/facebook/node_modules/stylelint/lib/reference/namedColorData.js +0 -152
  271. package/templates/facebook/node_modules/stylelint/lib/reference/propertySets.js +0 -18
  272. package/templates/facebook/node_modules/stylelint/lib/reference/punctuationSets.js +0 -9
  273. package/templates/facebook/node_modules/stylelint/lib/reference/shorthandData.js +0 -143
  274. package/templates/facebook/node_modules/stylelint/lib/reportDisables.js +0 -62
  275. package/templates/facebook/node_modules/stylelint/lib/reportUnknownRuleNames.js +0 -76
  276. package/templates/facebook/node_modules/stylelint/lib/rules/alpha-value-notation/README.md +0 -110
  277. package/templates/facebook/node_modules/stylelint/lib/rules/alpha-value-notation/index.js +0 -160
  278. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-allowed-list/README.md +0 -65
  279. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-allowed-list/index.js +0 -57
  280. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-blacklist/README.md +0 -52
  281. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-blacklist/index.js +0 -64
  282. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-disallowed-list/README.md +0 -50
  283. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-disallowed-list/index.js +0 -57
  284. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-empty-line-before/README.md +0 -421
  285. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-empty-line-before/index.js +0 -161
  286. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-case/README.md +0 -110
  287. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-case/index.js +0 -58
  288. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-newline-after/README.md +0 -108
  289. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-newline-after/index.js +0 -40
  290. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-space-after/README.md +0 -117
  291. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-name-space-after/index.js +0 -45
  292. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-no-unknown/README.md +0 -74
  293. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-no-unknown/index.js +0 -67
  294. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-no-vendor-prefix/README.md +0 -40
  295. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-no-vendor-prefix/index.js +0 -58
  296. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-property-required-list/README.md +0 -53
  297. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-property-required-list/index.js +0 -65
  298. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-property-requirelist/README.md +0 -55
  299. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-property-requirelist/index.js +0 -74
  300. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-semicolon-newline-after/README.md +0 -63
  301. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-semicolon-newline-after/index.js +0 -78
  302. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-semicolon-space-before/README.md +0 -50
  303. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-semicolon-space-before/index.js +0 -63
  304. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-whitelist/README.md +0 -67
  305. package/templates/facebook/node_modules/stylelint/lib/rules/at-rule-whitelist/index.js +0 -64
  306. package/templates/facebook/node_modules/stylelint/lib/rules/atRuleNameSpaceChecker.js +0 -43
  307. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-empty-line-before/README.md +0 -238
  308. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-empty-line-before/index.js +0 -118
  309. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-newline-after/README.md +0 -196
  310. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-newline-after/index.js +0 -137
  311. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-newline-before/README.md +0 -93
  312. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-newline-before/index.js +0 -117
  313. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-space-after/README.md +0 -179
  314. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-space-after/index.js +0 -88
  315. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-space-before/README.md +0 -174
  316. package/templates/facebook/node_modules/stylelint/lib/rules/block-closing-brace-space-before/index.js +0 -96
  317. package/templates/facebook/node_modules/stylelint/lib/rules/block-no-empty/README.md +0 -75
  318. package/templates/facebook/node_modules/stylelint/lib/rules/block-no-empty/index.js +0 -83
  319. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-newline-after/README.md +0 -125
  320. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-newline-after/index.js +0 -145
  321. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-newline-before/README.md +0 -176
  322. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-newline-before/index.js +0 -107
  323. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-space-after/README.md +0 -174
  324. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-space-after/index.js +0 -88
  325. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-space-before/README.md +0 -218
  326. package/templates/facebook/node_modules/stylelint/lib/rules/block-opening-brace-space-before/index.js +0 -124
  327. package/templates/facebook/node_modules/stylelint/lib/rules/color-function-notation/README.md +0 -116
  328. package/templates/facebook/node_modules/stylelint/lib/rules/color-function-notation/index.js +0 -108
  329. package/templates/facebook/node_modules/stylelint/lib/rules/color-hex-case/README.md +0 -58
  330. package/templates/facebook/node_modules/stylelint/lib/rules/color-hex-case/index.js +0 -82
  331. package/templates/facebook/node_modules/stylelint/lib/rules/color-hex-length/README.md +0 -73
  332. package/templates/facebook/node_modules/stylelint/lib/rules/color-hex-length/index.js +0 -120
  333. package/templates/facebook/node_modules/stylelint/lib/rules/color-named/README.md +0 -176
  334. package/templates/facebook/node_modules/stylelint/lib/rules/color-named/generateColorFuncs.js +0 -198
  335. package/templates/facebook/node_modules/stylelint/lib/rules/color-named/index.js +0 -169
  336. package/templates/facebook/node_modules/stylelint/lib/rules/color-no-hex/README.md +0 -60
  337. package/templates/facebook/node_modules/stylelint/lib/rules/color-no-hex/index.js +0 -60
  338. package/templates/facebook/node_modules/stylelint/lib/rules/color-no-invalid-hex/README.md +0 -55
  339. package/templates/facebook/node_modules/stylelint/lib/rules/color-no-invalid-hex/index.js +0 -54
  340. package/templates/facebook/node_modules/stylelint/lib/rules/comment-empty-line-before/README.md +0 -195
  341. package/templates/facebook/node_modules/stylelint/lib/rules/comment-empty-line-before/index.js +0 -126
  342. package/templates/facebook/node_modules/stylelint/lib/rules/comment-no-empty/README.md +0 -51
  343. package/templates/facebook/node_modules/stylelint/lib/rules/comment-no-empty/index.js +0 -46
  344. package/templates/facebook/node_modules/stylelint/lib/rules/comment-pattern/README.md +0 -38
  345. package/templates/facebook/node_modules/stylelint/lib/rules/comment-pattern/index.js +0 -48
  346. package/templates/facebook/node_modules/stylelint/lib/rules/comment-whitespace-inside/README.md +0 -99
  347. package/templates/facebook/node_modules/stylelint/lib/rules/comment-whitespace-inside/index.js +0 -117
  348. package/templates/facebook/node_modules/stylelint/lib/rules/comment-word-blacklist/README.md +0 -50
  349. package/templates/facebook/node_modules/stylelint/lib/rules/comment-word-blacklist/index.js +0 -66
  350. package/templates/facebook/node_modules/stylelint/lib/rules/comment-word-disallowed-list/README.md +0 -48
  351. package/templates/facebook/node_modules/stylelint/lib/rules/comment-word-disallowed-list/index.js +0 -59
  352. package/templates/facebook/node_modules/stylelint/lib/rules/custom-media-pattern/README.md +0 -36
  353. package/templates/facebook/node_modules/stylelint/lib/rules/custom-media-pattern/index.js +0 -54
  354. package/templates/facebook/node_modules/stylelint/lib/rules/custom-property-empty-line-before/README.md +0 -272
  355. package/templates/facebook/node_modules/stylelint/lib/rules/custom-property-empty-line-before/index.js +0 -129
  356. package/templates/facebook/node_modules/stylelint/lib/rules/custom-property-pattern/README.md +0 -36
  357. package/templates/facebook/node_modules/stylelint/lib/rules/custom-property-pattern/index.js +0 -53
  358. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-bang-space-after/README.md +0 -72
  359. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-bang-space-after/index.js +0 -82
  360. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-bang-space-before/README.md +0 -67
  361. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-bang-space-before/index.js +0 -83
  362. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-custom-properties/README.md +0 -40
  363. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-custom-properties/index.js +0 -61
  364. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-properties/README.md +0 -143
  365. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-duplicate-properties/index.js +0 -121
  366. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/README.md +0 -197
  367. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-redundant-longhand-properties/index.js +0 -99
  368. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides/README.md +0 -69
  369. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides/index.js +0 -61
  370. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-after/README.md +0 -141
  371. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-after/index.js +0 -95
  372. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md +0 -120
  373. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/index.js +0 -62
  374. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-space-after/README.md +0 -147
  375. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-space-after/index.js +0 -84
  376. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-space-before/README.md +0 -130
  377. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-semicolon-space-before/index.js +0 -91
  378. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-single-line-max-declarations/README.md +0 -50
  379. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-single-line-max-declarations/index.js +0 -58
  380. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-trailing-semicolon/README.md +0 -108
  381. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-block-trailing-semicolon/index.js +0 -123
  382. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-newline-after/README.md +0 -78
  383. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-newline-after/index.js +0 -90
  384. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-space-after/README.md +0 -111
  385. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-space-after/index.js +0 -63
  386. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-space-before/README.md +0 -72
  387. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-colon-space-before/index.js +0 -62
  388. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-empty-line-before/README.md +0 -322
  389. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-empty-line-before/index.js +0 -139
  390. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-no-important/README.md +0 -40
  391. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-no-important/index.js +0 -41
  392. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-allowed-list/README.md +0 -119
  393. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-allowed-list/index.js +0 -94
  394. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-blacklist/README.md +0 -76
  395. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-blacklist/index.js +0 -86
  396. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-disallowed-list/README.md +0 -74
  397. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-disallowed-list/index.js +0 -76
  398. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-whitelist/README.md +0 -87
  399. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-unit-whitelist/index.js +0 -86
  400. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-allowed-list/README.md +0 -86
  401. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-allowed-list/index.js +0 -58
  402. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-blacklist/README.md +0 -107
  403. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-blacklist/index.js +0 -68
  404. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-disallowed-list/README.md +0 -105
  405. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-disallowed-list/index.js +0 -58
  406. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-whitelist/README.md +0 -98
  407. package/templates/facebook/node_modules/stylelint/lib/rules/declaration-property-value-whitelist/index.js +0 -68
  408. package/templates/facebook/node_modules/stylelint/lib/rules/declarationBangSpaceChecker.js +0 -43
  409. package/templates/facebook/node_modules/stylelint/lib/rules/declarationColonSpaceChecker.js +0 -48
  410. package/templates/facebook/node_modules/stylelint/lib/rules/findMediaOperator.js +0 -24
  411. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-name-quotes/README.md +0 -163
  412. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-name-quotes/index.js +0 -147
  413. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-no-duplicate-names/README.md +0 -76
  414. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-no-duplicate-names/index.js +0 -103
  415. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-no-missing-generic-family-keyword/README.md +0 -89
  416. package/templates/facebook/node_modules/stylelint/lib/rules/font-family-no-missing-generic-family-keyword/index.js +0 -97
  417. package/templates/facebook/node_modules/stylelint/lib/rules/font-weight-notation/README.md +0 -94
  418. package/templates/facebook/node_modules/stylelint/lib/rules/font-weight-notation/index.js +0 -154
  419. package/templates/facebook/node_modules/stylelint/lib/rules/function-allowed-list/README.md +0 -73
  420. package/templates/facebook/node_modules/stylelint/lib/rules/function-allowed-list/index.js +0 -66
  421. package/templates/facebook/node_modules/stylelint/lib/rules/function-blacklist/README.md +0 -54
  422. package/templates/facebook/node_modules/stylelint/lib/rules/function-blacklist/index.js +0 -71
  423. package/templates/facebook/node_modules/stylelint/lib/rules/function-calc-no-invalid/README.md +0 -96
  424. package/templates/facebook/node_modules/stylelint/lib/rules/function-calc-no-invalid/index.js +0 -259
  425. package/templates/facebook/node_modules/stylelint/lib/rules/function-calc-no-unspaced-operator/README.md +0 -56
  426. package/templates/facebook/node_modules/stylelint/lib/rules/function-calc-no-unspaced-operator/index.js +0 -138
  427. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-newline-after/README.md +0 -113
  428. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-newline-after/index.js +0 -55
  429. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-newline-before/README.md +0 -129
  430. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-newline-before/index.js +0 -55
  431. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-space-after/README.md +0 -144
  432. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-space-after/index.js +0 -56
  433. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-space-before/README.md +0 -144
  434. package/templates/facebook/node_modules/stylelint/lib/rules/function-comma-space-before/index.js +0 -56
  435. package/templates/facebook/node_modules/stylelint/lib/rules/function-disallowed-list/README.md +0 -52
  436. package/templates/facebook/node_modules/stylelint/lib/rules/function-disallowed-list/index.js +0 -64
  437. package/templates/facebook/node_modules/stylelint/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md +0 -77
  438. package/templates/facebook/node_modules/stylelint/lib/rules/function-linear-gradient-no-nonstandard-direction/index.js +0 -110
  439. package/templates/facebook/node_modules/stylelint/lib/rules/function-max-empty-lines/README.md +0 -78
  440. package/templates/facebook/node_modules/stylelint/lib/rules/function-max-empty-lines/index.js +0 -101
  441. package/templates/facebook/node_modules/stylelint/lib/rules/function-name-case/README.md +0 -181
  442. package/templates/facebook/node_modules/stylelint/lib/rules/function-name-case/index.js +0 -111
  443. package/templates/facebook/node_modules/stylelint/lib/rules/function-parentheses-newline-inside/README.md +0 -144
  444. package/templates/facebook/node_modules/stylelint/lib/rules/function-parentheses-newline-inside/index.js +0 -247
  445. package/templates/facebook/node_modules/stylelint/lib/rules/function-parentheses-space-inside/README.md +0 -140
  446. package/templates/facebook/node_modules/stylelint/lib/rules/function-parentheses-space-inside/index.js +0 -165
  447. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-no-scheme-relative/README.md +0 -50
  448. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-no-scheme-relative/index.js +0 -48
  449. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-quotes/README.md +0 -120
  450. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-quotes/index.js +0 -113
  451. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-allowed-list/README.md +0 -76
  452. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-allowed-list/index.js +0 -66
  453. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-blacklist/README.md +0 -73
  454. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-blacklist/index.js +0 -76
  455. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-disallowed-list/README.md +0 -71
  456. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-disallowed-list/index.js +0 -66
  457. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-whitelist/README.md +0 -78
  458. package/templates/facebook/node_modules/stylelint/lib/rules/function-url-scheme-whitelist/index.js +0 -76
  459. package/templates/facebook/node_modules/stylelint/lib/rules/function-whitelist/README.md +0 -75
  460. package/templates/facebook/node_modules/stylelint/lib/rules/function-whitelist/index.js +0 -73
  461. package/templates/facebook/node_modules/stylelint/lib/rules/function-whitespace-after/README.md +0 -80
  462. package/templates/facebook/node_modules/stylelint/lib/rules/function-whitespace-after/index.js +0 -167
  463. package/templates/facebook/node_modules/stylelint/lib/rules/functionCommaSpaceChecker.js +0 -109
  464. package/templates/facebook/node_modules/stylelint/lib/rules/functionCommaSpaceFix.js +0 -34
  465. package/templates/facebook/node_modules/stylelint/lib/rules/hue-degree-notation/README.md +0 -74
  466. package/templates/facebook/node_modules/stylelint/lib/rules/hue-degree-notation/index.js +0 -122
  467. package/templates/facebook/node_modules/stylelint/lib/rules/indentation/README.md +0 -338
  468. package/templates/facebook/node_modules/stylelint/lib/rules/indentation/index.js +0 -615
  469. package/templates/facebook/node_modules/stylelint/lib/rules/index.js +0 -401
  470. package/templates/facebook/node_modules/stylelint/lib/rules/keyframe-declaration-no-important/README.md +0 -52
  471. package/templates/facebook/node_modules/stylelint/lib/rules/keyframe-declaration-no-important/index.js +0 -43
  472. package/templates/facebook/node_modules/stylelint/lib/rules/keyframes-name-pattern/README.md +0 -46
  473. package/templates/facebook/node_modules/stylelint/lib/rules/keyframes-name-pattern/index.js +0 -51
  474. package/templates/facebook/node_modules/stylelint/lib/rules/length-zero-no-unit/README.md +0 -69
  475. package/templates/facebook/node_modules/stylelint/lib/rules/length-zero-no-unit/index.js +0 -163
  476. package/templates/facebook/node_modules/stylelint/lib/rules/linebreaks/README.md +0 -21
  477. package/templates/facebook/node_modules/stylelint/lib/rules/linebreaks/index.js +0 -102
  478. package/templates/facebook/node_modules/stylelint/lib/rules/max-empty-lines/README.md +0 -116
  479. package/templates/facebook/node_modules/stylelint/lib/rules/max-empty-lines/index.js +0 -209
  480. package/templates/facebook/node_modules/stylelint/lib/rules/max-line-length/README.md +0 -151
  481. package/templates/facebook/node_modules/stylelint/lib/rules/max-line-length/index.js +0 -183
  482. package/templates/facebook/node_modules/stylelint/lib/rules/max-nesting-depth/README.md +0 -355
  483. package/templates/facebook/node_modules/stylelint/lib/rules/max-nesting-depth/index.js +0 -114
  484. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-colon-space-after/README.md +0 -72
  485. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-colon-space-after/index.js +0 -82
  486. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-colon-space-before/README.md +0 -72
  487. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-colon-space-before/index.js +0 -82
  488. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-allowed-list/README.md +0 -64
  489. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-allowed-list/index.js +0 -76
  490. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-blacklist/README.md +0 -66
  491. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-blacklist/index.js +0 -86
  492. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-case/README.md +0 -108
  493. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-case/index.js +0 -96
  494. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-disallowed-list/README.md +0 -64
  495. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-disallowed-list/index.js +0 -76
  496. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-no-unknown/README.md +0 -94
  497. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-no-unknown/index.js +0 -88
  498. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-no-vendor-prefix/README.md +0 -47
  499. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-no-vendor-prefix/index.js +0 -58
  500. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-value-allowed-list/README.md +0 -84
  501. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-value-allowed-list/index.js +0 -89
  502. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-value-whitelist/README.md +0 -86
  503. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-value-whitelist/index.js +0 -99
  504. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-whitelist/README.md +0 -66
  505. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-name-whitelist/index.js +0 -86
  506. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-parentheses-space-inside/README.md +0 -62
  507. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-parentheses-space-inside/index.js +0 -106
  508. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-range-operator-space-after/README.md +0 -72
  509. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-range-operator-space-after/index.js +0 -92
  510. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-range-operator-space-before/README.md +0 -72
  511. package/templates/facebook/node_modules/stylelint/lib/rules/media-feature-range-operator-space-before/index.js +0 -92
  512. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-newline-after/README.md +0 -113
  513. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-newline-after/index.js +0 -88
  514. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-newline-before/README.md +0 -111
  515. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-newline-before/index.js +0 -42
  516. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-space-after/README.md +0 -136
  517. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-space-after/index.js +0 -84
  518. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-space-before/README.md +0 -136
  519. package/templates/facebook/node_modules/stylelint/lib/rules/media-query-list-comma-space-before/index.js +0 -84
  520. package/templates/facebook/node_modules/stylelint/lib/rules/mediaFeatureColonSpaceChecker.js +0 -39
  521. package/templates/facebook/node_modules/stylelint/lib/rules/mediaQueryListCommaWhitespaceChecker.js +0 -54
  522. package/templates/facebook/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/README.md +0 -50
  523. package/templates/facebook/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/index.js +0 -80
  524. package/templates/facebook/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/utils/findNotContiguousOrRectangular.js +0 -61
  525. package/templates/facebook/node_modules/stylelint/lib/rules/named-grid-areas-no-invalid/utils/isRectangular.js +0 -12
  526. package/templates/facebook/node_modules/stylelint/lib/rules/no-descending-specificity/README.md +0 -166
  527. package/templates/facebook/node_modules/stylelint/lib/rules/no-descending-specificity/index.js +0 -146
  528. package/templates/facebook/node_modules/stylelint/lib/rules/no-duplicate-at-import-rules/README.md +0 -56
  529. package/templates/facebook/node_modules/stylelint/lib/rules/no-duplicate-at-import-rules/index.js +0 -68
  530. package/templates/facebook/node_modules/stylelint/lib/rules/no-duplicate-selectors/README.md +0 -136
  531. package/templates/facebook/node_modules/stylelint/lib/rules/no-duplicate-selectors/index.js +0 -149
  532. package/templates/facebook/node_modules/stylelint/lib/rules/no-empty-first-line/README.md +0 -34
  533. package/templates/facebook/node_modules/stylelint/lib/rules/no-empty-first-line/index.js +0 -49
  534. package/templates/facebook/node_modules/stylelint/lib/rules/no-empty-source/README.md +0 -45
  535. package/templates/facebook/node_modules/stylelint/lib/rules/no-empty-source/index.js +0 -40
  536. package/templates/facebook/node_modules/stylelint/lib/rules/no-eol-whitespace/README.md +0 -79
  537. package/templates/facebook/node_modules/stylelint/lib/rules/no-eol-whitespace/index.js +0 -260
  538. package/templates/facebook/node_modules/stylelint/lib/rules/no-extra-semicolons/README.md +0 -78
  539. package/templates/facebook/node_modules/stylelint/lib/rules/no-extra-semicolons/index.js +0 -243
  540. package/templates/facebook/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/README.md +0 -54
  541. package/templates/facebook/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/index.js +0 -51
  542. package/templates/facebook/node_modules/stylelint/lib/rules/no-invalid-position-at-import-rule/README.md +0 -51
  543. package/templates/facebook/node_modules/stylelint/lib/rules/no-invalid-position-at-import-rule/index.js +0 -58
  544. package/templates/facebook/node_modules/stylelint/lib/rules/no-irregular-whitespace/README.md +0 -57
  545. package/templates/facebook/node_modules/stylelint/lib/rules/no-irregular-whitespace/index.js +0 -134
  546. package/templates/facebook/node_modules/stylelint/lib/rules/no-missing-end-of-source-newline/README.md +0 -34
  547. package/templates/facebook/node_modules/stylelint/lib/rules/no-missing-end-of-source-newline/index.js +0 -52
  548. package/templates/facebook/node_modules/stylelint/lib/rules/no-unknown-animations/README.md +0 -76
  549. package/templates/facebook/node_modules/stylelint/lib/rules/no-unknown-animations/index.js +0 -64
  550. package/templates/facebook/node_modules/stylelint/lib/rules/number-leading-zero/README.md +0 -74
  551. package/templates/facebook/node_modules/stylelint/lib/rules/number-leading-zero/index.js +0 -163
  552. package/templates/facebook/node_modules/stylelint/lib/rules/number-max-precision/README.md +0 -107
  553. package/templates/facebook/node_modules/stylelint/lib/rules/number-max-precision/index.js +0 -101
  554. package/templates/facebook/node_modules/stylelint/lib/rules/number-no-trailing-zeros/README.md +0 -40
  555. package/templates/facebook/node_modules/stylelint/lib/rules/number-no-trailing-zeros/index.js +0 -119
  556. package/templates/facebook/node_modules/stylelint/lib/rules/property-allowed-list/README.md +0 -75
  557. package/templates/facebook/node_modules/stylelint/lib/rules/property-allowed-list/index.js +0 -60
  558. package/templates/facebook/node_modules/stylelint/lib/rules/property-blacklist/README.md +0 -66
  559. package/templates/facebook/node_modules/stylelint/lib/rules/property-blacklist/index.js +0 -67
  560. package/templates/facebook/node_modules/stylelint/lib/rules/property-case/README.md +0 -168
  561. package/templates/facebook/node_modules/stylelint/lib/rules/property-case/index.js +0 -63
  562. package/templates/facebook/node_modules/stylelint/lib/rules/property-disallowed-list/README.md +0 -64
  563. package/templates/facebook/node_modules/stylelint/lib/rules/property-disallowed-list/index.js +0 -60
  564. package/templates/facebook/node_modules/stylelint/lib/rules/property-no-unknown/README.md +0 -187
  565. package/templates/facebook/node_modules/stylelint/lib/rules/property-no-unknown/index.js +0 -107
  566. package/templates/facebook/node_modules/stylelint/lib/rules/property-no-vendor-prefix/README.md +0 -70
  567. package/templates/facebook/node_modules/stylelint/lib/rules/property-no-vendor-prefix/index.js +0 -76
  568. package/templates/facebook/node_modules/stylelint/lib/rules/property-whitelist/README.md +0 -77
  569. package/templates/facebook/node_modules/stylelint/lib/rules/property-whitelist/index.js +0 -67
  570. package/templates/facebook/node_modules/stylelint/lib/rules/rangeContextNodeParser.js +0 -65
  571. package/templates/facebook/node_modules/stylelint/lib/rules/rule-empty-line-before/README.md +0 -326
  572. package/templates/facebook/node_modules/stylelint/lib/rules/rule-empty-line-before/index.js +0 -145
  573. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-brackets-space-inside/README.md +0 -112
  574. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-brackets-space-inside/index.js +0 -182
  575. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-name-disallowed-list/README.md +0 -54
  576. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-name-disallowed-list/index.js +0 -66
  577. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-allowed-list/README.md +0 -54
  578. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-allowed-list/index.js +0 -65
  579. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-blacklist/README.md +0 -46
  580. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-blacklist/index.js +0 -75
  581. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-disallowed-list/README.md +0 -44
  582. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-disallowed-list/index.js +0 -65
  583. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-space-after/README.md +0 -162
  584. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-space-after/index.js +0 -89
  585. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/README.md +0 -162
  586. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-space-before/index.js +0 -73
  587. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-whitelist/README.md +0 -56
  588. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-operator-whitelist/index.js +0 -75
  589. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-quotes/README.md +0 -102
  590. package/templates/facebook/node_modules/stylelint/lib/rules/selector-attribute-quotes/index.js +0 -94
  591. package/templates/facebook/node_modules/stylelint/lib/rules/selector-class-pattern/README.md +0 -100
  592. package/templates/facebook/node_modules/stylelint/lib/rules/selector-class-pattern/index.js +0 -121
  593. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-allowed-list/README.md +0 -54
  594. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-allowed-list/index.js +0 -70
  595. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-blacklist/README.md +0 -56
  596. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-blacklist/index.js +0 -80
  597. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-disallowed-list/README.md +0 -54
  598. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-disallowed-list/index.js +0 -70
  599. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-space-after/README.md +0 -78
  600. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-space-after/index.js +0 -57
  601. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-space-before/README.md +0 -78
  602. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-space-before/index.js +0 -57
  603. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-whitelist/README.md +0 -56
  604. package/templates/facebook/node_modules/stylelint/lib/rules/selector-combinator-whitelist/index.js +0 -80
  605. package/templates/facebook/node_modules/stylelint/lib/rules/selector-descendant-combinator-no-non-space/README.md +0 -40
  606. package/templates/facebook/node_modules/stylelint/lib/rules/selector-descendant-combinator-no-non-space/index.js +0 -86
  607. package/templates/facebook/node_modules/stylelint/lib/rules/selector-disallowed-list/README.md +0 -68
  608. package/templates/facebook/node_modules/stylelint/lib/rules/selector-disallowed-list/index.js +0 -56
  609. package/templates/facebook/node_modules/stylelint/lib/rules/selector-id-pattern/README.md +0 -63
  610. package/templates/facebook/node_modules/stylelint/lib/rules/selector-id-pattern/index.js +0 -67
  611. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-newline-after/README.md +0 -120
  612. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-newline-after/index.js +0 -117
  613. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-newline-before/README.md +0 -112
  614. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-newline-before/index.js +0 -91
  615. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-space-after/README.md +0 -110
  616. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-space-after/index.js +0 -83
  617. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-space-before/README.md +0 -110
  618. package/templates/facebook/node_modules/stylelint/lib/rules/selector-list-comma-space-before/index.js +0 -83
  619. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-attribute/README.md +0 -113
  620. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-attribute/index.js +0 -96
  621. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-class/README.md +0 -58
  622. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-class/index.js +0 -71
  623. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-combinators/README.md +0 -72
  624. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-combinators/index.js +0 -72
  625. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-compound-selectors/README.md +0 -59
  626. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-compound-selectors/index.js +0 -79
  627. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-empty-lines/README.md +0 -103
  628. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-empty-lines/index.js +0 -65
  629. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-id/README.md +0 -105
  630. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-id/index.js +0 -95
  631. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-pseudo-class/README.md +0 -50
  632. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-pseudo-class/index.js +0 -85
  633. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-specificity/README.md +0 -138
  634. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-specificity/index.js +0 -182
  635. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-type/README.md +0 -179
  636. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-type/index.js +0 -176
  637. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-universal/README.md +0 -76
  638. package/templates/facebook/node_modules/stylelint/lib/rules/selector-max-universal/index.js +0 -84
  639. package/templates/facebook/node_modules/stylelint/lib/rules/selector-nested-pattern/README.md +0 -77
  640. package/templates/facebook/node_modules/stylelint/lib/rules/selector-nested-pattern/index.js +0 -58
  641. package/templates/facebook/node_modules/stylelint/lib/rules/selector-no-qualifying-type/README.md +0 -105
  642. package/templates/facebook/node_modules/stylelint/lib/rules/selector-no-qualifying-type/index.js +0 -134
  643. package/templates/facebook/node_modules/stylelint/lib/rules/selector-no-vendor-prefix/README.md +0 -67
  644. package/templates/facebook/node_modules/stylelint/lib/rules/selector-no-vendor-prefix/index.js +0 -75
  645. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-allowed-list/README.md +0 -53
  646. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-allowed-list/index.js +0 -74
  647. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-blacklist/README.md +0 -55
  648. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-blacklist/index.js +0 -85
  649. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-case/README.md +0 -108
  650. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-case/index.js +0 -97
  651. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-disallowed-list/README.md +0 -53
  652. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-disallowed-list/index.js +0 -75
  653. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-no-unknown/README.md +0 -84
  654. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-no-unknown/index.js +0 -157
  655. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-parentheses-space-inside/README.md +0 -62
  656. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-parentheses-space-inside/index.js +0 -141
  657. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-whitelist/README.md +0 -55
  658. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-class-whitelist/index.js +0 -84
  659. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-allowed-list/README.md +0 -54
  660. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-allowed-list/index.js +0 -74
  661. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-blacklist/README.md +0 -56
  662. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-blacklist/index.js +0 -84
  663. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-case/README.md +0 -128
  664. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-case/index.js +0 -84
  665. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation/README.md +0 -136
  666. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-colon-notation/index.js +0 -94
  667. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-disallowed-list/README.md +0 -54
  668. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-disallowed-list/index.js +0 -74
  669. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-no-unknown/README.md +0 -84
  670. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-no-unknown/index.js +0 -92
  671. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/README.md +0 -56
  672. package/templates/facebook/node_modules/stylelint/lib/rules/selector-pseudo-element-whitelist/index.js +0 -84
  673. package/templates/facebook/node_modules/stylelint/lib/rules/selector-type-case/README.md +0 -91
  674. package/templates/facebook/node_modules/stylelint/lib/rules/selector-type-case/index.js +0 -107
  675. package/templates/facebook/node_modules/stylelint/lib/rules/selector-type-no-unknown/README.md +0 -140
  676. package/templates/facebook/node_modules/stylelint/lib/rules/selector-type-no-unknown/index.js +0 -115
  677. package/templates/facebook/node_modules/stylelint/lib/rules/selectorAttributeOperatorSpaceChecker.js +0 -74
  678. package/templates/facebook/node_modules/stylelint/lib/rules/selectorCombinatorSpaceChecker.js +0 -87
  679. package/templates/facebook/node_modules/stylelint/lib/rules/selectorListCommaWhitespaceChecker.js +0 -48
  680. package/templates/facebook/node_modules/stylelint/lib/rules/shorthand-property-no-redundant-values/README.md +0 -75
  681. package/templates/facebook/node_modules/stylelint/lib/rules/shorthand-property-no-redundant-values/index.js +0 -137
  682. package/templates/facebook/node_modules/stylelint/lib/rules/string-no-newline/README.md +0 -73
  683. package/templates/facebook/node_modules/stylelint/lib/rules/string-no-newline/index.js +0 -115
  684. package/templates/facebook/node_modules/stylelint/lib/rules/string-quotes/README.md +0 -130
  685. package/templates/facebook/node_modules/stylelint/lib/rules/string-quotes/index.js +0 -221
  686. package/templates/facebook/node_modules/stylelint/lib/rules/time-min-milliseconds/README.md +0 -77
  687. package/templates/facebook/node_modules/stylelint/lib/rules/time-min-milliseconds/index.js +0 -142
  688. package/templates/facebook/node_modules/stylelint/lib/rules/unicode-bom/README.md +0 -41
  689. package/templates/facebook/node_modules/stylelint/lib/rules/unicode-bom/index.js +0 -59
  690. package/templates/facebook/node_modules/stylelint/lib/rules/unit-allowed-list/README.md +0 -115
  691. package/templates/facebook/node_modules/stylelint/lib/rules/unit-allowed-list/index.js +0 -85
  692. package/templates/facebook/node_modules/stylelint/lib/rules/unit-blacklist/README.md +0 -161
  693. package/templates/facebook/node_modules/stylelint/lib/rules/unit-blacklist/index.js +0 -132
  694. package/templates/facebook/node_modules/stylelint/lib/rules/unit-case/README.md +0 -126
  695. package/templates/facebook/node_modules/stylelint/lib/rules/unit-case/index.js +0 -114
  696. package/templates/facebook/node_modules/stylelint/lib/rules/unit-disallowed-list/README.md +0 -159
  697. package/templates/facebook/node_modules/stylelint/lib/rules/unit-disallowed-list/index.js +0 -125
  698. package/templates/facebook/node_modules/stylelint/lib/rules/unit-no-unknown/README.md +0 -138
  699. package/templates/facebook/node_modules/stylelint/lib/rules/unit-no-unknown/index.js +0 -158
  700. package/templates/facebook/node_modules/stylelint/lib/rules/unit-whitelist/README.md +0 -117
  701. package/templates/facebook/node_modules/stylelint/lib/rules/unit-whitelist/index.js +0 -92
  702. package/templates/facebook/node_modules/stylelint/lib/rules/value-keyword-case/README.md +0 -320
  703. package/templates/facebook/node_modules/stylelint/lib/rules/value-keyword-case/index.js +0 -236
  704. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-newline-after/README.md +0 -102
  705. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-newline-after/index.js +0 -100
  706. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-newline-before/README.md +0 -100
  707. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-newline-before/index.js +0 -42
  708. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-space-after/README.md +0 -136
  709. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-space-after/index.js +0 -86
  710. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-space-before/README.md +0 -136
  711. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-comma-space-before/index.js +0 -86
  712. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-max-empty-lines/README.md +0 -121
  713. package/templates/facebook/node_modules/stylelint/lib/rules/value-list-max-empty-lines/index.js +0 -60
  714. package/templates/facebook/node_modules/stylelint/lib/rules/value-no-vendor-prefix/README.md +0 -74
  715. package/templates/facebook/node_modules/stylelint/lib/rules/value-no-vendor-prefix/index.js +0 -90
  716. package/templates/facebook/node_modules/stylelint/lib/rules/valueListCommaWhitespaceChecker.js +0 -57
  717. package/templates/facebook/node_modules/stylelint/lib/standalone.js +0 -334
  718. package/templates/facebook/node_modules/stylelint/lib/syntaxes/index.js +0 -16
  719. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-css-in-js.js +0 -3
  720. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-html.js +0 -8
  721. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-less.js +0 -3
  722. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-markdown.js +0 -8
  723. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-sass.js +0 -3
  724. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-scss.js +0 -3
  725. package/templates/facebook/node_modules/stylelint/lib/syntaxes/syntax-sugarss.js +0 -3
  726. package/templates/facebook/node_modules/stylelint/lib/utils/FileCache.js +0 -68
  727. package/templates/facebook/node_modules/stylelint/lib/utils/addEmptyLineAfter.js +0 -30
  728. package/templates/facebook/node_modules/stylelint/lib/utils/addEmptyLineBefore.js +0 -26
  729. package/templates/facebook/node_modules/stylelint/lib/utils/atRuleParamIndex.js +0 -16
  730. package/templates/facebook/node_modules/stylelint/lib/utils/beforeBlockString.js +0 -54
  731. package/templates/facebook/node_modules/stylelint/lib/utils/blockString.js +0 -25
  732. package/templates/facebook/node_modules/stylelint/lib/utils/blurComments.js +0 -10
  733. package/templates/facebook/node_modules/stylelint/lib/utils/blurFunctionArguments.js +0 -53
  734. package/templates/facebook/node_modules/stylelint/lib/utils/blurInterpolation.js +0 -10
  735. package/templates/facebook/node_modules/stylelint/lib/utils/checkAgainstRule.js +0 -52
  736. package/templates/facebook/node_modules/stylelint/lib/utils/checkInvalidCLIOptions.js +0 -92
  737. package/templates/facebook/node_modules/stylelint/lib/utils/configurationError.js +0 -15
  738. package/templates/facebook/node_modules/stylelint/lib/utils/containsString.js +0 -56
  739. package/templates/facebook/node_modules/stylelint/lib/utils/declarationValueIndex.js +0 -26
  740. package/templates/facebook/node_modules/stylelint/lib/utils/eachDeclarationBlock.js +0 -59
  741. package/templates/facebook/node_modules/stylelint/lib/utils/filterFilePaths.js +0 -19
  742. package/templates/facebook/node_modules/stylelint/lib/utils/findAnimationName.js +0 -69
  743. package/templates/facebook/node_modules/stylelint/lib/utils/findAtRuleContext.js +0 -23
  744. package/templates/facebook/node_modules/stylelint/lib/utils/findFontFamily.js +0 -128
  745. package/templates/facebook/node_modules/stylelint/lib/utils/findListStyleType.js +0 -60
  746. package/templates/facebook/node_modules/stylelint/lib/utils/functionArgumentsSearch.js +0 -41
  747. package/templates/facebook/node_modules/stylelint/lib/utils/getAtRuleParams.js +0 -11
  748. package/templates/facebook/node_modules/stylelint/lib/utils/getCacheFile.js +0 -52
  749. package/templates/facebook/node_modules/stylelint/lib/utils/getDeclarationValue.js +0 -11
  750. package/templates/facebook/node_modules/stylelint/lib/utils/getFileIgnorer.js +0 -34
  751. package/templates/facebook/node_modules/stylelint/lib/utils/getFormatterOptionsText.js +0 -19
  752. package/templates/facebook/node_modules/stylelint/lib/utils/getModulePath.js +0 -31
  753. package/templates/facebook/node_modules/stylelint/lib/utils/getNextNonSharedLineCommentNode.js +0 -38
  754. package/templates/facebook/node_modules/stylelint/lib/utils/getOsEol.js +0 -11
  755. package/templates/facebook/node_modules/stylelint/lib/utils/getPreviousNonSharedLineCommentNode.js +0 -40
  756. package/templates/facebook/node_modules/stylelint/lib/utils/getRuleSelector.js +0 -13
  757. package/templates/facebook/node_modules/stylelint/lib/utils/getSchemeFromUrl.js +0 -39
  758. package/templates/facebook/node_modules/stylelint/lib/utils/getUnitFromValueNode.js +0 -49
  759. package/templates/facebook/node_modules/stylelint/lib/utils/hasBlock.js +0 -11
  760. package/templates/facebook/node_modules/stylelint/lib/utils/hasEmptyBlock.js +0 -13
  761. package/templates/facebook/node_modules/stylelint/lib/utils/hasEmptyLine.js +0 -14
  762. package/templates/facebook/node_modules/stylelint/lib/utils/hasInterpolation.js +0 -26
  763. package/templates/facebook/node_modules/stylelint/lib/utils/hasLessInterpolation.js +0 -11
  764. package/templates/facebook/node_modules/stylelint/lib/utils/hasPsvInterpolation.js +0 -10
  765. package/templates/facebook/node_modules/stylelint/lib/utils/hasScssInterpolation.js +0 -10
  766. package/templates/facebook/node_modules/stylelint/lib/utils/hasTplInterpolation.js +0 -11
  767. package/templates/facebook/node_modules/stylelint/lib/utils/hash.js +0 -12
  768. package/templates/facebook/node_modules/stylelint/lib/utils/isAfterComment.js +0 -16
  769. package/templates/facebook/node_modules/stylelint/lib/utils/isAfterSingleLineComment.js +0 -22
  770. package/templates/facebook/node_modules/stylelint/lib/utils/isAfterStandardPropertyDeclaration.js +0 -20
  771. package/templates/facebook/node_modules/stylelint/lib/utils/isAutoprefixable.js +0 -86
  772. package/templates/facebook/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterBlocklessAtRule.js +0 -22
  773. package/templates/facebook/node_modules/stylelint/lib/utils/isBlocklessAtRuleAfterSameNameBlocklessAtRule.js +0 -19
  774. package/templates/facebook/node_modules/stylelint/lib/utils/isContextFunctionalPseudoClass.js +0 -23
  775. package/templates/facebook/node_modules/stylelint/lib/utils/isCounterIncrementCustomIdentValue.js +0 -21
  776. package/templates/facebook/node_modules/stylelint/lib/utils/isCounterResetCustomIdentValue.js +0 -21
  777. package/templates/facebook/node_modules/stylelint/lib/utils/isCustomElement.js +0 -46
  778. package/templates/facebook/node_modules/stylelint/lib/utils/isCustomMediaQuery.js +0 -10
  779. package/templates/facebook/node_modules/stylelint/lib/utils/isCustomProperty.js +0 -10
  780. package/templates/facebook/node_modules/stylelint/lib/utils/isCustomPropertySet.js +0 -18
  781. package/templates/facebook/node_modules/stylelint/lib/utils/isCustomSelector.js +0 -11
  782. package/templates/facebook/node_modules/stylelint/lib/utils/isFirstNested.js +0 -67
  783. package/templates/facebook/node_modules/stylelint/lib/utils/isFirstNodeOfRoot.js +0 -15
  784. package/templates/facebook/node_modules/stylelint/lib/utils/isKeyframeRule.js +0 -13
  785. package/templates/facebook/node_modules/stylelint/lib/utils/isKeyframeSelector.js +0 -22
  786. package/templates/facebook/node_modules/stylelint/lib/utils/isLessVariable.js +0 -14
  787. package/templates/facebook/node_modules/stylelint/lib/utils/isMap.js +0 -44
  788. package/templates/facebook/node_modules/stylelint/lib/utils/isMathFunction.js +0 -13
  789. package/templates/facebook/node_modules/stylelint/lib/utils/isNonNegativeInteger.js +0 -17
  790. package/templates/facebook/node_modules/stylelint/lib/utils/isNumbery.js +0 -13
  791. package/templates/facebook/node_modules/stylelint/lib/utils/isOnlyWhitespace.js +0 -22
  792. package/templates/facebook/node_modules/stylelint/lib/utils/isRangeContextMediaFeature.js +0 -11
  793. package/templates/facebook/node_modules/stylelint/lib/utils/isScssVariable.js +0 -21
  794. package/templates/facebook/node_modules/stylelint/lib/utils/isSharedLineComment.js +0 -53
  795. package/templates/facebook/node_modules/stylelint/lib/utils/isSingleLineString.js +0 -12
  796. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.js +0 -29
  797. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxCombinator.js +0 -34
  798. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxDeclaration.js +0 -61
  799. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxFunction.js +0 -16
  800. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxMathFunction.js +0 -21
  801. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxMediaFeature.js +0 -26
  802. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxMediaFeatureName.js +0 -16
  803. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxProperty.js +0 -34
  804. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxRule.js +0 -69
  805. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxSelector.js +0 -38
  806. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxTypeSelector.js +0 -53
  807. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxUrl.js +0 -48
  808. package/templates/facebook/node_modules/stylelint/lib/utils/isStandardSyntaxValue.js +0 -47
  809. package/templates/facebook/node_modules/stylelint/lib/utils/isValidFontSize.js +0 -38
  810. package/templates/facebook/node_modules/stylelint/lib/utils/isValidHex.js +0 -11
  811. package/templates/facebook/node_modules/stylelint/lib/utils/isVariable.js +0 -11
  812. package/templates/facebook/node_modules/stylelint/lib/utils/isWhitespace.js +0 -11
  813. package/templates/facebook/node_modules/stylelint/lib/utils/matchesStringOrRegExp.js +0 -85
  814. package/templates/facebook/node_modules/stylelint/lib/utils/nextNonCommentNode.js +0 -20
  815. package/templates/facebook/node_modules/stylelint/lib/utils/noFilesFoundError.js +0 -20
  816. package/templates/facebook/node_modules/stylelint/lib/utils/nodeContextLookup.js +0 -43
  817. package/templates/facebook/node_modules/stylelint/lib/utils/optionsMatches.js +0 -22
  818. package/templates/facebook/node_modules/stylelint/lib/utils/parseCalcExpression/index.js +0 -15
  819. package/templates/facebook/node_modules/stylelint/lib/utils/parseCalcExpression/parser.jison +0 -172
  820. package/templates/facebook/node_modules/stylelint/lib/utils/parseCalcExpression/parser.js +0 -3929
  821. package/templates/facebook/node_modules/stylelint/lib/utils/parseSelector.js +0 -18
  822. package/templates/facebook/node_modules/stylelint/lib/utils/putIfAbsent.js +0 -22
  823. package/templates/facebook/node_modules/stylelint/lib/utils/rawNodeString.js +0 -20
  824. package/templates/facebook/node_modules/stylelint/lib/utils/removeEmptyLinesAfter.js +0 -15
  825. package/templates/facebook/node_modules/stylelint/lib/utils/removeEmptyLinesBefore.js +0 -15
  826. package/templates/facebook/node_modules/stylelint/lib/utils/report.js +0 -113
  827. package/templates/facebook/node_modules/stylelint/lib/utils/ruleMessages.js +0 -35
  828. package/templates/facebook/node_modules/stylelint/lib/utils/setAtRuleParams.js +0 -20
  829. package/templates/facebook/node_modules/stylelint/lib/utils/setDeclarationValue.js +0 -23
  830. package/templates/facebook/node_modules/stylelint/lib/utils/transformSelector.js +0 -17
  831. package/templates/facebook/node_modules/stylelint/lib/utils/typeGuards.js +0 -44
  832. package/templates/facebook/node_modules/stylelint/lib/utils/validateObjectWithArrayProps.js +0 -41
  833. package/templates/facebook/node_modules/stylelint/lib/utils/validateOptions.js +0 -169
  834. package/templates/facebook/node_modules/stylelint/lib/utils/vendor.js +0 -45
  835. package/templates/facebook/node_modules/stylelint/lib/utils/whitespaceChecker.js +0 -370
  836. package/templates/facebook/node_modules/stylelint/lib/validateDisableSettings.js +0 -79
  837. package/templates/facebook/node_modules/stylelint/lib/writeOutputFile.js +0 -13
  838. package/templates/facebook/node_modules/stylelint/package.json +0 -197
  839. package/templates/facebook/node_modules/type-fest/index.d.ts +0 -35
  840. package/templates/facebook/node_modules/type-fest/license +0 -9
  841. package/templates/facebook/node_modules/type-fest/package.json +0 -45
  842. package/templates/facebook/node_modules/type-fest/readme.md +0 -648
  843. package/templates/facebook/node_modules/type-fest/source/async-return-type.d.ts +0 -23
  844. package/templates/facebook/node_modules/type-fest/source/asyncify.d.ts +0 -31
  845. package/templates/facebook/node_modules/type-fest/source/basic.d.ts +0 -67
  846. package/templates/facebook/node_modules/type-fest/source/conditional-except.d.ts +0 -43
  847. package/templates/facebook/node_modules/type-fest/source/conditional-keys.d.ts +0 -43
  848. package/templates/facebook/node_modules/type-fest/source/conditional-pick.d.ts +0 -42
  849. package/templates/facebook/node_modules/type-fest/source/entries.d.ts +0 -57
  850. package/templates/facebook/node_modules/type-fest/source/entry.d.ts +0 -60
  851. package/templates/facebook/node_modules/type-fest/source/except.d.ts +0 -22
  852. package/templates/facebook/node_modules/type-fest/source/fixed-length-array.d.ts +0 -38
  853. package/templates/facebook/node_modules/type-fest/source/iterable-element.d.ts +0 -46
  854. package/templates/facebook/node_modules/type-fest/source/literal-union.d.ts +0 -33
  855. package/templates/facebook/node_modules/type-fest/source/merge-exclusive.d.ts +0 -39
  856. package/templates/facebook/node_modules/type-fest/source/merge.d.ts +0 -22
  857. package/templates/facebook/node_modules/type-fest/source/mutable.d.ts +0 -22
  858. package/templates/facebook/node_modules/type-fest/source/opaque.d.ts +0 -65
  859. package/templates/facebook/node_modules/type-fest/source/package-json.d.ts +0 -627
  860. package/templates/facebook/node_modules/type-fest/source/partial-deep.d.ts +0 -72
  861. package/templates/facebook/node_modules/type-fest/source/promisable.d.ts +0 -23
  862. package/templates/facebook/node_modules/type-fest/source/promise-value.d.ts +0 -27
  863. package/templates/facebook/node_modules/type-fest/source/readonly-deep.d.ts +0 -59
  864. package/templates/facebook/node_modules/type-fest/source/require-at-least-one.d.ts +0 -32
  865. package/templates/facebook/node_modules/type-fest/source/require-exactly-one.d.ts +0 -35
  866. package/templates/facebook/node_modules/type-fest/source/set-optional.d.ts +0 -34
  867. package/templates/facebook/node_modules/type-fest/source/set-required.d.ts +0 -34
  868. package/templates/facebook/node_modules/type-fest/source/set-return-type.d.ts +0 -29
  869. package/templates/facebook/node_modules/type-fest/source/stringified.d.ts +0 -21
  870. package/templates/facebook/node_modules/type-fest/source/tsconfig-json.d.ts +0 -872
  871. package/templates/facebook/node_modules/type-fest/source/union-to-intersection.d.ts +0 -58
  872. package/templates/facebook/node_modules/type-fest/source/value-of.d.ts +0 -40
@@ -1,3929 +0,0 @@
1
-
2
- // @ts-nocheck
3
-
4
- /* parser generated by jison 0.6.1-215 */
5
-
6
- /*
7
- * Returns a Parser object of the following structure:
8
- *
9
- * Parser: {
10
- * yy: {} The so-called "shared state" or rather the *source* of it;
11
- * the real "shared state" `yy` passed around to
12
- * the rule actions, etc. is a derivative/copy of this one,
13
- * not a direct reference!
14
- * }
15
- *
16
- * Parser.prototype: {
17
- * yy: {},
18
- * EOF: 1,
19
- * TERROR: 2,
20
- *
21
- * trace: function(errorMessage, ...),
22
- *
23
- * JisonParserError: function(msg, hash),
24
- *
25
- * quoteName: function(name),
26
- * Helper function which can be overridden by user code later on: put suitable
27
- * quotes around literal IDs in a description string.
28
- *
29
- * originalQuoteName: function(name),
30
- * The basic quoteName handler provided by JISON.
31
- * `cleanupAfterParse()` will clean up and reset `quoteName()` to reference this function
32
- * at the end of the `parse()`.
33
- *
34
- * describeSymbol: function(symbol),
35
- * Return a more-or-less human-readable description of the given symbol, when
36
- * available, or the symbol itself, serving as its own 'description' for lack
37
- * of something better to serve up.
38
- *
39
- * Return NULL when the symbol is unknown to the parser.
40
- *
41
- * symbols_: {associative list: name ==> number},
42
- * terminals_: {associative list: number ==> name},
43
- * nonterminals: {associative list: rule-name ==> {associative list: number ==> rule-alt}},
44
- * terminal_descriptions_: (if there are any) {associative list: number ==> description},
45
- * productions_: [...],
46
- *
47
- * performAction: function parser__performAction(yytext, yyleng, yylineno, yyloc, yystate, yysp, yyvstack, yylstack, yystack, yysstack),
48
- *
49
- * The function parameters and `this` have the following value/meaning:
50
- * - `this` : reference to the `yyval` internal object, which has members (`$` and `_$`)
51
- * to store/reference the rule value `$$` and location info `@$`.
52
- *
53
- * One important thing to note about `this` a.k.a. `yyval`: every *reduce* action gets
54
- * to see the same object via the `this` reference, i.e. if you wish to carry custom
55
- * data from one reduce action through to the next within a single parse run, then you
56
- * may get nasty and use `yyval` a.k.a. `this` for storing you own semi-permanent data.
57
- *
58
- * `this.yy` is a direct reference to the `yy` shared state object.
59
- *
60
- * `%parse-param`-specified additional `parse()` arguments have been added to this `yy`
61
- * object at `parse()` start and are therefore available to the action code via the
62
- * same named `yy.xxxx` attributes (where `xxxx` represents a identifier name from
63
- * the %parse-param` list.
64
- *
65
- * - `yytext` : reference to the lexer value which belongs to the last lexer token used
66
- * to match this rule. This is *not* the look-ahead token, but the last token
67
- * that's actually part of this rule.
68
- *
69
- * Formulated another way, `yytext` is the value of the token immediately preceeding
70
- * the current look-ahead token.
71
- * Caveats apply for rules which don't require look-ahead, such as epsilon rules.
72
- *
73
- * - `yyleng` : ditto as `yytext`, only now for the lexer.yyleng value.
74
- *
75
- * - `yylineno`: ditto as `yytext`, only now for the lexer.yylineno value.
76
- *
77
- * - `yyloc` : ditto as `yytext`, only now for the lexer.yylloc lexer token location info.
78
- *
79
- * WARNING: since jison 0.4.18-186 this entry may be NULL/UNDEFINED instead
80
- * of an empty object when no suitable location info can be provided.
81
- *
82
- * - `yystate` : the current parser state number, used internally for dispatching and
83
- * executing the action code chunk matching the rule currently being reduced.
84
- *
85
- * - `yysp` : the current state stack position (a.k.a. 'stack pointer')
86
- *
87
- * This one comes in handy when you are going to do advanced things to the parser
88
- * stacks, all of which are accessible from your action code (see the next entries below).
89
- *
90
- * Also note that you can access this and other stack index values using the new double-hash
91
- * syntax, i.e. `##$ === ##0 === yysp`, while `##1` is the stack index for all things
92
- * related to the first rule term, just like you have `$1`, `@1` and `#1`.
93
- * This is made available to write very advanced grammar action rules, e.g. when you want
94
- * to investigate the parse state stack in your action code, which would, for example,
95
- * be relevant when you wish to implement error diagnostics and reporting schemes similar
96
- * to the work described here:
97
- *
98
- * + Pottier, F., 2016. Reachability and error diagnosis in LR(1) automata.
99
- * In Journées Francophones des Languages Applicatifs.
100
- *
101
- * + Jeffery, C.L., 2003. Generating LR syntax error messages from examples.
102
- * ACM Transactions on Programming Languages and Systems (TOPLAS), 25(5), pp.631–640.
103
- *
104
- * - `yyrulelength`: the current rule's term count, i.e. the number of entries occupied on the stack.
105
- *
106
- * This one comes in handy when you are going to do advanced things to the parser
107
- * stacks, all of which are accessible from your action code (see the next entries below).
108
- *
109
- * - `yyvstack`: reference to the parser value stack. Also accessed via the `$1` etc.
110
- * constructs.
111
- *
112
- * - `yylstack`: reference to the parser token location stack. Also accessed via
113
- * the `@1` etc. constructs.
114
- *
115
- * WARNING: since jison 0.4.18-186 this array MAY contain slots which are
116
- * UNDEFINED rather than an empty (location) object, when the lexer/parser
117
- * action code did not provide a suitable location info object when such a
118
- * slot was filled!
119
- *
120
- * - `yystack` : reference to the parser token id stack. Also accessed via the
121
- * `#1` etc. constructs.
122
- *
123
- * Note: this is a bit of a **white lie** as we can statically decode any `#n` reference to
124
- * its numeric token id value, hence that code wouldn't need the `yystack` but *you* might
125
- * want access this array for your own purposes, such as error analysis as mentioned above!
126
- *
127
- * Note that this stack stores the current stack of *tokens*, that is the sequence of
128
- * already parsed=reduced *nonterminals* (tokens representing rules) and *terminals*
129
- * (lexer tokens *shifted* onto the stack until the rule they belong to is found and
130
- * *reduced*.
131
- *
132
- * - `yysstack`: reference to the parser state stack. This one carries the internal parser
133
- * *states* such as the one in `yystate`, which are used to represent
134
- * the parser state machine in the *parse table*. *Very* *internal* stuff,
135
- * what can I say? If you access this one, you're clearly doing wicked things
136
- *
137
- * - `...` : the extra arguments you specified in the `%parse-param` statement in your
138
- * grammar definition file.
139
- *
140
- * table: [...],
141
- * State transition table
142
- * ----------------------
143
- *
144
- * index levels are:
145
- * - `state` --> hash table
146
- * - `symbol` --> action (number or array)
147
- *
148
- * If the `action` is an array, these are the elements' meaning:
149
- * - index [0]: 1 = shift, 2 = reduce, 3 = accept
150
- * - index [1]: GOTO `state`
151
- *
152
- * If the `action` is a number, it is the GOTO `state`
153
- *
154
- * defaultActions: {...},
155
- *
156
- * parseError: function(str, hash, ExceptionClass),
157
- * yyError: function(str, ...),
158
- * yyRecovering: function(),
159
- * yyErrOk: function(),
160
- * yyClearIn: function(),
161
- *
162
- * constructParseErrorInfo: function(error_message, exception_object, expected_token_set, is_recoverable),
163
- * Helper function **which will be set up during the first invocation of the `parse()` method**.
164
- * Produces a new errorInfo 'hash object' which can be passed into `parseError()`.
165
- * See it's use in this parser kernel in many places; example usage:
166
- *
167
- * var infoObj = parser.constructParseErrorInfo('fail!', null,
168
- * parser.collect_expected_token_set(state), true);
169
- * var retVal = parser.parseError(infoObj.errStr, infoObj, parser.JisonParserError);
170
- *
171
- * originalParseError: function(str, hash, ExceptionClass),
172
- * The basic `parseError` handler provided by JISON.
173
- * `cleanupAfterParse()` will clean up and reset `parseError()` to reference this function
174
- * at the end of the `parse()`.
175
- *
176
- * options: { ... parser %options ... },
177
- *
178
- * parse: function(input[, args...]),
179
- * Parse the given `input` and return the parsed value (or `true` when none was provided by
180
- * the root action, in which case the parser is acting as a *matcher*).
181
- * You MAY use the additional `args...` parameters as per `%parse-param` spec of this grammar:
182
- * these extra `args...` are added verbatim to the `yy` object reference as member variables.
183
- *
184
- * WARNING:
185
- * Parser's additional `args...` parameters (via `%parse-param`) MAY conflict with
186
- * any attributes already added to `yy` by the jison run-time;
187
- * when such a collision is detected an exception is thrown to prevent the generated run-time
188
- * from silently accepting this confusing and potentially hazardous situation!
189
- *
190
- * The lexer MAY add its own set of additional parameters (via the `%parse-param` line in
191
- * the lexer section of the grammar spec): these will be inserted in the `yy` shared state
192
- * object and any collision with those will be reported by the lexer via a thrown exception.
193
- *
194
- * cleanupAfterParse: function(resultValue, invoke_post_methods, do_not_nuke_errorinfos),
195
- * Helper function **which will be set up during the first invocation of the `parse()` method**.
196
- * This helper API is invoked at the end of the `parse()` call, unless an exception was thrown
197
- * and `%options no-try-catch` has been defined for this grammar: in that case this helper MAY
198
- * be invoked by calling user code to ensure the `post_parse` callbacks are invoked and
199
- * the internal parser gets properly garbage collected under these particular circumstances.
200
- *
201
- * yyMergeLocationInfo: function(first_index, last_index, first_yylloc, last_yylloc, dont_look_back),
202
- * Helper function **which will be set up during the first invocation of the `parse()` method**.
203
- * This helper API can be invoked to calculate a spanning `yylloc` location info object.
204
- *
205
- * Note: %epsilon rules MAY specify no `first_index` and `first_yylloc`, in which case
206
- * this function will attempt to obtain a suitable location marker by inspecting the location stack
207
- * backwards.
208
- *
209
- * For more info see the documentation comment further below, immediately above this function's
210
- * implementation.
211
- *
212
- * lexer: {
213
- * yy: {...}, A reference to the so-called "shared state" `yy` once
214
- * received via a call to the `.setInput(input, yy)` lexer API.
215
- * EOF: 1,
216
- * ERROR: 2,
217
- * JisonLexerError: function(msg, hash),
218
- * parseError: function(str, hash, ExceptionClass),
219
- * setInput: function(input, [yy]),
220
- * input: function(),
221
- * unput: function(str),
222
- * more: function(),
223
- * reject: function(),
224
- * less: function(n),
225
- * pastInput: function(n),
226
- * upcomingInput: function(n),
227
- * showPosition: function(),
228
- * test_match: function(regex_match_array, rule_index, ...),
229
- * next: function(...),
230
- * lex: function(...),
231
- * begin: function(condition),
232
- * pushState: function(condition),
233
- * popState: function(),
234
- * topState: function(),
235
- * _currentRules: function(),
236
- * stateStackSize: function(),
237
- * cleanupAfterLex: function()
238
- *
239
- * options: { ... lexer %options ... },
240
- *
241
- * performAction: function(yy, yy_, $avoiding_name_collisions, YY_START, ...),
242
- * rules: [...],
243
- * conditions: {associative list: name ==> set},
244
- * }
245
- * }
246
- *
247
- *
248
- * token location info (@$, _$, etc.): {
249
- * first_line: n,
250
- * last_line: n,
251
- * first_column: n,
252
- * last_column: n,
253
- * range: [start_number, end_number]
254
- * (where the numbers are indexes into the input string, zero-based)
255
- * }
256
- *
257
- * ---
258
- *
259
- * The `parseError` function receives a 'hash' object with these members for lexer and
260
- * parser errors:
261
- *
262
- * {
263
- * text: (matched text)
264
- * token: (the produced terminal token, if any)
265
- * token_id: (the produced terminal token numeric ID, if any)
266
- * line: (yylineno)
267
- * loc: (yylloc)
268
- * }
269
- *
270
- * parser (grammar) errors will also provide these additional members:
271
- *
272
- * {
273
- * expected: (array describing the set of expected tokens;
274
- * may be UNDEFINED when we cannot easily produce such a set)
275
- * state: (integer (or array when the table includes grammar collisions);
276
- * represents the current internal state of the parser kernel.
277
- * can, for example, be used to pass to the `collect_expected_token_set()`
278
- * API to obtain the expected token set)
279
- * action: (integer; represents the current internal action which will be executed)
280
- * new_state: (integer; represents the next/planned internal state, once the current
281
- * action has executed)
282
- * recoverable: (boolean: TRUE when the parser MAY have an error recovery rule
283
- * available for this particular error)
284
- * state_stack: (array: the current parser LALR/LR internal state stack; this can be used,
285
- * for instance, for advanced error analysis and reporting)
286
- * value_stack: (array: the current parser LALR/LR internal `$$` value stack; this can be used,
287
- * for instance, for advanced error analysis and reporting)
288
- * location_stack: (array: the current parser LALR/LR internal location stack; this can be used,
289
- * for instance, for advanced error analysis and reporting)
290
- * yy: (object: the current parser internal "shared state" `yy`
291
- * as is also available in the rule actions; this can be used,
292
- * for instance, for advanced error analysis and reporting)
293
- * lexer: (reference to the current lexer instance used by the parser)
294
- * parser: (reference to the current parser instance)
295
- * }
296
- *
297
- * while `this` will reference the current parser instance.
298
- *
299
- * When `parseError` is invoked by the lexer, `this` will still reference the related *parser*
300
- * instance, while these additional `hash` fields will also be provided:
301
- *
302
- * {
303
- * lexer: (reference to the current lexer instance which reported the error)
304
- * }
305
- *
306
- * When `parseError` is invoked by the parser due to a **JavaScript exception** being fired
307
- * from either the parser or lexer, `this` will still reference the related *parser*
308
- * instance, while these additional `hash` fields will also be provided:
309
- *
310
- * {
311
- * exception: (reference to the exception thrown)
312
- * }
313
- *
314
- * Please do note that in the latter situation, the `expected` field will be omitted as
315
- * this type of failure is assumed not to be due to *parse errors* but rather due to user
316
- * action code in either parser or lexer failing unexpectedly.
317
- *
318
- * ---
319
- *
320
- * You can specify parser options by setting / modifying the `.yy` object of your Parser instance.
321
- * These options are available:
322
- *
323
- * ### options which are global for all parser instances
324
- *
325
- * Parser.pre_parse: function(yy)
326
- * optional: you can specify a pre_parse() function in the chunk following
327
- * the grammar, i.e. after the last `%%`.
328
- * Parser.post_parse: function(yy, retval, parseInfo) { return retval; }
329
- * optional: you can specify a post_parse() function in the chunk following
330
- * the grammar, i.e. after the last `%%`. When it does not return any value,
331
- * the parser will return the original `retval`.
332
- *
333
- * ### options which can be set up per parser instance
334
- *
335
- * yy: {
336
- * pre_parse: function(yy)
337
- * optional: is invoked before the parse cycle starts (and before the first
338
- * invocation of `lex()`) but immediately after the invocation of
339
- * `parser.pre_parse()`).
340
- * post_parse: function(yy, retval, parseInfo) { return retval; }
341
- * optional: is invoked when the parse terminates due to success ('accept')
342
- * or failure (even when exceptions are thrown).
343
- * `retval` contains the return value to be produced by `Parser.parse()`;
344
- * this function can override the return value by returning another.
345
- * When it does not return any value, the parser will return the original
346
- * `retval`.
347
- * This function is invoked immediately before `parser.post_parse()`.
348
- *
349
- * parseError: function(str, hash, ExceptionClass)
350
- * optional: overrides the default `parseError` function.
351
- * quoteName: function(name),
352
- * optional: overrides the default `quoteName` function.
353
- * }
354
- *
355
- * parser.lexer.options: {
356
- * pre_lex: function()
357
- * optional: is invoked before the lexer is invoked to produce another token.
358
- * `this` refers to the Lexer object.
359
- * post_lex: function(token) { return token; }
360
- * optional: is invoked when the lexer has produced a token `token`;
361
- * this function can override the returned token value by returning another.
362
- * When it does not return any (truthy) value, the lexer will return
363
- * the original `token`.
364
- * `this` refers to the Lexer object.
365
- *
366
- * ranges: boolean
367
- * optional: `true` ==> token location info will include a .range[] member.
368
- * flex: boolean
369
- * optional: `true` ==> flex-like lexing behaviour where the rules are tested
370
- * exhaustively to find the longest match.
371
- * backtrack_lexer: boolean
372
- * optional: `true` ==> lexer regexes are tested in order and for invoked;
373
- * the lexer terminates the scan when a token is returned by the action code.
374
- * xregexp: boolean
375
- * optional: `true` ==> lexer rule regexes are "extended regex format" requiring the
376
- * `XRegExp` library. When this `%option` has not been specified at compile time, all lexer
377
- * rule regexes have been written as standard JavaScript RegExp expressions.
378
- * }
379
- */
380
-
381
-
382
-
383
- var parser = (function () {
384
-
385
-
386
- // See also:
387
- // http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/#35881508
388
- // but we keep the prototype.constructor and prototype.name assignment lines too for compatibility
389
- // with userland code which might access the derived class in a 'classic' way.
390
- function JisonParserError(msg, hash) {
391
- Object.defineProperty(this, 'name', {
392
- enumerable: false,
393
- writable: false,
394
- value: 'JisonParserError'
395
- });
396
-
397
- if (msg == null) msg = '???';
398
-
399
- Object.defineProperty(this, 'message', {
400
- enumerable: false,
401
- writable: true,
402
- value: msg
403
- });
404
-
405
- this.hash = hash;
406
-
407
- var stacktrace;
408
- if (hash && hash.exception instanceof Error) {
409
- var ex2 = hash.exception;
410
- this.message = ex2.message || msg;
411
- stacktrace = ex2.stack;
412
- }
413
- if (!stacktrace) {
414
- if (Error.hasOwnProperty('captureStackTrace')) { // V8/Chrome engine
415
- Error.captureStackTrace(this, this.constructor);
416
- } else {
417
- stacktrace = (new Error(msg)).stack;
418
- }
419
- }
420
- if (stacktrace) {
421
- Object.defineProperty(this, 'stack', {
422
- enumerable: false,
423
- writable: false,
424
- value: stacktrace
425
- });
426
- }
427
- }
428
-
429
- if (typeof Object.setPrototypeOf === 'function') {
430
- Object.setPrototypeOf(JisonParserError.prototype, Error.prototype);
431
- } else {
432
- JisonParserError.prototype = Object.create(Error.prototype);
433
- }
434
- JisonParserError.prototype.constructor = JisonParserError;
435
- JisonParserError.prototype.name = 'JisonParserError';
436
-
437
-
438
-
439
-
440
- // helper: reconstruct the productions[] table
441
- function bp(s) {
442
- var rv = [];
443
- var p = s.pop;
444
- var r = s.rule;
445
- for (var i = 0, l = p.length; i < l; i++) {
446
- rv.push([
447
- p[i],
448
- r[i]
449
- ]);
450
- }
451
- return rv;
452
- }
453
-
454
-
455
-
456
- // helper: reconstruct the defaultActions[] table
457
- function bda(s) {
458
- var rv = {};
459
- var d = s.idx;
460
- var g = s.goto;
461
- for (var i = 0, l = d.length; i < l; i++) {
462
- var j = d[i];
463
- rv[j] = g[i];
464
- }
465
- return rv;
466
- }
467
-
468
-
469
-
470
- // helper: reconstruct the 'goto' table
471
- function bt(s) {
472
- var rv = [];
473
- var d = s.len;
474
- var y = s.symbol;
475
- var t = s.type;
476
- var a = s.state;
477
- var m = s.mode;
478
- var g = s.goto;
479
- for (var i = 0, l = d.length; i < l; i++) {
480
- var n = d[i];
481
- var q = {};
482
- for (var j = 0; j < n; j++) {
483
- var z = y.shift();
484
- switch (t.shift()) {
485
- case 2:
486
- q[z] = [
487
- m.shift(),
488
- g.shift()
489
- ];
490
- break;
491
-
492
- case 0:
493
- q[z] = a.shift();
494
- break;
495
-
496
- default:
497
- // type === 1: accept
498
- q[z] = [
499
- 3
500
- ];
501
- }
502
- }
503
- rv.push(q);
504
- }
505
- return rv;
506
- }
507
-
508
-
509
-
510
- // helper: runlength encoding with increment step: code, length: step (default step = 0)
511
- // `this` references an array
512
- function s(c, l, a) {
513
- a = a || 0;
514
- for (var i = 0; i < l; i++) {
515
- this.push(c);
516
- c += a;
517
- }
518
- }
519
-
520
- // helper: duplicate sequence from *relative* offset and length.
521
- // `this` references an array
522
- function c(i, l) {
523
- i = this.length - i;
524
- for (l += i; i < l; i++) {
525
- this.push(this[i]);
526
- }
527
- }
528
-
529
- // helper: unpack an array using helpers and data, all passed in an array argument 'a'.
530
- function u(a) {
531
- var rv = [];
532
- for (var i = 0, l = a.length; i < l; i++) {
533
- var e = a[i];
534
- // Is this entry a helper function?
535
- if (typeof e === 'function') {
536
- i++;
537
- e.apply(rv, a[i]);
538
- } else {
539
- rv.push(e);
540
- }
541
- }
542
- return rv;
543
- }
544
-
545
-
546
- var parser = {
547
- // Code Generator Information Report
548
- // ---------------------------------
549
- //
550
- // Options:
551
- //
552
- // default action mode: ............. ["classic","merge"]
553
- // test-compile action mode: ........ "parser:*,lexer:*"
554
- // try..catch: ...................... true
555
- // default resolve on conflict: ..... true
556
- // on-demand look-ahead: ............ false
557
- // error recovery token skip maximum: 3
558
- // yyerror in parse actions is: ..... NOT recoverable,
559
- // yyerror in lexer actions and other non-fatal lexer are:
560
- // .................................. NOT recoverable,
561
- // debug grammar/output: ............ false
562
- // has partial LR conflict upgrade: true
563
- // rudimentary token-stack support: false
564
- // parser table compression mode: ... 2
565
- // export debug tables: ............. false
566
- // export *all* tables: ............. false
567
- // module type: ..................... commonjs
568
- // parser engine type: .............. lalr
569
- // output main() in the module: ..... true
570
- // has user-specified main(): ....... false
571
- // has user-specified require()/import modules for main():
572
- // .................................. false
573
- // number of expected conflicts: .... 0
574
- //
575
- //
576
- // Parser Analysis flags:
577
- //
578
- // no significant actions (parser is a language matcher only):
579
- // .................................. false
580
- // uses yyleng: ..................... false
581
- // uses yylineno: ................... false
582
- // uses yytext: ..................... false
583
- // uses yylloc: ..................... false
584
- // uses ParseError API: ............. false
585
- // uses YYERROR: .................... false
586
- // uses YYRECOVERING: ............... false
587
- // uses YYERROK: .................... false
588
- // uses YYCLEARIN: .................. false
589
- // tracks rule values: .............. true
590
- // assigns rule values: ............. true
591
- // uses location tracking: .......... true
592
- // assigns location: ................ true
593
- // uses yystack: .................... false
594
- // uses yysstack: ................... false
595
- // uses yysp: ....................... true
596
- // uses yyrulelength: ............... false
597
- // uses yyMergeLocationInfo API: .... true
598
- // has error recovery: .............. false
599
- // has error reporting: ............. false
600
- //
601
- // --------- END OF REPORT -----------
602
-
603
- trace: function no_op_trace() { },
604
- JisonParserError: JisonParserError,
605
- yy: {},
606
- options: {
607
- type: "lalr",
608
- hasPartialLrUpgradeOnConflict: true,
609
- errorRecoveryTokenDiscardCount: 3,
610
- caseInsensitive: true
611
- },
612
- symbols_: {
613
- "$accept": 0,
614
- "$end": 1,
615
- "ADD": 6,
616
- "ANGLE": 13,
617
- "CALC": 3,
618
- "DIV": 9,
619
- "EOF": 1,
620
- "FREQ": 15,
621
- "FUNCTION": 11,
622
- "LENGTH": 12,
623
- "LPAREN": 4,
624
- "MUL": 8,
625
- "NUMBER": 10,
626
- "PERCENTAGE": 17,
627
- "RES": 16,
628
- "RPAREN": 5,
629
- "SUB": 7,
630
- "TIME": 14,
631
- "UNKNOWN": 18,
632
- "css_value": 23,
633
- "error": 2,
634
- "expression": 19,
635
- "function": 22,
636
- "math_expression": 20,
637
- "value": 21
638
- },
639
- terminals_: {
640
- 1: "EOF",
641
- 2: "error",
642
- 3: "CALC",
643
- 4: "LPAREN",
644
- 5: "RPAREN",
645
- 6: "ADD",
646
- 7: "SUB",
647
- 8: "MUL",
648
- 9: "DIV",
649
- 10: "NUMBER",
650
- 11: "FUNCTION",
651
- 12: "LENGTH",
652
- 13: "ANGLE",
653
- 14: "TIME",
654
- 15: "FREQ",
655
- 16: "RES",
656
- 17: "PERCENTAGE",
657
- 18: "UNKNOWN"
658
- },
659
- TERROR: 2,
660
- EOF: 1,
661
-
662
- // internals: defined here so the object *structure* doesn't get modified by parse() et al,
663
- // thus helping JIT compilers like Chrome V8.
664
- originalQuoteName: null,
665
- originalParseError: null,
666
- cleanupAfterParse: null,
667
- constructParseErrorInfo: null,
668
- yyMergeLocationInfo: null,
669
-
670
- __reentrant_call_depth: 0, // INTERNAL USE ONLY
671
- __error_infos: [], // INTERNAL USE ONLY: the set of parseErrorInfo objects created since the last cleanup
672
- __error_recovery_infos: [], // INTERNAL USE ONLY: the set of parseErrorInfo objects created since the last cleanup
673
-
674
- // APIs which will be set up depending on user action code analysis:
675
- //yyRecovering: 0,
676
- //yyErrOk: 0,
677
- //yyClearIn: 0,
678
-
679
- // Helper APIs
680
- // -----------
681
-
682
- // Helper function which can be overridden by user code later on: put suitable quotes around
683
- // literal IDs in a description string.
684
- quoteName: function parser_quoteName(id_str) {
685
- return '"' + id_str + '"';
686
- },
687
-
688
- // Return the name of the given symbol (terminal or non-terminal) as a string, when available.
689
- //
690
- // Return NULL when the symbol is unknown to the parser.
691
- getSymbolName: function parser_getSymbolName(symbol) {
692
- if (this.terminals_[symbol]) {
693
- return this.terminals_[symbol];
694
- }
695
-
696
- // Otherwise... this might refer to a RULE token i.e. a non-terminal: see if we can dig that one up.
697
- //
698
- // An example of this may be where a rule's action code contains a call like this:
699
- //
700
- // parser.getSymbolName(#$)
701
- //
702
- // to obtain a human-readable name of the current grammar rule.
703
- var s = this.symbols_;
704
- for (var key in s) {
705
- if (s[key] === symbol) {
706
- return key;
707
- }
708
- }
709
- return null;
710
- },
711
-
712
- // Return a more-or-less human-readable description of the given symbol, when available,
713
- // or the symbol itself, serving as its own 'description' for lack of something better to serve up.
714
- //
715
- // Return NULL when the symbol is unknown to the parser.
716
- describeSymbol: function parser_describeSymbol(symbol) {
717
- if (symbol !== this.EOF && this.terminal_descriptions_ && this.terminal_descriptions_[symbol]) {
718
- return this.terminal_descriptions_[symbol];
719
- }
720
- else if (symbol === this.EOF) {
721
- return 'end of input';
722
- }
723
- var id = this.getSymbolName(symbol);
724
- if (id) {
725
- return this.quoteName(id);
726
- }
727
- return null;
728
- },
729
-
730
- // Produce a (more or less) human-readable list of expected tokens at the point of failure.
731
- //
732
- // The produced list may contain token or token set descriptions instead of the tokens
733
- // themselves to help turning this output into something that easier to read by humans
734
- // unless `do_not_describe` parameter is set, in which case a list of the raw, *numeric*,
735
- // expected terminals and nonterminals is produced.
736
- //
737
- // The returned list (array) will not contain any duplicate entries.
738
- collect_expected_token_set: function parser_collect_expected_token_set(state, do_not_describe) {
739
- var TERROR = this.TERROR;
740
- var tokenset = [];
741
- var check = {};
742
- // Has this (error?) state been outfitted with a custom expectations description text for human consumption?
743
- // If so, use that one instead of the less palatable token set.
744
- if (!do_not_describe && this.state_descriptions_ && this.state_descriptions_[state]) {
745
- return [
746
- this.state_descriptions_[state]
747
- ];
748
- }
749
- for (var p in this.table[state]) {
750
- p = +p;
751
- if (p !== TERROR) {
752
- var d = do_not_describe ? p : this.describeSymbol(p);
753
- if (d && !check[d]) {
754
- tokenset.push(d);
755
- check[d] = true; // Mark this token description as already mentioned to prevent outputting duplicate entries.
756
- }
757
- }
758
- }
759
- return tokenset;
760
- },
761
- productions_: bp({
762
- pop: u([
763
- 19,
764
- s,
765
- [20, 11],
766
- 21,
767
- 22,
768
- s,
769
- [23, 7]
770
- ]),
771
- rule: u([
772
- 2,
773
- 4,
774
- s,
775
- [3, 4],
776
- 2,
777
- 2,
778
- 3,
779
- s,
780
- [1, 12]
781
- ])
782
- }),
783
- performAction: function parser__PerformAction(yyloc, yystate /* action[1] */, yysp, yyvstack, yylstack) {
784
-
785
- /* this == yyval */
786
-
787
- // the JS engine itself can go and remove these statements when `yy` turns out to be unused in any action code!
788
- var yy = this.yy;
789
- var yyparser = yy.parser;
790
- var yylexer = yy.lexer;
791
-
792
-
793
-
794
- switch (yystate) {
795
- case 0:
796
- /*! Production:: $accept : expression $end */
797
-
798
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,-,-,LT,LA,-,-):
799
- this.$ = yyvstack[yysp - 1];
800
- this._$ = yylstack[yysp - 1];
801
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,-,-,LT,LA,-,-)
802
- break;
803
-
804
- case 1:
805
- /*! Production:: expression : math_expression EOF */
806
-
807
- // default action (generated by JISON mode classic/merge :: 2,VT,VA,-,-,LT,LA,-,-):
808
- this.$ = yyvstack[yysp - 1];
809
- this._$ = yyparser.yyMergeLocationInfo(yysp - 1, yysp);
810
- // END of default action (generated by JISON mode classic/merge :: 2,VT,VA,-,-,LT,LA,-,-)
811
-
812
-
813
- return yyvstack[yysp - 1];
814
- break;
815
-
816
- case 2:
817
- /*! Production:: math_expression : CALC LPAREN math_expression RPAREN */
818
-
819
- // default action (generated by JISON mode classic/merge :: 4,VT,VA,VU,-,LT,LA,-,-):
820
- this._$ = yyparser.yyMergeLocationInfo(yysp - 3, yysp);
821
- // END of default action (generated by JISON mode classic/merge :: 4,VT,VA,VU,-,LT,LA,-,-)
822
-
823
-
824
- this.$ = yyvstack[yysp - 1];
825
- this.$.source.start = { index: yylstack[yysp - 3].range[0] };
826
- this.$.source.end = { index: yylstack[yysp].range[1] };
827
- break;
828
-
829
- case 3:
830
- /*! Production:: math_expression : math_expression ADD math_expression */
831
- case 4:
832
- /*! Production:: math_expression : math_expression SUB math_expression */
833
- case 5:
834
- /*! Production:: math_expression : math_expression MUL math_expression */
835
- case 6:
836
- /*! Production:: math_expression : math_expression DIV math_expression */
837
-
838
- // default action (generated by JISON mode classic/merge :: 3,VT,VA,VU,-,LT,LA,-,-):
839
- this._$ = yyparser.yyMergeLocationInfo(yysp - 2, yysp);
840
- // END of default action (generated by JISON mode classic/merge :: 3,VT,VA,VU,-,LT,LA,-,-)
841
-
842
-
843
- this.$ = {
844
- type: 'MathExpression', operator: yyvstack[yysp - 1], left: yyvstack[yysp - 2], right: yyvstack[yysp],
845
- source: {
846
- start: yyvstack[yysp - 2].source.start, end: yyvstack[yysp].source.end,
847
- operator: { start: { index: yylstack[yysp - 1].range[0] }, end: { index: yylstack[yysp - 1].range[1] } }
848
- }
849
- };
850
- break;
851
-
852
- case 7:
853
- /*! Production:: math_expression : SUB math_expression */
854
-
855
- // default action (generated by JISON mode classic/merge :: 2,VT,VA,VU,-,LT,LA,-,-):
856
- this._$ = yyparser.yyMergeLocationInfo(yysp - 1, yysp);
857
- // END of default action (generated by JISON mode classic/merge :: 2,VT,VA,VU,-,LT,LA,-,-)
858
-
859
-
860
- if (yylstack[yysp - 1].range[1] !== yyvstack[yysp].source.start.index) {
861
- throw new Error('Unexpected spaces was found between sign and value');
862
- }
863
- if (typeof yyvstack[yysp].value !== 'number') {
864
- throw new Error('Unexpected sign');
865
- }
866
- if (yyvstack[yysp].sign) {
867
- throw new Error('Unexpected continuous sign');
868
- }
869
- this.$ = yyvstack[yysp];
870
- this.$.sign = '-'
871
- this.$.value = -yyvstack[yysp].value;
872
- this.$.source.start.index = yylstack[yysp - 1].range[0];
873
- break;
874
-
875
- case 8:
876
- /*! Production:: math_expression : ADD math_expression */
877
-
878
- // default action (generated by JISON mode classic/merge :: 2,VT,VA,VU,-,LT,LA,-,-):
879
- this._$ = yyparser.yyMergeLocationInfo(yysp - 1, yysp);
880
- // END of default action (generated by JISON mode classic/merge :: 2,VT,VA,VU,-,LT,LA,-,-)
881
-
882
-
883
- if (yylstack[yysp - 1].range[1] !== yyvstack[yysp].source.start.index) {
884
- throw new Error('Unexpected spaces was found between sign and value');
885
- }
886
- if (typeof yyvstack[yysp].value !== 'number') {
887
- throw new Error('Unexpected sign');
888
- }
889
- if (yyvstack[yysp].sign) {
890
- throw new Error('Unexpected continuous sign');
891
- }
892
- this.$ = yyvstack[yysp];
893
- this.$.sign = '+'
894
- this.$.source.start.index = yylstack[yysp - 1].range[0];
895
- break;
896
-
897
- case 9:
898
- /*! Production:: math_expression : LPAREN math_expression RPAREN */
899
-
900
- // default action (generated by JISON mode classic/merge :: 3,VT,VA,VU,-,LT,LA,-,-):
901
- this._$ = yyparser.yyMergeLocationInfo(yysp - 2, yysp);
902
- // END of default action (generated by JISON mode classic/merge :: 3,VT,VA,VU,-,LT,LA,-,-)
903
-
904
-
905
- this.$ = yyvstack[yysp - 1];
906
- this.$.source.start = { index: yylstack[yysp - 2].range[0] };
907
- this.$.source.end = { index: yylstack[yysp].range[1] };
908
- break;
909
-
910
- case 10:
911
- /*! Production:: math_expression : function */
912
- case 11:
913
- /*! Production:: math_expression : css_value */
914
- case 12:
915
- /*! Production:: math_expression : value */
916
-
917
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
918
- this._$ = yylstack[yysp];
919
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
920
-
921
-
922
- this.$ = yyvstack[yysp];
923
- break;
924
-
925
- case 13:
926
- /*! Production:: value : NUMBER */
927
-
928
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
929
- this._$ = yylstack[yysp];
930
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
931
-
932
-
933
- this.$ = { type: 'Value', value: parseFloat(yyvstack[yysp]), source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
934
- break;
935
-
936
- case 14:
937
- /*! Production:: function : FUNCTION */
938
-
939
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
940
- this._$ = yylstack[yysp];
941
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
942
-
943
-
944
- this.$ = { type: 'Function', value: yyvstack[yysp], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
945
- break;
946
-
947
- case 15:
948
- /*! Production:: css_value : LENGTH */
949
-
950
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
951
- this._$ = yylstack[yysp];
952
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
953
-
954
-
955
- this.$ = { type: 'LengthValue', value: parseFloat(yyvstack[yysp]), unit: /[a-z]+/i.exec(yyvstack[yysp])[0], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
956
- break;
957
-
958
- case 16:
959
- /*! Production:: css_value : ANGLE */
960
-
961
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
962
- this._$ = yylstack[yysp];
963
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
964
-
965
-
966
- this.$ = { type: 'AngleValue', value: parseFloat(yyvstack[yysp]), unit: /[a-z]+/i.exec(yyvstack[yysp])[0], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
967
- break;
968
-
969
- case 17:
970
- /*! Production:: css_value : TIME */
971
-
972
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
973
- this._$ = yylstack[yysp];
974
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
975
-
976
-
977
- this.$ = { type: 'TimeValue', value: parseFloat(yyvstack[yysp]), unit: /[a-z]+/i.exec(yyvstack[yysp])[0], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
978
- break;
979
-
980
- case 18:
981
- /*! Production:: css_value : FREQ */
982
-
983
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
984
- this._$ = yylstack[yysp];
985
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
986
-
987
-
988
- this.$ = { type: 'FrequencyValue', value: parseFloat(yyvstack[yysp]), unit: /[a-z]+/i.exec(yyvstack[yysp])[0], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
989
- break;
990
-
991
- case 19:
992
- /*! Production:: css_value : RES */
993
-
994
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
995
- this._$ = yylstack[yysp];
996
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
997
-
998
-
999
- this.$ = { type: 'ResolutionValue', value: parseFloat(yyvstack[yysp]), unit: /[a-z]+/i.exec(yyvstack[yysp])[0], source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
1000
- break;
1001
-
1002
- case 20:
1003
- /*! Production:: css_value : PERCENTAGE */
1004
-
1005
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
1006
- this._$ = yylstack[yysp];
1007
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
1008
-
1009
-
1010
- this.$ = { type: 'PercentageValue', value: parseFloat(yyvstack[yysp]), unit: '%', source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
1011
- break;
1012
-
1013
- case 21:
1014
- /*! Production:: css_value : UNKNOWN */
1015
-
1016
- // default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-):
1017
- this._$ = yylstack[yysp];
1018
- // END of default action (generated by JISON mode classic/merge :: 1,VT,VA,VU,-,LT,LA,-,-)
1019
-
1020
-
1021
- this.$ = { type: 'UnknownValue', value: yyvstack[yysp], unit: '', source: { start: { index: yylstack[yysp].range[0] }, end: { index: yylstack[yysp].range[1] } } };
1022
- break;
1023
-
1024
- }
1025
- },
1026
- table: bt({
1027
- len: u([
1028
- 18,
1029
- 1,
1030
- 5,
1031
- 1,
1032
- s,
1033
- [17, 3],
1034
- s,
1035
- [0, 13],
1036
- s,
1037
- [17, 5],
1038
- 0,
1039
- 0,
1040
- 5,
1041
- 6,
1042
- 6,
1043
- c,
1044
- [5, 3],
1045
- 0,
1046
- 0
1047
- ]),
1048
- symbol: u([
1049
- 3,
1050
- 4,
1051
- 6,
1052
- 7,
1053
- s,
1054
- [10, 14, 1],
1055
- 1,
1056
- 1,
1057
- s,
1058
- [6, 4, 1],
1059
- 4,
1060
- c,
1061
- [25, 13],
1062
- c,
1063
- [24, 4],
1064
- c,
1065
- [17, 119],
1066
- s,
1067
- [5, 5, 1],
1068
- 1,
1069
- c,
1070
- [6, 11],
1071
- c,
1072
- [5, 5]
1073
- ]),
1074
- type: u([
1075
- s,
1076
- [2, 13],
1077
- s,
1078
- [0, 5],
1079
- 1,
1080
- s,
1081
- [2, 19],
1082
- s,
1083
- [0, 4],
1084
- c,
1085
- [17, 132],
1086
- s,
1087
- [2, 9]
1088
- ]),
1089
- state: u([
1090
- 1,
1091
- 2,
1092
- 9,
1093
- 7,
1094
- 8,
1095
- 25,
1096
- c,
1097
- [4, 3],
1098
- 26,
1099
- c,
1100
- [4, 3],
1101
- 27,
1102
- c,
1103
- [4, 3],
1104
- 28,
1105
- c,
1106
- [4, 3],
1107
- 29,
1108
- c,
1109
- [4, 3],
1110
- 30,
1111
- c,
1112
- [4, 3],
1113
- 31,
1114
- c,
1115
- [4, 3],
1116
- 32,
1117
- c,
1118
- [4, 3]
1119
- ]),
1120
- mode: u([
1121
- s,
1122
- [1, 128],
1123
- s,
1124
- [2, 4],
1125
- c,
1126
- [6, 8],
1127
- s,
1128
- [1, 5]
1129
- ]),
1130
- goto: u([
1131
- 3,
1132
- 6,
1133
- 5,
1134
- 4,
1135
- 18,
1136
- s,
1137
- [10, 8, 1],
1138
- s,
1139
- [19, 6, 1],
1140
- c,
1141
- [19, 13],
1142
- c,
1143
- [13, 91],
1144
- 33,
1145
- c,
1146
- [110, 4],
1147
- s,
1148
- [3, 4],
1149
- 22,
1150
- 23,
1151
- s,
1152
- [4, 4],
1153
- 22,
1154
- 23,
1155
- 34,
1156
- c,
1157
- [17, 4]
1158
- ])
1159
- }),
1160
- defaultActions: bda({
1161
- idx: u([
1162
- s,
1163
- [7, 13, 1],
1164
- 25,
1165
- 26,
1166
- 30,
1167
- 31,
1168
- 33,
1169
- 34
1170
- ]),
1171
- goto: u([
1172
- 10,
1173
- 11,
1174
- 12,
1175
- s,
1176
- [14, 8, 1],
1177
- 13,
1178
- 1,
1179
- 7,
1180
- 8,
1181
- 5,
1182
- 6,
1183
- 9,
1184
- 2
1185
- ])
1186
- }),
1187
- parseError: function parseError(str, hash, ExceptionClass) {
1188
- if (hash.recoverable) {
1189
- if (typeof this.trace === 'function') {
1190
- this.trace(str);
1191
- }
1192
- hash.destroy(); // destroy... well, *almost*!
1193
- } else {
1194
- if (typeof this.trace === 'function') {
1195
- this.trace(str);
1196
- }
1197
- if (!ExceptionClass) {
1198
- ExceptionClass = this.JisonParserError;
1199
- }
1200
- throw new ExceptionClass(str, hash);
1201
- }
1202
- },
1203
- parse: function parse(input) {
1204
- var self = this;
1205
- var stack = new Array(128); // token stack: stores token which leads to state at the same index (column storage)
1206
- var sstack = new Array(128); // state stack: stores states (column storage)
1207
-
1208
- var vstack = new Array(128); // semantic value stack
1209
- var lstack = new Array(128); // location stack
1210
- var table = this.table;
1211
- var sp = 0; // 'stack pointer': index into the stacks
1212
- var yyloc;
1213
-
1214
-
1215
-
1216
-
1217
- var symbol = 0;
1218
-
1219
-
1220
-
1221
- var TERROR = this.TERROR;
1222
- var EOF = this.EOF;
1223
- var ERROR_RECOVERY_TOKEN_DISCARD_COUNT = (this.options.errorRecoveryTokenDiscardCount | 0) || 3;
1224
- var NO_ACTION = [0, 35 /* === table.length :: ensures that anyone using this new state will fail dramatically! */];
1225
-
1226
- var lexer;
1227
- if (this.__lexer__) {
1228
- lexer = this.__lexer__;
1229
- } else {
1230
- lexer = this.__lexer__ = Object.create(this.lexer);
1231
- }
1232
-
1233
- var sharedState_yy = {
1234
- parseError: undefined,
1235
- quoteName: undefined,
1236
- lexer: undefined,
1237
- parser: undefined,
1238
- pre_parse: undefined,
1239
- post_parse: undefined,
1240
- pre_lex: undefined,
1241
- post_lex: undefined // WARNING: must be written this way for the code expanders to work correctly in both ES5 and ES6 modes!
1242
- };
1243
-
1244
- var ASSERT;
1245
- if (typeof assert !== 'function') {
1246
- ASSERT = function JisonAssert(cond, msg) {
1247
- if (!cond) {
1248
- throw new Error('assertion failed: ' + (msg || '***'));
1249
- }
1250
- };
1251
- } else {
1252
- ASSERT = assert;
1253
- }
1254
-
1255
- this.yyGetSharedState = function yyGetSharedState() {
1256
- return sharedState_yy;
1257
- };
1258
-
1259
-
1260
- // shallow clone objects, straight copy of simple `src` values
1261
- // e.g. `lexer.yytext` MAY be a complex value object,
1262
- // rather than a simple string/value.
1263
- function shallow_copy(src) {
1264
- if (typeof src === 'object') {
1265
- var dst = {};
1266
- for (var k in src) {
1267
- if (Object.prototype.hasOwnProperty.call(src, k)) {
1268
- dst[k] = src[k];
1269
- }
1270
- }
1271
- return dst;
1272
- }
1273
- return src;
1274
- }
1275
- function shallow_copy_noclobber(dst, src) {
1276
- for (var k in src) {
1277
- if (typeof dst[k] === 'undefined' && Object.prototype.hasOwnProperty.call(src, k)) {
1278
- dst[k] = src[k];
1279
- }
1280
- }
1281
- }
1282
- function copy_yylloc(loc) {
1283
- var rv = shallow_copy(loc);
1284
- if (rv && rv.range) {
1285
- rv.range = rv.range.slice(0);
1286
- }
1287
- return rv;
1288
- }
1289
-
1290
- // copy state
1291
- shallow_copy_noclobber(sharedState_yy, this.yy);
1292
-
1293
- sharedState_yy.lexer = lexer;
1294
- sharedState_yy.parser = this;
1295
-
1296
-
1297
-
1298
-
1299
-
1300
-
1301
- // Does the shared state override the default `parseError` that already comes with this instance?
1302
- if (typeof sharedState_yy.parseError === 'function') {
1303
- this.parseError = function parseErrorAlt(str, hash, ExceptionClass) {
1304
- if (!ExceptionClass) {
1305
- ExceptionClass = this.JisonParserError;
1306
- }
1307
- return sharedState_yy.parseError.call(this, str, hash, ExceptionClass);
1308
- };
1309
- } else {
1310
- this.parseError = this.originalParseError;
1311
- }
1312
-
1313
- // Does the shared state override the default `quoteName` that already comes with this instance?
1314
- if (typeof sharedState_yy.quoteName === 'function') {
1315
- this.quoteName = function quoteNameAlt(id_str) {
1316
- return sharedState_yy.quoteName.call(this, id_str);
1317
- };
1318
- } else {
1319
- this.quoteName = this.originalQuoteName;
1320
- }
1321
-
1322
- // set up the cleanup function; make it an API so that external code can re-use this one in case of
1323
- // calamities or when the `%options no-try-catch` option has been specified for the grammar, in which
1324
- // case this parse() API method doesn't come with a `finally { ... }` block any more!
1325
- //
1326
- // NOTE: as this API uses parse() as a closure, it MUST be set again on every parse() invocation,
1327
- // or else your `sharedState`, etc. references will be *wrong*!
1328
- this.cleanupAfterParse = function parser_cleanupAfterParse(resultValue, invoke_post_methods, do_not_nuke_errorinfos) {
1329
- var rv;
1330
-
1331
- if (invoke_post_methods) {
1332
- var hash;
1333
-
1334
- if (sharedState_yy.post_parse || this.post_parse) {
1335
- // create an error hash info instance: we re-use this API in a **non-error situation**
1336
- // as this one delivers all parser internals ready for access by userland code.
1337
- hash = this.constructParseErrorInfo(null /* no error! */, null /* no exception! */, null, false);
1338
- }
1339
-
1340
- if (sharedState_yy.post_parse) {
1341
- rv = sharedState_yy.post_parse.call(this, sharedState_yy, resultValue, hash);
1342
- if (typeof rv !== 'undefined') resultValue = rv;
1343
- }
1344
- if (this.post_parse) {
1345
- rv = this.post_parse.call(this, sharedState_yy, resultValue, hash);
1346
- if (typeof rv !== 'undefined') resultValue = rv;
1347
- }
1348
-
1349
- // cleanup:
1350
- if (hash && hash.destroy) {
1351
- hash.destroy();
1352
- }
1353
- }
1354
-
1355
- if (this.__reentrant_call_depth > 1) return resultValue; // do not (yet) kill the sharedState when this is a reentrant run.
1356
-
1357
- // clean up the lingering lexer structures as well:
1358
- if (lexer.cleanupAfterLex) {
1359
- lexer.cleanupAfterLex(do_not_nuke_errorinfos);
1360
- }
1361
-
1362
- // prevent lingering circular references from causing memory leaks:
1363
- if (sharedState_yy) {
1364
- sharedState_yy.lexer = undefined;
1365
- sharedState_yy.parser = undefined;
1366
- if (lexer.yy === sharedState_yy) {
1367
- lexer.yy = undefined;
1368
- }
1369
- }
1370
- sharedState_yy = undefined;
1371
- this.parseError = this.originalParseError;
1372
- this.quoteName = this.originalQuoteName;
1373
-
1374
- // nuke the vstack[] array at least as that one will still reference obsoleted user values.
1375
- // To be safe, we nuke the other internal stack columns as well...
1376
- stack.length = 0; // fastest way to nuke an array without overly bothering the GC
1377
- sstack.length = 0;
1378
- lstack.length = 0;
1379
- vstack.length = 0;
1380
- sp = 0;
1381
-
1382
- // nuke the error hash info instances created during this run.
1383
- // Userland code must COPY any data/references
1384
- // in the error hash instance(s) it is more permanently interested in.
1385
- if (!do_not_nuke_errorinfos) {
1386
- for (var i = this.__error_infos.length - 1; i >= 0; i--) {
1387
- var el = this.__error_infos[i];
1388
- if (el && typeof el.destroy === 'function') {
1389
- el.destroy();
1390
- }
1391
- }
1392
- this.__error_infos.length = 0;
1393
-
1394
-
1395
- }
1396
-
1397
- return resultValue;
1398
- };
1399
-
1400
- // merge yylloc info into a new yylloc instance.
1401
- //
1402
- // `first_index` and `last_index` MAY be UNDEFINED/NULL or these are indexes into the `lstack[]` location stack array.
1403
- //
1404
- // `first_yylloc` and `last_yylloc` MAY be UNDEFINED/NULL or explicit (custom or regular) `yylloc` instances, in which
1405
- // case these override the corresponding first/last indexes.
1406
- //
1407
- // `dont_look_back` is an optional flag (default: FALSE), which instructs this merge operation NOT to search
1408
- // through the parse location stack for a location, which would otherwise be used to construct the new (epsilon!)
1409
- // yylloc info.
1410
- //
1411
- // Note: epsilon rule's yylloc situation is detected by passing both `first_index` and `first_yylloc` as UNDEFINED/NULL.
1412
- this.yyMergeLocationInfo = function parser_yyMergeLocationInfo(first_index, last_index, first_yylloc, last_yylloc, dont_look_back) {
1413
- var i1 = first_index | 0,
1414
- i2 = last_index | 0;
1415
- var l1 = first_yylloc,
1416
- l2 = last_yylloc;
1417
- var rv;
1418
-
1419
- // rules:
1420
- // - first/last yylloc entries override first/last indexes
1421
-
1422
- if (!l1) {
1423
- if (first_index != null) {
1424
- for (var i = i1; i <= i2; i++) {
1425
- l1 = lstack[i];
1426
- if (l1) {
1427
- break;
1428
- }
1429
- }
1430
- }
1431
- }
1432
-
1433
- if (!l2) {
1434
- if (last_index != null) {
1435
- for (var i = i2; i >= i1; i--) {
1436
- l2 = lstack[i];
1437
- if (l2) {
1438
- break;
1439
- }
1440
- }
1441
- }
1442
- }
1443
-
1444
- // - detect if an epsilon rule is being processed and act accordingly:
1445
- if (!l1 && first_index == null) {
1446
- // epsilon rule span merger. With optional look-ahead in l2.
1447
- if (!dont_look_back) {
1448
- for (var i = (i1 || sp) - 1; i >= 0; i--) {
1449
- l1 = lstack[i];
1450
- if (l1) {
1451
- break;
1452
- }
1453
- }
1454
- }
1455
- if (!l1) {
1456
- if (!l2) {
1457
- // when we still don't have any valid yylloc info, we're looking at an epsilon rule
1458
- // without look-ahead and no preceding terms and/or `dont_look_back` set:
1459
- // in that case we ca do nothing but return NULL/UNDEFINED:
1460
- return undefined;
1461
- } else {
1462
- // shallow-copy L2: after all, we MAY be looking
1463
- // at unconventional yylloc info objects...
1464
- rv = shallow_copy(l2);
1465
- if (rv.range) {
1466
- // shallow copy the yylloc ranges info to prevent us from modifying the original arguments' entries:
1467
- rv.range = rv.range.slice(0);
1468
- }
1469
- return rv;
1470
- }
1471
- } else {
1472
- // shallow-copy L1, then adjust first col/row 1 column past the end.
1473
- rv = shallow_copy(l1);
1474
- rv.first_line = rv.last_line;
1475
- rv.first_column = rv.last_column;
1476
- if (rv.range) {
1477
- // shallow copy the yylloc ranges info to prevent us from modifying the original arguments' entries:
1478
- rv.range = rv.range.slice(0);
1479
- rv.range[0] = rv.range[1];
1480
- }
1481
-
1482
- if (l2) {
1483
- // shallow-mixin L2, then adjust last col/row accordingly.
1484
- shallow_copy_noclobber(rv, l2);
1485
- rv.last_line = l2.last_line;
1486
- rv.last_column = l2.last_column;
1487
- if (rv.range && l2.range) {
1488
- rv.range[1] = l2.range[1];
1489
- }
1490
- }
1491
- return rv;
1492
- }
1493
- }
1494
-
1495
- if (!l1) {
1496
- l1 = l2;
1497
- l2 = null;
1498
- }
1499
- if (!l1) {
1500
- return undefined;
1501
- }
1502
-
1503
- // shallow-copy L1|L2, before we try to adjust the yylloc values: after all, we MAY be looking
1504
- // at unconventional yylloc info objects...
1505
- rv = shallow_copy(l1);
1506
-
1507
- // first_line: ...,
1508
- // first_column: ...,
1509
- // last_line: ...,
1510
- // last_column: ...,
1511
- if (rv.range) {
1512
- // shallow copy the yylloc ranges info to prevent us from modifying the original arguments' entries:
1513
- rv.range = rv.range.slice(0);
1514
- }
1515
-
1516
- if (l2) {
1517
- shallow_copy_noclobber(rv, l2);
1518
- rv.last_line = l2.last_line;
1519
- rv.last_column = l2.last_column;
1520
- if (rv.range && l2.range) {
1521
- rv.range[1] = l2.range[1];
1522
- }
1523
- }
1524
-
1525
- return rv;
1526
- };
1527
-
1528
- // NOTE: as this API uses parse() as a closure, it MUST be set again on every parse() invocation,
1529
- // or else your `lexer`, `sharedState`, etc. references will be *wrong*!
1530
- this.constructParseErrorInfo = function parser_constructParseErrorInfo(msg, ex, expected, recoverable) {
1531
- var pei = {
1532
- errStr: msg,
1533
- exception: ex,
1534
- text: lexer.match,
1535
- value: lexer.yytext,
1536
- token: this.describeSymbol(symbol) || symbol,
1537
- token_id: symbol,
1538
- line: lexer.yylineno,
1539
- loc: copy_yylloc(lexer.yylloc),
1540
- expected: expected,
1541
- recoverable: recoverable,
1542
- state: state,
1543
- action: action,
1544
- new_state: newState,
1545
- symbol_stack: stack,
1546
- state_stack: sstack,
1547
- value_stack: vstack,
1548
- location_stack: lstack,
1549
- stack_pointer: sp,
1550
- yy: sharedState_yy,
1551
- lexer: lexer,
1552
- parser: this,
1553
-
1554
- // and make sure the error info doesn't stay due to potential
1555
- // ref cycle via userland code manipulations.
1556
- // These would otherwise all be memory leak opportunities!
1557
- //
1558
- // Note that only array and object references are nuked as those
1559
- // constitute the set of elements which can produce a cyclic ref.
1560
- // The rest of the members is kept intact as they are harmless.
1561
- destroy: function destructParseErrorInfo() {
1562
- // remove cyclic references added to error info:
1563
- // info.yy = null;
1564
- // info.lexer = null;
1565
- // info.value = null;
1566
- // info.value_stack = null;
1567
- // ...
1568
- var rec = !!this.recoverable;
1569
- for (var key in this) {
1570
- if (this.hasOwnProperty(key) && typeof key === 'object') {
1571
- this[key] = undefined;
1572
- }
1573
- }
1574
- this.recoverable = rec;
1575
- }
1576
- };
1577
- // track this instance so we can `destroy()` it once we deem it superfluous and ready for garbage collection!
1578
- this.__error_infos.push(pei);
1579
- return pei;
1580
- };
1581
-
1582
-
1583
-
1584
-
1585
-
1586
-
1587
-
1588
-
1589
-
1590
-
1591
-
1592
-
1593
-
1594
- function getNonTerminalFromCode(symbol) {
1595
- var tokenName = self.getSymbolName(symbol);
1596
- if (!tokenName) {
1597
- tokenName = symbol;
1598
- }
1599
- return tokenName;
1600
- }
1601
-
1602
-
1603
- function stdLex() {
1604
- var token = lexer.lex();
1605
- // if token isn't its numeric value, convert
1606
- if (typeof token !== 'number') {
1607
- token = self.symbols_[token] || token;
1608
- }
1609
-
1610
- return token || EOF;
1611
- }
1612
-
1613
- function fastLex() {
1614
- var token = lexer.fastLex();
1615
- // if token isn't its numeric value, convert
1616
- if (typeof token !== 'number') {
1617
- token = self.symbols_[token] || token;
1618
- }
1619
-
1620
- return token || EOF;
1621
- }
1622
-
1623
- var lex = stdLex;
1624
-
1625
-
1626
- var state, action, r, t;
1627
- var yyval = {
1628
- $: true,
1629
- _$: undefined,
1630
- yy: sharedState_yy
1631
- };
1632
- var p;
1633
- var yyrulelen;
1634
- var this_production;
1635
- var newState;
1636
- var retval = false;
1637
-
1638
-
1639
- try {
1640
- this.__reentrant_call_depth++;
1641
-
1642
- lexer.setInput(input, sharedState_yy);
1643
-
1644
- // NOTE: we *assume* no lexer pre/post handlers are set up *after*
1645
- // this initial `setInput()` call: hence we can now check and decide
1646
- // whether we'll go with the standard, slower, lex() API or the
1647
- // `fast_lex()` one:
1648
- if (typeof lexer.canIUse === 'function') {
1649
- var lexerInfo = lexer.canIUse();
1650
- if (lexerInfo.fastLex && typeof fastLex === 'function') {
1651
- lex = fastLex;
1652
- }
1653
- }
1654
-
1655
- yyloc = lexer.yylloc;
1656
- lstack[sp] = yyloc;
1657
- vstack[sp] = null;
1658
- sstack[sp] = 0;
1659
- stack[sp] = 0;
1660
- ++sp;
1661
-
1662
-
1663
-
1664
-
1665
-
1666
- if (this.pre_parse) {
1667
- this.pre_parse.call(this, sharedState_yy);
1668
- }
1669
- if (sharedState_yy.pre_parse) {
1670
- sharedState_yy.pre_parse.call(this, sharedState_yy);
1671
- }
1672
-
1673
- newState = sstack[sp - 1];
1674
- for (;;) {
1675
- // retrieve state number from top of stack
1676
- state = newState; // sstack[sp - 1];
1677
-
1678
- // use default actions if available
1679
- if (this.defaultActions[state]) {
1680
- action = 2;
1681
- newState = this.defaultActions[state];
1682
- } else {
1683
- // The single `==` condition below covers both these `===` comparisons in a single
1684
- // operation:
1685
- //
1686
- // if (symbol === null || typeof symbol === 'undefined') ...
1687
- if (!symbol) {
1688
- symbol = lex();
1689
- }
1690
- // read action for current state and first input
1691
- t = (table[state] && table[state][symbol]) || NO_ACTION;
1692
- newState = t[1];
1693
- action = t[0];
1694
-
1695
-
1696
-
1697
-
1698
-
1699
-
1700
-
1701
-
1702
-
1703
-
1704
-
1705
- // handle parse error
1706
- if (!action) {
1707
- var errStr;
1708
- var errSymbolDescr = (this.describeSymbol(symbol) || symbol);
1709
- var expected = this.collect_expected_token_set(state);
1710
-
1711
- // Report error
1712
- if (typeof lexer.yylineno === 'number') {
1713
- errStr = 'Parse error on line ' + (lexer.yylineno + 1) + ': ';
1714
- } else {
1715
- errStr = 'Parse error: ';
1716
- }
1717
- if (typeof lexer.showPosition === 'function') {
1718
- errStr += '\n' + lexer.showPosition(79 - 10, 10) + '\n';
1719
- }
1720
- if (expected.length) {
1721
- errStr += 'Expecting ' + expected.join(', ') + ', got unexpected ' + errSymbolDescr;
1722
- } else {
1723
- errStr += 'Unexpected ' + errSymbolDescr;
1724
- }
1725
- // we cannot recover from the error!
1726
- p = this.constructParseErrorInfo(errStr, null, expected, false);
1727
- r = this.parseError(p.errStr, p, this.JisonParserError);
1728
- if (typeof r !== 'undefined') {
1729
- retval = r;
1730
- }
1731
- break;
1732
- }
1733
-
1734
-
1735
- }
1736
-
1737
-
1738
-
1739
-
1740
-
1741
-
1742
-
1743
-
1744
-
1745
-
1746
- switch (action) {
1747
- // catch misc. parse failures:
1748
- default:
1749
- // this shouldn't happen, unless resolve defaults are off
1750
- if (action instanceof Array) {
1751
- p = this.constructParseErrorInfo('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol, null, null, false);
1752
- r = this.parseError(p.errStr, p, this.JisonParserError);
1753
- if (typeof r !== 'undefined') {
1754
- retval = r;
1755
- }
1756
- break;
1757
- }
1758
- // Another case of better safe than sorry: in case state transitions come out of another error recovery process
1759
- // or a buggy LUT (LookUp Table):
1760
- p = this.constructParseErrorInfo('Parsing halted. No viable error recovery approach available due to internal system failure.', null, null, false);
1761
- r = this.parseError(p.errStr, p, this.JisonParserError);
1762
- if (typeof r !== 'undefined') {
1763
- retval = r;
1764
- }
1765
- break;
1766
-
1767
- // shift:
1768
- case 1:
1769
- stack[sp] = symbol;
1770
- vstack[sp] = lexer.yytext;
1771
- lstack[sp] = copy_yylloc(lexer.yylloc);
1772
- sstack[sp] = newState; // push state
1773
-
1774
- ++sp;
1775
- symbol = 0;
1776
-
1777
-
1778
-
1779
-
1780
- // Pick up the lexer details for the current symbol as that one is not 'look-ahead' any more:
1781
-
1782
-
1783
-
1784
- yyloc = lexer.yylloc;
1785
- continue;
1786
-
1787
- // reduce:
1788
- case 2:
1789
-
1790
-
1791
-
1792
- this_production = this.productions_[newState - 1]; // `this.productions_[]` is zero-based indexed while states start from 1 upwards...
1793
- yyrulelen = this_production[1];
1794
-
1795
-
1796
-
1797
-
1798
-
1799
-
1800
-
1801
-
1802
-
1803
-
1804
- r = this.performAction.call(yyval, yyloc, newState, sp - 1, vstack, lstack);
1805
-
1806
- if (typeof r !== 'undefined') {
1807
- retval = r;
1808
- break;
1809
- }
1810
-
1811
- // pop off stack
1812
- sp -= yyrulelen;
1813
-
1814
- // don't overwrite the `symbol` variable: use a local var to speed things up:
1815
- var ntsymbol = this_production[0]; // push nonterminal (reduce)
1816
- stack[sp] = ntsymbol;
1817
- vstack[sp] = yyval.$;
1818
- lstack[sp] = yyval._$;
1819
- // goto new state = table[STATE][NONTERMINAL]
1820
- newState = table[sstack[sp - 1]][ntsymbol];
1821
- sstack[sp] = newState;
1822
- ++sp;
1823
-
1824
-
1825
-
1826
-
1827
-
1828
-
1829
-
1830
-
1831
-
1832
- continue;
1833
-
1834
- // accept:
1835
- case 3:
1836
- if (sp !== -2) {
1837
- retval = true;
1838
- // Return the `$accept` rule's `$$` result, if available.
1839
- //
1840
- // Also note that JISON always adds this top-most `$accept` rule (with implicit,
1841
- // default, action):
1842
- //
1843
- // $accept: <startSymbol> $end
1844
- // %{ $$ = $1; @$ = @1; %}
1845
- //
1846
- // which, combined with the parse kernel's `$accept` state behaviour coded below,
1847
- // will produce the `$$` value output of the <startSymbol> rule as the parse result,
1848
- // IFF that result is *not* `undefined`. (See also the parser kernel code.)
1849
- //
1850
- // In code:
1851
- //
1852
- // %{
1853
- // @$ = @1; // if location tracking support is included
1854
- // if (typeof $1 !== 'undefined')
1855
- // return $1;
1856
- // else
1857
- // return true; // the default parse result if the rule actions don't produce anything
1858
- // %}
1859
- sp--;
1860
- if (typeof vstack[sp] !== 'undefined') {
1861
- retval = vstack[sp];
1862
- }
1863
- }
1864
- break;
1865
- }
1866
-
1867
- // break out of loop: we accept or fail with error
1868
- break;
1869
- }
1870
- } catch (ex) {
1871
- // report exceptions through the parseError callback too, but keep the exception intact
1872
- // if it is a known parser or lexer error which has been thrown by parseError() already:
1873
- if (ex instanceof this.JisonParserError) {
1874
- throw ex;
1875
- }
1876
- else if (lexer && typeof lexer.JisonLexerError === 'function' && ex instanceof lexer.JisonLexerError) {
1877
- throw ex;
1878
- }
1879
-
1880
- p = this.constructParseErrorInfo('Parsing aborted due to exception.', ex, null, false);
1881
- retval = false;
1882
- r = this.parseError(p.errStr, p, this.JisonParserError);
1883
- if (typeof r !== 'undefined') {
1884
- retval = r;
1885
- }
1886
- } finally {
1887
- retval = this.cleanupAfterParse(retval, true, true);
1888
- this.__reentrant_call_depth--;
1889
- } // /finally
1890
-
1891
- return retval;
1892
- }
1893
- };
1894
- parser.originalParseError = parser.parseError;
1895
- parser.originalQuoteName = parser.quoteName;
1896
- /* lexer generated by jison-lex 0.6.1-215 */
1897
-
1898
- /*
1899
- * Returns a Lexer object of the following structure:
1900
- *
1901
- * Lexer: {
1902
- * yy: {} The so-called "shared state" or rather the *source* of it;
1903
- * the real "shared state" `yy` passed around to
1904
- * the rule actions, etc. is a direct reference!
1905
- *
1906
- * This "shared context" object was passed to the lexer by way of
1907
- * the `lexer.setInput(str, yy)` API before you may use it.
1908
- *
1909
- * This "shared context" object is passed to the lexer action code in `performAction()`
1910
- * so userland code in the lexer actions may communicate with the outside world
1911
- * and/or other lexer rules' actions in more or less complex ways.
1912
- *
1913
- * }
1914
- *
1915
- * Lexer.prototype: {
1916
- * EOF: 1,
1917
- * ERROR: 2,
1918
- *
1919
- * yy: The overall "shared context" object reference.
1920
- *
1921
- * JisonLexerError: function(msg, hash),
1922
- *
1923
- * performAction: function lexer__performAction(yy, yyrulenumber, YY_START),
1924
- *
1925
- * The function parameters and `this` have the following value/meaning:
1926
- * - `this` : reference to the `lexer` instance.
1927
- * `yy_` is an alias for `this` lexer instance reference used internally.
1928
- *
1929
- * - `yy` : a reference to the `yy` "shared state" object which was passed to the lexer
1930
- * by way of the `lexer.setInput(str, yy)` API before.
1931
- *
1932
- * Note:
1933
- * The extra arguments you specified in the `%parse-param` statement in your
1934
- * **parser** grammar definition file are passed to the lexer via this object
1935
- * reference as member variables.
1936
- *
1937
- * - `yyrulenumber` : index of the matched lexer rule (regex), used internally.
1938
- *
1939
- * - `YY_START`: the current lexer "start condition" state.
1940
- *
1941
- * parseError: function(str, hash, ExceptionClass),
1942
- *
1943
- * constructLexErrorInfo: function(error_message, is_recoverable),
1944
- * Helper function.
1945
- * Produces a new errorInfo 'hash object' which can be passed into `parseError()`.
1946
- * See it's use in this lexer kernel in many places; example usage:
1947
- *
1948
- * var infoObj = lexer.constructParseErrorInfo('fail!', true);
1949
- * var retVal = lexer.parseError(infoObj.errStr, infoObj, lexer.JisonLexerError);
1950
- *
1951
- * options: { ... lexer %options ... },
1952
- *
1953
- * lex: function(),
1954
- * Produce one token of lexed input, which was passed in earlier via the `lexer.setInput()` API.
1955
- * You MAY use the additional `args...` parameters as per `%parse-param` spec of the **lexer** grammar:
1956
- * these extra `args...` are added verbatim to the `yy` object reference as member variables.
1957
- *
1958
- * WARNING:
1959
- * Lexer's additional `args...` parameters (via lexer's `%parse-param`) MAY conflict with
1960
- * any attributes already added to `yy` by the **parser** or the jison run-time;
1961
- * when such a collision is detected an exception is thrown to prevent the generated run-time
1962
- * from silently accepting this confusing and potentially hazardous situation!
1963
- *
1964
- * cleanupAfterLex: function(do_not_nuke_errorinfos),
1965
- * Helper function.
1966
- *
1967
- * This helper API is invoked when the **parse process** has completed: it is the responsibility
1968
- * of the **parser** (or the calling userland code) to invoke this method once cleanup is desired.
1969
- *
1970
- * This helper may be invoked by user code to ensure the internal lexer gets properly garbage collected.
1971
- *
1972
- * setInput: function(input, [yy]),
1973
- *
1974
- *
1975
- * input: function(),
1976
- *
1977
- *
1978
- * unput: function(str),
1979
- *
1980
- *
1981
- * more: function(),
1982
- *
1983
- *
1984
- * reject: function(),
1985
- *
1986
- *
1987
- * less: function(n),
1988
- *
1989
- *
1990
- * pastInput: function(n),
1991
- *
1992
- *
1993
- * upcomingInput: function(n),
1994
- *
1995
- *
1996
- * showPosition: function(),
1997
- *
1998
- *
1999
- * test_match: function(regex_match_array, rule_index),
2000
- *
2001
- *
2002
- * next: function(),
2003
- *
2004
- *
2005
- * begin: function(condition),
2006
- *
2007
- *
2008
- * pushState: function(condition),
2009
- *
2010
- *
2011
- * popState: function(),
2012
- *
2013
- *
2014
- * topState: function(),
2015
- *
2016
- *
2017
- * _currentRules: function(),
2018
- *
2019
- *
2020
- * stateStackSize: function(),
2021
- *
2022
- *
2023
- * performAction: function(yy, yy_, yyrulenumber, YY_START),
2024
- *
2025
- *
2026
- * rules: [...],
2027
- *
2028
- *
2029
- * conditions: {associative list: name ==> set},
2030
- * }
2031
- *
2032
- *
2033
- * token location info (`yylloc`): {
2034
- * first_line: n,
2035
- * last_line: n,
2036
- * first_column: n,
2037
- * last_column: n,
2038
- * range: [start_number, end_number]
2039
- * (where the numbers are indexes into the input string, zero-based)
2040
- * }
2041
- *
2042
- * ---
2043
- *
2044
- * The `parseError` function receives a 'hash' object with these members for lexer errors:
2045
- *
2046
- * {
2047
- * text: (matched text)
2048
- * token: (the produced terminal token, if any)
2049
- * token_id: (the produced terminal token numeric ID, if any)
2050
- * line: (yylineno)
2051
- * loc: (yylloc)
2052
- * recoverable: (boolean: TRUE when the parser MAY have an error recovery rule
2053
- * available for this particular error)
2054
- * yy: (object: the current parser internal "shared state" `yy`
2055
- * as is also available in the rule actions; this can be used,
2056
- * for instance, for advanced error analysis and reporting)
2057
- * lexer: (reference to the current lexer instance used by the parser)
2058
- * }
2059
- *
2060
- * while `this` will reference the current lexer instance.
2061
- *
2062
- * When `parseError` is invoked by the lexer, the default implementation will
2063
- * attempt to invoke `yy.parser.parseError()`; when this callback is not provided
2064
- * it will try to invoke `yy.parseError()` instead. When that callback is also not
2065
- * provided, a `JisonLexerError` exception will be thrown containing the error
2066
- * message and `hash`, as constructed by the `constructLexErrorInfo()` API.
2067
- *
2068
- * Note that the lexer's `JisonLexerError` error class is passed via the
2069
- * `ExceptionClass` argument, which is invoked to construct the exception
2070
- * instance to be thrown, so technically `parseError` will throw the object
2071
- * produced by the `new ExceptionClass(str, hash)` JavaScript expression.
2072
- *
2073
- * ---
2074
- *
2075
- * You can specify lexer options by setting / modifying the `.options` object of your Lexer instance.
2076
- * These options are available:
2077
- *
2078
- * (Options are permanent.)
2079
- *
2080
- * yy: {
2081
- * parseError: function(str, hash, ExceptionClass)
2082
- * optional: overrides the default `parseError` function.
2083
- * }
2084
- *
2085
- * lexer.options: {
2086
- * pre_lex: function()
2087
- * optional: is invoked before the lexer is invoked to produce another token.
2088
- * `this` refers to the Lexer object.
2089
- * post_lex: function(token) { return token; }
2090
- * optional: is invoked when the lexer has produced a token `token`;
2091
- * this function can override the returned token value by returning another.
2092
- * When it does not return any (truthy) value, the lexer will return
2093
- * the original `token`.
2094
- * `this` refers to the Lexer object.
2095
- *
2096
- * WARNING: the next set of options are not meant to be changed. They echo the abilities of
2097
- * the lexer as per when it was compiled!
2098
- *
2099
- * ranges: boolean
2100
- * optional: `true` ==> token location info will include a .range[] member.
2101
- * flex: boolean
2102
- * optional: `true` ==> flex-like lexing behaviour where the rules are tested
2103
- * exhaustively to find the longest match.
2104
- * backtrack_lexer: boolean
2105
- * optional: `true` ==> lexer regexes are tested in order and for invoked;
2106
- * the lexer terminates the scan when a token is returned by the action code.
2107
- * xregexp: boolean
2108
- * optional: `true` ==> lexer rule regexes are "extended regex format" requiring the
2109
- * `XRegExp` library. When this %option has not been specified at compile time, all lexer
2110
- * rule regexes have been written as standard JavaScript RegExp expressions.
2111
- * }
2112
- */
2113
-
2114
-
2115
- var lexer = function() {
2116
- /**
2117
- * See also:
2118
- * http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/#35881508
2119
- * but we keep the prototype.constructor and prototype.name assignment lines too for compatibility
2120
- * with userland code which might access the derived class in a 'classic' way.
2121
- *
2122
- * @public
2123
- * @constructor
2124
- * @nocollapse
2125
- */
2126
- function JisonLexerError(msg, hash) {
2127
- Object.defineProperty(this, 'name', {
2128
- enumerable: false,
2129
- writable: false,
2130
- value: 'JisonLexerError'
2131
- });
2132
-
2133
- if (msg == null)
2134
- msg = '???';
2135
-
2136
- Object.defineProperty(this, 'message', {
2137
- enumerable: false,
2138
- writable: true,
2139
- value: msg
2140
- });
2141
-
2142
- this.hash = hash;
2143
- var stacktrace;
2144
-
2145
- if (hash && hash.exception instanceof Error) {
2146
- var ex2 = hash.exception;
2147
- this.message = ex2.message || msg;
2148
- stacktrace = ex2.stack;
2149
- }
2150
-
2151
- if (!stacktrace) {
2152
- if (Error.hasOwnProperty('captureStackTrace')) {
2153
- // V8
2154
- Error.captureStackTrace(this, this.constructor);
2155
- } else {
2156
- stacktrace = new Error(msg).stack;
2157
- }
2158
- }
2159
-
2160
- if (stacktrace) {
2161
- Object.defineProperty(this, 'stack', {
2162
- enumerable: false,
2163
- writable: false,
2164
- value: stacktrace
2165
- });
2166
- }
2167
- }
2168
-
2169
- if (typeof Object.setPrototypeOf === 'function') {
2170
- Object.setPrototypeOf(JisonLexerError.prototype, Error.prototype);
2171
- } else {
2172
- JisonLexerError.prototype = Object.create(Error.prototype);
2173
- }
2174
-
2175
- JisonLexerError.prototype.constructor = JisonLexerError;
2176
- JisonLexerError.prototype.name = 'JisonLexerError';
2177
-
2178
- var lexer = {
2179
-
2180
- // Code Generator Information Report
2181
- // ---------------------------------
2182
- //
2183
- // Options:
2184
- //
2185
- // backtracking: .................... false
2186
- // location.ranges: ................. false
2187
- // location line+column tracking: ... true
2188
- //
2189
- //
2190
- // Forwarded Parser Analysis flags:
2191
- //
2192
- // uses yyleng: ..................... false
2193
- // uses yylineno: ................... false
2194
- // uses yytext: ..................... false
2195
- // uses yylloc: ..................... false
2196
- // uses lexer values: ............... true / true
2197
- // location tracking: ............... true
2198
- // location assignment: ............. true
2199
- //
2200
- //
2201
- // Lexer Analysis flags:
2202
- //
2203
- // uses yyleng: ..................... ???
2204
- // uses yylineno: ................... ???
2205
- // uses yytext: ..................... ???
2206
- // uses yylloc: ..................... ???
2207
- // uses ParseError API: ............. ???
2208
- // uses yyerror: .................... ???
2209
- // uses location tracking & editing: ???
2210
- // uses more() API: ................. ???
2211
- // uses unput() API: ................ ???
2212
- // uses reject() API: ............... ???
2213
- // uses less() API: ................. ???
2214
- // uses display APIs pastInput(), upcomingInput(), showPosition():
2215
- // ............................. ???
2216
- // uses describeYYLLOC() API: ....... ???
2217
- //
2218
- // --------- END OF REPORT -----------
2219
-
2220
- EOF: 1,
2221
- ERROR: 2,
2222
-
2223
- // JisonLexerError: JisonLexerError, /// <-- injected by the code generator
2224
-
2225
- // options: {}, /// <-- injected by the code generator
2226
-
2227
- // yy: ..., /// <-- injected by setInput()
2228
-
2229
- __currentRuleSet__: null, /// INTERNAL USE ONLY: internal rule set cache for the current lexer state
2230
-
2231
- __error_infos: [], /// INTERNAL USE ONLY: the set of lexErrorInfo objects created since the last cleanup
2232
- __decompressed: false, /// INTERNAL USE ONLY: mark whether the lexer instance has been 'unfolded' completely and is now ready for use
2233
- done: false, /// INTERNAL USE ONLY
2234
- _backtrack: false, /// INTERNAL USE ONLY
2235
- _input: '', /// INTERNAL USE ONLY
2236
- _more: false, /// INTERNAL USE ONLY
2237
- _signaled_error_token: false, /// INTERNAL USE ONLY
2238
- conditionStack: [], /// INTERNAL USE ONLY; managed via `pushState()`, `popState()`, `topState()` and `stateStackSize()`
2239
- match: '', /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks input which has been matched so far for the lexer token under construction. `match` is identical to `yytext` except that this one still contains the matched input string after `lexer.performAction()` has been invoked, where userland code MAY have changed/replaced the `yytext` value entirely!
2240
- matched: '', /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks entire input which has been matched so far
2241
- matches: false, /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks RE match result for last (successful) match attempt
2242
- yytext: '', /// ADVANCED USE ONLY: tracks input which has been matched so far for the lexer token under construction; this value is transferred to the parser as the 'token value' when the parser consumes the lexer token produced through a call to the `lex()` API.
2243
- offset: 0, /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks the 'cursor position' in the input string, i.e. the number of characters matched so far
2244
- yyleng: 0, /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: length of matched input for the token under construction (`yytext`)
2245
- yylineno: 0, /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: 'line number' at which the token under construction is located
2246
- yylloc: null, /// READ-ONLY EXTERNAL ACCESS - ADVANCED USE ONLY: tracks location info (lines + columns) for the token under construction
2247
-
2248
- /**
2249
- * INTERNAL USE: construct a suitable error info hash object instance for `parseError`.
2250
- *
2251
- * @public
2252
- * @this {RegExpLexer}
2253
- */
2254
- constructLexErrorInfo: function lexer_constructLexErrorInfo(msg, recoverable, show_input_position) {
2255
- msg = '' + msg;
2256
-
2257
- // heuristic to determine if the error message already contains a (partial) source code dump
2258
- // as produced by either `showPosition()` or `prettyPrintRange()`:
2259
- if (show_input_position == undefined) {
2260
- show_input_position = !(msg.indexOf('\n') > 0 && msg.indexOf('^') > 0);
2261
- }
2262
-
2263
- if (this.yylloc && show_input_position) {
2264
- if (typeof this.prettyPrintRange === 'function') {
2265
- var pretty_src = this.prettyPrintRange(this.yylloc);
2266
-
2267
- if (!/\n\s*$/.test(msg)) {
2268
- msg += '\n';
2269
- }
2270
-
2271
- msg += '\n Erroneous area:\n' + this.prettyPrintRange(this.yylloc);
2272
- } else if (typeof this.showPosition === 'function') {
2273
- var pos_str = this.showPosition();
2274
-
2275
- if (pos_str) {
2276
- if (msg.length && msg[msg.length - 1] !== '\n' && pos_str[0] !== '\n') {
2277
- msg += '\n' + pos_str;
2278
- } else {
2279
- msg += pos_str;
2280
- }
2281
- }
2282
- }
2283
- }
2284
-
2285
- /** @constructor */
2286
- var pei = {
2287
- errStr: msg,
2288
- recoverable: !!recoverable,
2289
- text: this.match, // This one MAY be empty; userland code should use the `upcomingInput` API to obtain more text which follows the 'lexer cursor position'...
2290
- token: null,
2291
- line: this.yylineno,
2292
- loc: this.yylloc,
2293
- yy: this.yy,
2294
- lexer: this,
2295
-
2296
- /**
2297
- * and make sure the error info doesn't stay due to potential
2298
- * ref cycle via userland code manipulations.
2299
- * These would otherwise all be memory leak opportunities!
2300
- *
2301
- * Note that only array and object references are nuked as those
2302
- * constitute the set of elements which can produce a cyclic ref.
2303
- * The rest of the members is kept intact as they are harmless.
2304
- *
2305
- * @public
2306
- * @this {LexErrorInfo}
2307
- */
2308
- destroy: function destructLexErrorInfo() {
2309
- // remove cyclic references added to error info:
2310
- // info.yy = null;
2311
- // info.lexer = null;
2312
- // ...
2313
- var rec = !!this.recoverable;
2314
-
2315
- for (var key in this) {
2316
- if (this.hasOwnProperty(key) && typeof key === 'object') {
2317
- this[key] = undefined;
2318
- }
2319
- }
2320
-
2321
- this.recoverable = rec;
2322
- }
2323
- };
2324
-
2325
- // track this instance so we can `destroy()` it once we deem it superfluous and ready for garbage collection!
2326
- this.__error_infos.push(pei);
2327
-
2328
- return pei;
2329
- },
2330
-
2331
- /**
2332
- * handler which is invoked when a lexer error occurs.
2333
- *
2334
- * @public
2335
- * @this {RegExpLexer}
2336
- */
2337
- parseError: function lexer_parseError(str, hash, ExceptionClass) {
2338
- if (!ExceptionClass) {
2339
- ExceptionClass = this.JisonLexerError;
2340
- }
2341
-
2342
- if (this.yy) {
2343
- if (this.yy.parser && typeof this.yy.parser.parseError === 'function') {
2344
- return this.yy.parser.parseError.call(this, str, hash, ExceptionClass) || this.ERROR;
2345
- } else if (typeof this.yy.parseError === 'function') {
2346
- return this.yy.parseError.call(this, str, hash, ExceptionClass) || this.ERROR;
2347
- }
2348
- }
2349
-
2350
- throw new ExceptionClass(str, hash);
2351
- },
2352
-
2353
- /**
2354
- * method which implements `yyerror(str, ...args)` functionality for use inside lexer actions.
2355
- *
2356
- * @public
2357
- * @this {RegExpLexer}
2358
- */
2359
- yyerror: function yyError(str /*, ...args */) {
2360
- var lineno_msg = '';
2361
-
2362
- if (this.yylloc) {
2363
- lineno_msg = ' on line ' + (this.yylineno + 1);
2364
- }
2365
-
2366
- var p = this.constructLexErrorInfo(
2367
- 'Lexical error' + lineno_msg + ': ' + str,
2368
- this.options.lexerErrorsAreRecoverable
2369
- );
2370
-
2371
- // Add any extra args to the hash under the name `extra_error_attributes`:
2372
- var args = Array.prototype.slice.call(arguments, 1);
2373
-
2374
- if (args.length) {
2375
- p.extra_error_attributes = args;
2376
- }
2377
-
2378
- return this.parseError(p.errStr, p, this.JisonLexerError) || this.ERROR;
2379
- },
2380
-
2381
- /**
2382
- * final cleanup function for when we have completed lexing the input;
2383
- * make it an API so that external code can use this one once userland
2384
- * code has decided it's time to destroy any lingering lexer error
2385
- * hash object instances and the like: this function helps to clean
2386
- * up these constructs, which *may* carry cyclic references which would
2387
- * otherwise prevent the instances from being properly and timely
2388
- * garbage-collected, i.e. this function helps prevent memory leaks!
2389
- *
2390
- * @public
2391
- * @this {RegExpLexer}
2392
- */
2393
- cleanupAfterLex: function lexer_cleanupAfterLex(do_not_nuke_errorinfos) {
2394
- // prevent lingering circular references from causing memory leaks:
2395
- this.setInput('', {});
2396
-
2397
- // nuke the error hash info instances created during this run.
2398
- // Userland code must COPY any data/references
2399
- // in the error hash instance(s) it is more permanently interested in.
2400
- if (!do_not_nuke_errorinfos) {
2401
- for (var i = this.__error_infos.length - 1; i >= 0; i--) {
2402
- var el = this.__error_infos[i];
2403
-
2404
- if (el && typeof el.destroy === 'function') {
2405
- el.destroy();
2406
- }
2407
- }
2408
-
2409
- this.__error_infos.length = 0;
2410
- }
2411
-
2412
- return this;
2413
- },
2414
-
2415
- /**
2416
- * clear the lexer token context; intended for internal use only
2417
- *
2418
- * @public
2419
- * @this {RegExpLexer}
2420
- */
2421
- clear: function lexer_clear() {
2422
- this.yytext = '';
2423
- this.yyleng = 0;
2424
- this.match = '';
2425
-
2426
- // - DO NOT reset `this.matched`
2427
- this.matches = false;
2428
-
2429
- this._more = false;
2430
- this._backtrack = false;
2431
- var col = (this.yylloc ? this.yylloc.last_column : 0);
2432
-
2433
- this.yylloc = {
2434
- first_line: this.yylineno + 1,
2435
- first_column: col,
2436
- last_line: this.yylineno + 1,
2437
- last_column: col,
2438
- range: [this.offset, this.offset]
2439
- };
2440
- },
2441
-
2442
- /**
2443
- * resets the lexer, sets new input
2444
- *
2445
- * @public
2446
- * @this {RegExpLexer}
2447
- */
2448
- setInput: function lexer_setInput(input, yy) {
2449
- this.yy = yy || this.yy || {};
2450
-
2451
- // also check if we've fully initialized the lexer instance,
2452
- // including expansion work to be done to go from a loaded
2453
- // lexer to a usable lexer:
2454
- if (!this.__decompressed) {
2455
- // step 1: decompress the regex list:
2456
- var rules = this.rules;
2457
-
2458
- for (var i = 0, len = rules.length; i < len; i++) {
2459
- var rule_re = rules[i];
2460
-
2461
- // compression: is the RE an xref to another RE slot in the rules[] table?
2462
- if (typeof rule_re === 'number') {
2463
- rules[i] = rules[rule_re];
2464
- }
2465
- }
2466
-
2467
- // step 2: unfold the conditions[] set to make these ready for use:
2468
- var conditions = this.conditions;
2469
-
2470
- for (var k in conditions) {
2471
- var spec = conditions[k];
2472
- var rule_ids = spec.rules;
2473
- var len = rule_ids.length;
2474
- var rule_regexes = new Array(len + 1); // slot 0 is unused; we use a 1-based index approach here to keep the hottest code in `lexer_next()` fast and simple!
2475
- var rule_new_ids = new Array(len + 1);
2476
-
2477
- for (var i = 0; i < len; i++) {
2478
- var idx = rule_ids[i];
2479
- var rule_re = rules[idx];
2480
- rule_regexes[i + 1] = rule_re;
2481
- rule_new_ids[i + 1] = idx;
2482
- }
2483
-
2484
- spec.rules = rule_new_ids;
2485
- spec.__rule_regexes = rule_regexes;
2486
- spec.__rule_count = len;
2487
- }
2488
-
2489
- this.__decompressed = true;
2490
- }
2491
-
2492
- this._input = input || '';
2493
- this.clear();
2494
- this._signaled_error_token = false;
2495
- this.done = false;
2496
- this.yylineno = 0;
2497
- this.matched = '';
2498
- this.conditionStack = ['INITIAL'];
2499
- this.__currentRuleSet__ = null;
2500
-
2501
- this.yylloc = {
2502
- first_line: 1,
2503
- first_column: 0,
2504
- last_line: 1,
2505
- last_column: 0,
2506
- range: [0, 0]
2507
- };
2508
-
2509
- this.offset = 0;
2510
- return this;
2511
- },
2512
-
2513
- /**
2514
- * edit the remaining input via user-specified callback.
2515
- * This can be used to forward-adjust the input-to-parse,
2516
- * e.g. inserting macro expansions and alike in the
2517
- * input which has yet to be lexed.
2518
- * The behaviour of this API contrasts the `unput()` et al
2519
- * APIs as those act on the *consumed* input, while this
2520
- * one allows one to manipulate the future, without impacting
2521
- * the current `yyloc` cursor location or any history.
2522
- *
2523
- * Use this API to help implement C-preprocessor-like
2524
- * `#include` statements, etc.
2525
- *
2526
- * The provided callback must be synchronous and is
2527
- * expected to return the edited input (string).
2528
- *
2529
- * The `cpsArg` argument value is passed to the callback
2530
- * as-is.
2531
- *
2532
- * `callback` interface:
2533
- * `function callback(input, cpsArg)`
2534
- *
2535
- * - `input` will carry the remaining-input-to-lex string
2536
- * from the lexer.
2537
- * - `cpsArg` is `cpsArg` passed into this API.
2538
- *
2539
- * The `this` reference for the callback will be set to
2540
- * reference this lexer instance so that userland code
2541
- * in the callback can easily and quickly access any lexer
2542
- * API.
2543
- *
2544
- * When the callback returns a non-string-type falsey value,
2545
- * we assume the callback did not edit the input and we
2546
- * will using the input as-is.
2547
- *
2548
- * When the callback returns a non-string-type value, it
2549
- * is converted to a string for lexing via the `"" + retval`
2550
- * operation. (See also why: http://2ality.com/2012/03/converting-to-string.html
2551
- * -- that way any returned object's `toValue()` and `toString()`
2552
- * methods will be invoked in a proper/desirable order.)
2553
- *
2554
- * @public
2555
- * @this {RegExpLexer}
2556
- */
2557
- editRemainingInput: function lexer_editRemainingInput(callback, cpsArg) {
2558
- var rv = callback.call(this, this._input, cpsArg);
2559
-
2560
- if (typeof rv !== 'string') {
2561
- if (rv) {
2562
- this._input = '' + rv;
2563
- }
2564
- // else: keep `this._input` as is.
2565
- } else {
2566
- this._input = rv;
2567
- }
2568
-
2569
- return this;
2570
- },
2571
-
2572
- /**
2573
- * consumes and returns one char from the input
2574
- *
2575
- * @public
2576
- * @this {RegExpLexer}
2577
- */
2578
- input: function lexer_input() {
2579
- if (!this._input) {
2580
- //this.done = true; -- don't set `done` as we want the lex()/next() API to be able to produce one custom EOF token match after this anyhow. (lexer can match special <<EOF>> tokens and perform user action code for a <<EOF>> match, but only does so *once*)
2581
- return null;
2582
- }
2583
-
2584
- var ch = this._input[0];
2585
- this.yytext += ch;
2586
- this.yyleng++;
2587
- this.offset++;
2588
- this.match += ch;
2589
- this.matched += ch;
2590
-
2591
- // Count the linenumber up when we hit the LF (or a stand-alone CR).
2592
- // On CRLF, the linenumber is incremented when you fetch the CR or the CRLF combo
2593
- // and we advance immediately past the LF as well, returning both together as if
2594
- // it was all a single 'character' only.
2595
- var slice_len = 1;
2596
-
2597
- var lines = false;
2598
-
2599
- if (ch === '\n') {
2600
- lines = true;
2601
- } else if (ch === '\r') {
2602
- lines = true;
2603
- var ch2 = this._input[1];
2604
-
2605
- if (ch2 === '\n') {
2606
- slice_len++;
2607
- ch += ch2;
2608
- this.yytext += ch2;
2609
- this.yyleng++;
2610
- this.offset++;
2611
- this.match += ch2;
2612
- this.matched += ch2;
2613
- this.yylloc.range[1]++;
2614
- }
2615
- }
2616
-
2617
- if (lines) {
2618
- this.yylineno++;
2619
- this.yylloc.last_line++;
2620
- this.yylloc.last_column = 0;
2621
- } else {
2622
- this.yylloc.last_column++;
2623
- }
2624
-
2625
- this.yylloc.range[1]++;
2626
- this._input = this._input.slice(slice_len);
2627
- return ch;
2628
- },
2629
-
2630
- /**
2631
- * unshifts one char (or an entire string) into the input
2632
- *
2633
- * @public
2634
- * @this {RegExpLexer}
2635
- */
2636
- unput: function lexer_unput(ch) {
2637
- var len = ch.length;
2638
- var lines = ch.split(/(?:\r\n?|\n)/g);
2639
- this._input = ch + this._input;
2640
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
2641
- this.yyleng = this.yytext.length;
2642
- this.offset -= len;
2643
- this.match = this.match.substr(0, this.match.length - len);
2644
- this.matched = this.matched.substr(0, this.matched.length - len);
2645
-
2646
- if (lines.length > 1) {
2647
- this.yylineno -= lines.length - 1;
2648
- this.yylloc.last_line = this.yylineno + 1;
2649
-
2650
- // Get last entirely matched line into the `pre_lines[]` array's
2651
- // last index slot; we don't mind when other previously
2652
- // matched lines end up in the array too.
2653
- var pre = this.match;
2654
-
2655
- var pre_lines = pre.split(/(?:\r\n?|\n)/g);
2656
-
2657
- if (pre_lines.length === 1) {
2658
- pre = this.matched;
2659
- pre_lines = pre.split(/(?:\r\n?|\n)/g);
2660
- }
2661
-
2662
- this.yylloc.last_column = pre_lines[pre_lines.length - 1].length;
2663
- } else {
2664
- this.yylloc.last_column -= len;
2665
- }
2666
-
2667
- this.yylloc.range[1] = this.yylloc.range[0] + this.yyleng;
2668
- this.done = false;
2669
- return this;
2670
- },
2671
-
2672
- /**
2673
- * cache matched text and append it on next action
2674
- *
2675
- * @public
2676
- * @this {RegExpLexer}
2677
- */
2678
- more: function lexer_more() {
2679
- this._more = true;
2680
- return this;
2681
- },
2682
-
2683
- /**
2684
- * signal the lexer that this rule fails to match the input, so the
2685
- * next matching rule (regex) should be tested instead.
2686
- *
2687
- * @public
2688
- * @this {RegExpLexer}
2689
- */
2690
- reject: function lexer_reject() {
2691
- if (this.options.backtrack_lexer) {
2692
- this._backtrack = true;
2693
- } else {
2694
- // when the `parseError()` call returns, we MUST ensure that the error is registered.
2695
- // We accomplish this by signaling an 'error' token to be produced for the current
2696
- // `.lex()` run.
2697
- var lineno_msg = '';
2698
-
2699
- if (this.yylloc) {
2700
- lineno_msg = ' on line ' + (this.yylineno + 1);
2701
- }
2702
-
2703
- var p = this.constructLexErrorInfo(
2704
- 'Lexical error' + lineno_msg + ': You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).',
2705
- false
2706
- );
2707
-
2708
- this._signaled_error_token = this.parseError(p.errStr, p, this.JisonLexerError) || this.ERROR;
2709
- }
2710
-
2711
- return this;
2712
- },
2713
-
2714
- /**
2715
- * retain first n characters of the match
2716
- *
2717
- * @public
2718
- * @this {RegExpLexer}
2719
- */
2720
- less: function lexer_less(n) {
2721
- return this.unput(this.match.slice(n));
2722
- },
2723
-
2724
- /**
2725
- * return (part of the) already matched input, i.e. for error
2726
- * messages.
2727
- *
2728
- * Limit the returned string length to `maxSize` (default: 20).
2729
- *
2730
- * Limit the returned string to the `maxLines` number of lines of
2731
- * input (default: 1).
2732
- *
2733
- * Negative limit values equal *unlimited*.
2734
- *
2735
- * @public
2736
- * @this {RegExpLexer}
2737
- */
2738
- pastInput: function lexer_pastInput(maxSize, maxLines) {
2739
- var past = this.matched.substring(0, this.matched.length - this.match.length);
2740
-
2741
- if (maxSize < 0)
2742
- maxSize = past.length;
2743
- else if (!maxSize)
2744
- maxSize = 20;
2745
-
2746
- if (maxLines < 0)
2747
- maxLines = past.length; // can't ever have more input lines than this!
2748
- else if (!maxLines)
2749
- maxLines = 1;
2750
-
2751
- // `substr` anticipation: treat \r\n as a single character and take a little
2752
- // more than necessary so that we can still properly check against maxSize
2753
- // after we've transformed and limited the newLines in here:
2754
- past = past.substr(-maxSize * 2 - 2);
2755
-
2756
- // now that we have a significantly reduced string to process, transform the newlines
2757
- // and chop them, then limit them:
2758
- var a = past.replace(/\r\n|\r/g, '\n').split('\n');
2759
-
2760
- a = a.slice(-maxLines);
2761
- past = a.join('\n');
2762
-
2763
- // When, after limiting to maxLines, we still have too much to return,
2764
- // do add an ellipsis prefix...
2765
- if (past.length > maxSize) {
2766
- past = '...' + past.substr(-maxSize);
2767
- }
2768
-
2769
- return past;
2770
- },
2771
-
2772
- /**
2773
- * return (part of the) upcoming input, i.e. for error messages.
2774
- *
2775
- * Limit the returned string length to `maxSize` (default: 20).
2776
- *
2777
- * Limit the returned string to the `maxLines` number of lines of input (default: 1).
2778
- *
2779
- * Negative limit values equal *unlimited*.
2780
- *
2781
- * > ### NOTE ###
2782
- * >
2783
- * > *"upcoming input"* is defined as the whole of the both
2784
- * > the *currently lexed* input, together with any remaining input
2785
- * > following that. *"currently lexed"* input is the input
2786
- * > already recognized by the lexer but not yet returned with
2787
- * > the lexer token. This happens when you are invoking this API
2788
- * > from inside any lexer rule action code block.
2789
- * >
2790
- *
2791
- * @public
2792
- * @this {RegExpLexer}
2793
- */
2794
- upcomingInput: function lexer_upcomingInput(maxSize, maxLines) {
2795
- var next = this.match;
2796
-
2797
- if (maxSize < 0)
2798
- maxSize = next.length + this._input.length;
2799
- else if (!maxSize)
2800
- maxSize = 20;
2801
-
2802
- if (maxLines < 0)
2803
- maxLines = maxSize; // can't ever have more input lines than this!
2804
- else if (!maxLines)
2805
- maxLines = 1;
2806
-
2807
- // `substring` anticipation: treat \r\n as a single character and take a little
2808
- // more than necessary so that we can still properly check against maxSize
2809
- // after we've transformed and limited the newLines in here:
2810
- if (next.length < maxSize * 2 + 2) {
2811
- next += this._input.substring(0, maxSize * 2 + 2); // substring is faster on Chrome/V8
2812
- }
2813
-
2814
- // now that we have a significantly reduced string to process, transform the newlines
2815
- // and chop them, then limit them:
2816
- var a = next.replace(/\r\n|\r/g, '\n').split('\n');
2817
-
2818
- a = a.slice(0, maxLines);
2819
- next = a.join('\n');
2820
-
2821
- // When, after limiting to maxLines, we still have too much to return,
2822
- // do add an ellipsis postfix...
2823
- if (next.length > maxSize) {
2824
- next = next.substring(0, maxSize) + '...';
2825
- }
2826
-
2827
- return next;
2828
- },
2829
-
2830
- /**
2831
- * return a string which displays the character position where the
2832
- * lexing error occurred, i.e. for error messages
2833
- *
2834
- * @public
2835
- * @this {RegExpLexer}
2836
- */
2837
- showPosition: function lexer_showPosition(maxPrefix, maxPostfix) {
2838
- var pre = this.pastInput(maxPrefix).replace(/\s/g, ' ');
2839
- var c = new Array(pre.length + 1).join('-');
2840
- return pre + this.upcomingInput(maxPostfix).replace(/\s/g, ' ') + '\n' + c + '^';
2841
- },
2842
-
2843
- /**
2844
- * return an YYLLOC info object derived off the given context (actual, preceding, following, current).
2845
- * Use this method when the given `actual` location is not guaranteed to exist (i.e. when
2846
- * it MAY be NULL) and you MUST have a valid location info object anyway:
2847
- * then we take the given context of the `preceding` and `following` locations, IFF those are available,
2848
- * and reconstruct the `actual` location info from those.
2849
- * If this fails, the heuristic is to take the `current` location, IFF available.
2850
- * If this fails as well, we assume the sought location is at/around the current lexer position
2851
- * and then produce that one as a response. DO NOTE that these heuristic/derived location info
2852
- * values MAY be inaccurate!
2853
- *
2854
- * NOTE: `deriveLocationInfo()` ALWAYS produces a location info object *copy* of `actual`, not just
2855
- * a *reference* hence all input location objects can be assumed to be 'constant' (function has no side-effects).
2856
- *
2857
- * @public
2858
- * @this {RegExpLexer}
2859
- */
2860
- deriveLocationInfo: function lexer_deriveYYLLOC(actual, preceding, following, current) {
2861
- var loc = {
2862
- first_line: 1,
2863
- first_column: 0,
2864
- last_line: 1,
2865
- last_column: 0,
2866
- range: [0, 0]
2867
- };
2868
-
2869
- if (actual) {
2870
- loc.first_line = actual.first_line | 0;
2871
- loc.last_line = actual.last_line | 0;
2872
- loc.first_column = actual.first_column | 0;
2873
- loc.last_column = actual.last_column | 0;
2874
-
2875
- if (actual.range) {
2876
- loc.range[0] = actual.range[0] | 0;
2877
- loc.range[1] = actual.range[1] | 0;
2878
- }
2879
- }
2880
-
2881
- if (loc.first_line <= 0 || loc.last_line < loc.first_line) {
2882
- // plan B: heuristic using preceding and following:
2883
- if (loc.first_line <= 0 && preceding) {
2884
- loc.first_line = preceding.last_line | 0;
2885
- loc.first_column = preceding.last_column | 0;
2886
-
2887
- if (preceding.range) {
2888
- loc.range[0] = actual.range[1] | 0;
2889
- }
2890
- }
2891
-
2892
- if ((loc.last_line <= 0 || loc.last_line < loc.first_line) && following) {
2893
- loc.last_line = following.first_line | 0;
2894
- loc.last_column = following.first_column | 0;
2895
-
2896
- if (following.range) {
2897
- loc.range[1] = actual.range[0] | 0;
2898
- }
2899
- }
2900
-
2901
- // plan C?: see if the 'current' location is useful/sane too:
2902
- if (loc.first_line <= 0 && current && (loc.last_line <= 0 || current.last_line <= loc.last_line)) {
2903
- loc.first_line = current.first_line | 0;
2904
- loc.first_column = current.first_column | 0;
2905
-
2906
- if (current.range) {
2907
- loc.range[0] = current.range[0] | 0;
2908
- }
2909
- }
2910
-
2911
- if (loc.last_line <= 0 && current && (loc.first_line <= 0 || current.first_line >= loc.first_line)) {
2912
- loc.last_line = current.last_line | 0;
2913
- loc.last_column = current.last_column | 0;
2914
-
2915
- if (current.range) {
2916
- loc.range[1] = current.range[1] | 0;
2917
- }
2918
- }
2919
- }
2920
-
2921
- // sanitize: fix last_line BEFORE we fix first_line as we use the 'raw' value of the latter
2922
- // or plan D heuristics to produce a 'sensible' last_line value:
2923
- if (loc.last_line <= 0) {
2924
- if (loc.first_line <= 0) {
2925
- loc.first_line = this.yylloc.first_line;
2926
- loc.last_line = this.yylloc.last_line;
2927
- loc.first_column = this.yylloc.first_column;
2928
- loc.last_column = this.yylloc.last_column;
2929
- loc.range[0] = this.yylloc.range[0];
2930
- loc.range[1] = this.yylloc.range[1];
2931
- } else {
2932
- loc.last_line = this.yylloc.last_line;
2933
- loc.last_column = this.yylloc.last_column;
2934
- loc.range[1] = this.yylloc.range[1];
2935
- }
2936
- }
2937
-
2938
- if (loc.first_line <= 0) {
2939
- loc.first_line = loc.last_line;
2940
- loc.first_column = 0; // loc.last_column;
2941
- loc.range[1] = loc.range[0];
2942
- }
2943
-
2944
- if (loc.first_column < 0) {
2945
- loc.first_column = 0;
2946
- }
2947
-
2948
- if (loc.last_column < 0) {
2949
- loc.last_column = (loc.first_column > 0 ? loc.first_column : 80);
2950
- }
2951
-
2952
- return loc;
2953
- },
2954
-
2955
- /**
2956
- * return a string which displays the lines & columns of input which are referenced
2957
- * by the given location info range, plus a few lines of context.
2958
- *
2959
- * This function pretty-prints the indicated section of the input, with line numbers
2960
- * and everything!
2961
- *
2962
- * This function is very useful to provide highly readable error reports, while
2963
- * the location range may be specified in various flexible ways:
2964
- *
2965
- * - `loc` is the location info object which references the area which should be
2966
- * displayed and 'marked up': these lines & columns of text are marked up by `^`
2967
- * characters below each character in the entire input range.
2968
- *
2969
- * - `context_loc` is the *optional* location info object which instructs this
2970
- * pretty-printer how much *leading* context should be displayed alongside
2971
- * the area referenced by `loc`. This can help provide context for the displayed
2972
- * error, etc.
2973
- *
2974
- * When this location info is not provided, a default context of 3 lines is
2975
- * used.
2976
- *
2977
- * - `context_loc2` is another *optional* location info object, which serves
2978
- * a similar purpose to `context_loc`: it specifies the amount of *trailing*
2979
- * context lines to display in the pretty-print output.
2980
- *
2981
- * When this location info is not provided, a default context of 1 line only is
2982
- * used.
2983
- *
2984
- * Special Notes:
2985
- *
2986
- * - when the `loc`-indicated range is very large (about 5 lines or more), then
2987
- * only the first and last few lines of this block are printed while a
2988
- * `...continued...` message will be printed between them.
2989
- *
2990
- * This serves the purpose of not printing a huge amount of text when the `loc`
2991
- * range happens to be huge: this way a manageable & readable output results
2992
- * for arbitrary large ranges.
2993
- *
2994
- * - this function can display lines of input which whave not yet been lexed.
2995
- * `prettyPrintRange()` can access the entire input!
2996
- *
2997
- * @public
2998
- * @this {RegExpLexer}
2999
- */
3000
- prettyPrintRange: function lexer_prettyPrintRange(loc, context_loc, context_loc2) {
3001
- loc = this.deriveLocationInfo(loc, context_loc, context_loc2);
3002
- const CONTEXT = 3;
3003
- const CONTEXT_TAIL = 1;
3004
- const MINIMUM_VISIBLE_NONEMPTY_LINE_COUNT = 2;
3005
- var input = this.matched + this._input;
3006
- var lines = input.split('\n');
3007
- var l0 = Math.max(1, (context_loc ? context_loc.first_line : loc.first_line - CONTEXT));
3008
- var l1 = Math.max(1, (context_loc2 ? context_loc2.last_line : loc.last_line + CONTEXT_TAIL));
3009
- var lineno_display_width = 1 + Math.log10(l1 | 1) | 0;
3010
- var ws_prefix = new Array(lineno_display_width).join(' ');
3011
- var nonempty_line_indexes = [];
3012
-
3013
- var rv = lines.slice(l0 - 1, l1 + 1).map(function injectLineNumber(line, index) {
3014
- var lno = index + l0;
3015
- var lno_pfx = (ws_prefix + lno).substr(-lineno_display_width);
3016
- var rv = lno_pfx + ': ' + line;
3017
- var errpfx = new Array(lineno_display_width + 1).join('^');
3018
- var offset = 2 + 1;
3019
- var len = 0;
3020
-
3021
- if (lno === loc.first_line) {
3022
- offset += loc.first_column;
3023
-
3024
- len = Math.max(
3025
- 2,
3026
- ((lno === loc.last_line ? loc.last_column : line.length)) - loc.first_column + 1
3027
- );
3028
- } else if (lno === loc.last_line) {
3029
- len = Math.max(2, loc.last_column + 1);
3030
- } else if (lno > loc.first_line && lno < loc.last_line) {
3031
- len = Math.max(2, line.length + 1);
3032
- }
3033
-
3034
- if (len) {
3035
- var lead = new Array(offset).join('.');
3036
- var mark = new Array(len).join('^');
3037
- rv += '\n' + errpfx + lead + mark;
3038
-
3039
- if (line.trim().length > 0) {
3040
- nonempty_line_indexes.push(index);
3041
- }
3042
- }
3043
-
3044
- rv = rv.replace(/\t/g, ' ');
3045
- return rv;
3046
- });
3047
-
3048
- // now make sure we don't print an overly large amount of error area: limit it
3049
- // to the top and bottom line count:
3050
- if (nonempty_line_indexes.length > 2 * MINIMUM_VISIBLE_NONEMPTY_LINE_COUNT) {
3051
- var clip_start = nonempty_line_indexes[MINIMUM_VISIBLE_NONEMPTY_LINE_COUNT - 1] + 1;
3052
- var clip_end = nonempty_line_indexes[nonempty_line_indexes.length - MINIMUM_VISIBLE_NONEMPTY_LINE_COUNT] - 1;
3053
- var intermediate_line = new Array(lineno_display_width + 1).join(' ') + ' (...continued...)';
3054
- intermediate_line += '\n' + new Array(lineno_display_width + 1).join('-') + ' (---------------)';
3055
- rv.splice(clip_start, clip_end - clip_start + 1, intermediate_line);
3056
- }
3057
-
3058
- return rv.join('\n');
3059
- },
3060
-
3061
- /**
3062
- * helper function, used to produce a human readable description as a string, given
3063
- * the input `yylloc` location object.
3064
- *
3065
- * Set `display_range_too` to TRUE to include the string character index position(s)
3066
- * in the description if the `yylloc.range` is available.
3067
- *
3068
- * @public
3069
- * @this {RegExpLexer}
3070
- */
3071
- describeYYLLOC: function lexer_describe_yylloc(yylloc, display_range_too) {
3072
- var l1 = yylloc.first_line;
3073
- var l2 = yylloc.last_line;
3074
- var c1 = yylloc.first_column;
3075
- var c2 = yylloc.last_column;
3076
- var dl = l2 - l1;
3077
- var dc = c2 - c1;
3078
- var rv;
3079
-
3080
- if (dl === 0) {
3081
- rv = 'line ' + l1 + ', ';
3082
-
3083
- if (dc <= 1) {
3084
- rv += 'column ' + c1;
3085
- } else {
3086
- rv += 'columns ' + c1 + ' .. ' + c2;
3087
- }
3088
- } else {
3089
- rv = 'lines ' + l1 + '(column ' + c1 + ') .. ' + l2 + '(column ' + c2 + ')';
3090
- }
3091
-
3092
- if (yylloc.range && display_range_too) {
3093
- var r1 = yylloc.range[0];
3094
- var r2 = yylloc.range[1] - 1;
3095
-
3096
- if (r2 <= r1) {
3097
- rv += ' {String Offset: ' + r1 + '}';
3098
- } else {
3099
- rv += ' {String Offset range: ' + r1 + ' .. ' + r2 + '}';
3100
- }
3101
- }
3102
-
3103
- return rv;
3104
- },
3105
-
3106
- /**
3107
- * test the lexed token: return FALSE when not a match, otherwise return token.
3108
- *
3109
- * `match` is supposed to be an array coming out of a regex match, i.e. `match[0]`
3110
- * contains the actually matched text string.
3111
- *
3112
- * Also move the input cursor forward and update the match collectors:
3113
- *
3114
- * - `yytext`
3115
- * - `yyleng`
3116
- * - `match`
3117
- * - `matches`
3118
- * - `yylloc`
3119
- * - `offset`
3120
- *
3121
- * @public
3122
- * @this {RegExpLexer}
3123
- */
3124
- test_match: function lexer_test_match(match, indexed_rule) {
3125
- var token, lines, backup, match_str, match_str_len;
3126
-
3127
- if (this.options.backtrack_lexer) {
3128
- // save context
3129
- backup = {
3130
- yylineno: this.yylineno,
3131
-
3132
- yylloc: {
3133
- first_line: this.yylloc.first_line,
3134
- last_line: this.yylloc.last_line,
3135
- first_column: this.yylloc.first_column,
3136
- last_column: this.yylloc.last_column,
3137
- range: this.yylloc.range.slice(0)
3138
- },
3139
-
3140
- yytext: this.yytext,
3141
- match: this.match,
3142
- matches: this.matches,
3143
- matched: this.matched,
3144
- yyleng: this.yyleng,
3145
- offset: this.offset,
3146
- _more: this._more,
3147
- _input: this._input,
3148
-
3149
- //_signaled_error_token: this._signaled_error_token,
3150
- yy: this.yy,
3151
-
3152
- conditionStack: this.conditionStack.slice(0),
3153
- done: this.done
3154
- };
3155
- }
3156
-
3157
- match_str = match[0];
3158
- match_str_len = match_str.length;
3159
-
3160
- // if (match_str.indexOf('\n') !== -1 || match_str.indexOf('\r') !== -1) {
3161
- lines = match_str.split(/(?:\r\n?|\n)/g);
3162
-
3163
- if (lines.length > 1) {
3164
- this.yylineno += lines.length - 1;
3165
- this.yylloc.last_line = this.yylineno + 1;
3166
- this.yylloc.last_column = lines[lines.length - 1].length;
3167
- } else {
3168
- this.yylloc.last_column += match_str_len;
3169
- }
3170
-
3171
- // }
3172
- this.yytext += match_str;
3173
-
3174
- this.match += match_str;
3175
- this.matched += match_str;
3176
- this.matches = match;
3177
- this.yyleng = this.yytext.length;
3178
- this.yylloc.range[1] += match_str_len;
3179
-
3180
- // previous lex rules MAY have invoked the `more()` API rather than producing a token:
3181
- // those rules will already have moved this `offset` forward matching their match lengths,
3182
- // hence we must only add our own match length now:
3183
- this.offset += match_str_len;
3184
-
3185
- this._more = false;
3186
- this._backtrack = false;
3187
- this._input = this._input.slice(match_str_len);
3188
-
3189
- // calling this method:
3190
- //
3191
- // function lexer__performAction(yy, yyrulenumber, YY_START) {...}
3192
- token = this.performAction.call(
3193
- this,
3194
- this.yy,
3195
- indexed_rule,
3196
- this.conditionStack[this.conditionStack.length - 1] /* = YY_START */
3197
- );
3198
-
3199
- // otherwise, when the action codes are all simple return token statements:
3200
- //token = this.simpleCaseActionClusters[indexed_rule];
3201
-
3202
- if (this.done && this._input) {
3203
- this.done = false;
3204
- }
3205
-
3206
- if (token) {
3207
- return token;
3208
- } else if (this._backtrack) {
3209
- // recover context
3210
- for (var k in backup) {
3211
- this[k] = backup[k];
3212
- }
3213
-
3214
- this.__currentRuleSet__ = null;
3215
- return false; // rule action called reject() implying the next rule should be tested instead.
3216
- } else if (this._signaled_error_token) {
3217
- // produce one 'error' token as `.parseError()` in `reject()`
3218
- // did not guarantee a failure signal by throwing an exception!
3219
- token = this._signaled_error_token;
3220
-
3221
- this._signaled_error_token = false;
3222
- return token;
3223
- }
3224
-
3225
- return false;
3226
- },
3227
-
3228
- /**
3229
- * return next match in input
3230
- *
3231
- * @public
3232
- * @this {RegExpLexer}
3233
- */
3234
- next: function lexer_next() {
3235
- if (this.done) {
3236
- this.clear();
3237
- return this.EOF;
3238
- }
3239
-
3240
- if (!this._input) {
3241
- this.done = true;
3242
- }
3243
-
3244
- var token, match, tempMatch, index;
3245
-
3246
- if (!this._more) {
3247
- this.clear();
3248
- }
3249
-
3250
- var spec = this.__currentRuleSet__;
3251
-
3252
- if (!spec) {
3253
- // Update the ruleset cache as we apparently encountered a state change or just started lexing.
3254
- // The cache is set up for fast lookup -- we assume a lexer will switch states much less often than it will
3255
- // invoke the `lex()` token-producing API and related APIs, hence caching the set for direct access helps
3256
- // speed up those activities a tiny bit.
3257
- spec = this.__currentRuleSet__ = this._currentRules();
3258
-
3259
- // Check whether a *sane* condition has been pushed before: this makes the lexer robust against
3260
- // user-programmer bugs such as https://github.com/zaach/jison-lex/issues/19
3261
- if (!spec || !spec.rules) {
3262
- var lineno_msg = '';
3263
-
3264
- if (this.options.trackPosition) {
3265
- lineno_msg = ' on line ' + (this.yylineno + 1);
3266
- }
3267
-
3268
- var p = this.constructLexErrorInfo(
3269
- 'Internal lexer engine error' + lineno_msg + ': The lex grammar programmer pushed a non-existing condition name "' + this.topState() + '"; this is a fatal error and should be reported to the application programmer team!',
3270
- false
3271
- );
3272
-
3273
- // produce one 'error' token until this situation has been resolved, most probably by parse termination!
3274
- return this.parseError(p.errStr, p, this.JisonLexerError) || this.ERROR;
3275
- }
3276
- }
3277
-
3278
- var rule_ids = spec.rules;
3279
- var regexes = spec.__rule_regexes;
3280
- var len = spec.__rule_count;
3281
-
3282
- // Note: the arrays are 1-based, while `len` itself is a valid index,
3283
- // hence the non-standard less-or-equal check in the next loop condition!
3284
- for (var i = 1; i <= len; i++) {
3285
- tempMatch = this._input.match(regexes[i]);
3286
-
3287
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
3288
- match = tempMatch;
3289
- index = i;
3290
-
3291
- if (this.options.backtrack_lexer) {
3292
- token = this.test_match(tempMatch, rule_ids[i]);
3293
-
3294
- if (token !== false) {
3295
- return token;
3296
- } else if (this._backtrack) {
3297
- match = undefined;
3298
- continue; // rule action called reject() implying a rule MISmatch.
3299
- } else {
3300
- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
3301
- return false;
3302
- }
3303
- } else if (!this.options.flex) {
3304
- break;
3305
- }
3306
- }
3307
- }
3308
-
3309
- if (match) {
3310
- token = this.test_match(match, rule_ids[index]);
3311
-
3312
- if (token !== false) {
3313
- return token;
3314
- }
3315
-
3316
- // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
3317
- return false;
3318
- }
3319
-
3320
- if (!this._input) {
3321
- this.done = true;
3322
- this.clear();
3323
- return this.EOF;
3324
- } else {
3325
- var lineno_msg = '';
3326
-
3327
- if (this.options.trackPosition) {
3328
- lineno_msg = ' on line ' + (this.yylineno + 1);
3329
- }
3330
-
3331
- var p = this.constructLexErrorInfo(
3332
- 'Lexical error' + lineno_msg + ': Unrecognized text.',
3333
- this.options.lexerErrorsAreRecoverable
3334
- );
3335
-
3336
- var pendingInput = this._input;
3337
- var activeCondition = this.topState();
3338
- var conditionStackDepth = this.conditionStack.length;
3339
- token = this.parseError(p.errStr, p, this.JisonLexerError) || this.ERROR;
3340
-
3341
- if (token === this.ERROR) {
3342
- // we can try to recover from a lexer error that `parseError()` did not 'recover' for us
3343
- // by moving forward at least one character at a time IFF the (user-specified?) `parseError()`
3344
- // has not consumed/modified any pending input or changed state in the error handler:
3345
- if (!this.matches && // and make sure the input has been modified/consumed ...
3346
- pendingInput === this._input && // ...or the lexer state has been modified significantly enough
3347
- // to merit a non-consuming error handling action right now.
3348
- activeCondition === this.topState() && conditionStackDepth === this.conditionStack.length) {
3349
- this.input();
3350
- }
3351
- }
3352
-
3353
- return token;
3354
- }
3355
- },
3356
-
3357
- /**
3358
- * return next match that has a token
3359
- *
3360
- * @public
3361
- * @this {RegExpLexer}
3362
- */
3363
- lex: function lexer_lex() {
3364
- var r;
3365
-
3366
- // allow the PRE/POST handlers set/modify the return token for maximum flexibility of the generated lexer:
3367
- if (typeof this.pre_lex === 'function') {
3368
- r = this.pre_lex.call(this, 0);
3369
- }
3370
-
3371
- if (typeof this.options.pre_lex === 'function') {
3372
- // (also account for a userdef function which does not return any value: keep the token as is)
3373
- r = this.options.pre_lex.call(this, r) || r;
3374
- }
3375
-
3376
- if (this.yy && typeof this.yy.pre_lex === 'function') {
3377
- // (also account for a userdef function which does not return any value: keep the token as is)
3378
- r = this.yy.pre_lex.call(this, r) || r;
3379
- }
3380
-
3381
- while (!r) {
3382
- r = this.next();
3383
- }
3384
-
3385
- if (this.yy && typeof this.yy.post_lex === 'function') {
3386
- // (also account for a userdef function which does not return any value: keep the token as is)
3387
- r = this.yy.post_lex.call(this, r) || r;
3388
- }
3389
-
3390
- if (typeof this.options.post_lex === 'function') {
3391
- // (also account for a userdef function which does not return any value: keep the token as is)
3392
- r = this.options.post_lex.call(this, r) || r;
3393
- }
3394
-
3395
- if (typeof this.post_lex === 'function') {
3396
- // (also account for a userdef function which does not return any value: keep the token as is)
3397
- r = this.post_lex.call(this, r) || r;
3398
- }
3399
-
3400
- return r;
3401
- },
3402
-
3403
- /**
3404
- * return next match that has a token. Identical to the `lex()` API but does not invoke any of the
3405
- * `pre_lex()` nor any of the `post_lex()` callbacks.
3406
- *
3407
- * @public
3408
- * @this {RegExpLexer}
3409
- */
3410
- fastLex: function lexer_fastLex() {
3411
- var r;
3412
-
3413
- while (!r) {
3414
- r = this.next();
3415
- }
3416
-
3417
- return r;
3418
- },
3419
-
3420
- /**
3421
- * return info about the lexer state that can help a parser or other lexer API user to use the
3422
- * most efficient means available. This API is provided to aid run-time performance for larger
3423
- * systems which employ this lexer.
3424
- *
3425
- * @public
3426
- * @this {RegExpLexer}
3427
- */
3428
- canIUse: function lexer_canIUse() {
3429
- var rv = {
3430
- fastLex: !(typeof this.pre_lex === 'function' || typeof this.options.pre_lex === 'function' || this.yy && typeof this.yy.pre_lex === 'function' || this.yy && typeof this.yy.post_lex === 'function' || typeof this.options.post_lex === 'function' || typeof this.post_lex === 'function') && typeof this.fastLex === 'function'
3431
- };
3432
-
3433
- return rv;
3434
- },
3435
-
3436
- /**
3437
- * backwards compatible alias for `pushState()`;
3438
- * the latter is symmetrical with `popState()` and we advise to use
3439
- * those APIs in any modern lexer code, rather than `begin()`.
3440
- *
3441
- * @public
3442
- * @this {RegExpLexer}
3443
- */
3444
- begin: function lexer_begin(condition) {
3445
- return this.pushState(condition);
3446
- },
3447
-
3448
- /**
3449
- * activates a new lexer condition state (pushes the new lexer
3450
- * condition state onto the condition stack)
3451
- *
3452
- * @public
3453
- * @this {RegExpLexer}
3454
- */
3455
- pushState: function lexer_pushState(condition) {
3456
- this.conditionStack.push(condition);
3457
- this.__currentRuleSet__ = null;
3458
- return this;
3459
- },
3460
-
3461
- /**
3462
- * pop the previously active lexer condition state off the condition
3463
- * stack
3464
- *
3465
- * @public
3466
- * @this {RegExpLexer}
3467
- */
3468
- popState: function lexer_popState() {
3469
- var n = this.conditionStack.length - 1;
3470
-
3471
- if (n > 0) {
3472
- this.__currentRuleSet__ = null;
3473
- return this.conditionStack.pop();
3474
- } else {
3475
- return this.conditionStack[0];
3476
- }
3477
- },
3478
-
3479
- /**
3480
- * return the currently active lexer condition state; when an index
3481
- * argument is provided it produces the N-th previous condition state,
3482
- * if available
3483
- *
3484
- * @public
3485
- * @this {RegExpLexer}
3486
- */
3487
- topState: function lexer_topState(n) {
3488
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
3489
-
3490
- if (n >= 0) {
3491
- return this.conditionStack[n];
3492
- } else {
3493
- return 'INITIAL';
3494
- }
3495
- },
3496
-
3497
- /**
3498
- * (internal) determine the lexer rule set which is active for the
3499
- * currently active lexer condition state
3500
- *
3501
- * @public
3502
- * @this {RegExpLexer}
3503
- */
3504
- _currentRules: function lexer__currentRules() {
3505
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
3506
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]];
3507
- } else {
3508
- return this.conditions['INITIAL'];
3509
- }
3510
- },
3511
-
3512
- /**
3513
- * return the number of states currently on the stack
3514
- *
3515
- * @public
3516
- * @this {RegExpLexer}
3517
- */
3518
- stateStackSize: function lexer_stateStackSize() {
3519
- return this.conditionStack.length;
3520
- },
3521
-
3522
- options: {
3523
- trackPosition: true,
3524
- caseInsensitive: true
3525
- },
3526
-
3527
- JisonLexerError: JisonLexerError,
3528
-
3529
- performAction: function lexer__performAction(yy, yyrulenumber, YY_START) {
3530
- var yy_ = this;
3531
- var YYSTATE = YY_START;
3532
-
3533
- switch (yyrulenumber) {
3534
- case 0:
3535
- /*! Conditions:: INITIAL */
3536
- /*! Rule:: \s+ */
3537
- /* skip whitespace */
3538
- break;
3539
-
3540
- case 7:
3541
- /*! Conditions:: INITIAL */
3542
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)em\b */
3543
- return 12; // em
3544
-
3545
- break;
3546
-
3547
- case 8:
3548
- /*! Conditions:: INITIAL */
3549
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)ex\b */
3550
- return 12; // ex
3551
-
3552
- break;
3553
-
3554
- case 9:
3555
- /*! Conditions:: INITIAL */
3556
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)ch\b */
3557
- return 12; // ch
3558
-
3559
- break;
3560
-
3561
- case 10:
3562
- /*! Conditions:: INITIAL */
3563
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)rem\b */
3564
- return 12; // rem
3565
-
3566
- break;
3567
-
3568
- case 11:
3569
- /*! Conditions:: INITIAL */
3570
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)vw\b */
3571
- return 12; // vw
3572
-
3573
- break;
3574
-
3575
- case 12:
3576
- /*! Conditions:: INITIAL */
3577
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)vh\b */
3578
- return 12; // vh
3579
-
3580
- break;
3581
-
3582
- case 13:
3583
- /*! Conditions:: INITIAL */
3584
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)vmin\b */
3585
- return 12; // vmin
3586
-
3587
- break;
3588
-
3589
- case 14:
3590
- /*! Conditions:: INITIAL */
3591
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)vmax\b */
3592
- return 12; // vmax
3593
-
3594
- break;
3595
-
3596
- case 15:
3597
- /*! Conditions:: INITIAL */
3598
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)vm\b */
3599
- return 12; // vm (non-standard name)
3600
-
3601
- break;
3602
-
3603
- case 16:
3604
- /*! Conditions:: INITIAL */
3605
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)px\b */
3606
- return 12; // px
3607
-
3608
- break;
3609
-
3610
- case 17:
3611
- /*! Conditions:: INITIAL */
3612
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)mm\b */
3613
- return 12; // mm
3614
-
3615
- break;
3616
-
3617
- case 18:
3618
- /*! Conditions:: INITIAL */
3619
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)cm\b */
3620
- return 12; // cm
3621
-
3622
- break;
3623
-
3624
- case 19:
3625
- /*! Conditions:: INITIAL */
3626
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)in\b */
3627
- return 12; // in
3628
-
3629
- break;
3630
-
3631
- case 20:
3632
- /*! Conditions:: INITIAL */
3633
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)pt\b */
3634
- return 12; // pt
3635
-
3636
- break;
3637
-
3638
- case 21:
3639
- /*! Conditions:: INITIAL */
3640
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)pc\b */
3641
- return 12; // pc
3642
-
3643
- break;
3644
-
3645
- case 22:
3646
- /*! Conditions:: INITIAL */
3647
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)Q\b */
3648
- return 12; // Q
3649
-
3650
- break;
3651
-
3652
- case 23:
3653
- /*! Conditions:: INITIAL */
3654
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)fr\b */
3655
- return 12; // fr
3656
-
3657
- break;
3658
-
3659
- case 24:
3660
- /*! Conditions:: INITIAL */
3661
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)deg\b */
3662
- return 13; // deg
3663
-
3664
- break;
3665
-
3666
- case 25:
3667
- /*! Conditions:: INITIAL */
3668
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)grad\b */
3669
- return 13; // grad
3670
-
3671
- break;
3672
-
3673
- case 26:
3674
- /*! Conditions:: INITIAL */
3675
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)turn\b */
3676
- return 13; // turn
3677
-
3678
- break;
3679
-
3680
- case 27:
3681
- /*! Conditions:: INITIAL */
3682
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)rad\b */
3683
- return 13; // rad
3684
-
3685
- break;
3686
-
3687
- case 28:
3688
- /*! Conditions:: INITIAL */
3689
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)s\b */
3690
- return 14; // s
3691
-
3692
- break;
3693
-
3694
- case 29:
3695
- /*! Conditions:: INITIAL */
3696
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)ms\b */
3697
- return 14; // ms
3698
-
3699
- break;
3700
-
3701
- case 30:
3702
- /*! Conditions:: INITIAL */
3703
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)Hz\b */
3704
- return 15; // Hz
3705
-
3706
- break;
3707
-
3708
- case 31:
3709
- /*! Conditions:: INITIAL */
3710
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)kHz\b */
3711
- return 15; // kHz
3712
-
3713
- break;
3714
-
3715
- case 32:
3716
- /*! Conditions:: INITIAL */
3717
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)dpi\b */
3718
- return 16; // dpi
3719
-
3720
- break;
3721
-
3722
- case 33:
3723
- /*! Conditions:: INITIAL */
3724
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)dpcm\b */
3725
- return 16; // dpcm
3726
-
3727
- break;
3728
-
3729
- case 34:
3730
- /*! Conditions:: INITIAL */
3731
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)dppx\b */
3732
- return 16; // dppm
3733
-
3734
- break;
3735
-
3736
- case 39:
3737
- /*! Conditions:: INITIAL */
3738
- /*! Rule:: #\{([\s\S]*?)\} */
3739
- return 18; // scss variable
3740
-
3741
- break;
3742
-
3743
- case 40:
3744
- /*! Conditions:: INITIAL */
3745
- /*! Rule:: @\{([\s\S]*?)\} */
3746
- return 18; // less variable
3747
-
3748
- break;
3749
-
3750
- default:
3751
- return this.simpleCaseActionClusters[yyrulenumber];
3752
- }
3753
- },
3754
-
3755
- simpleCaseActionClusters: {
3756
- /*! Conditions:: INITIAL */
3757
- /*! Rule:: (-(webkit|moz)-)?calc\b */
3758
- 1: 3,
3759
-
3760
- /*! Conditions:: INITIAL */
3761
- /*! Rule:: [a-z][a-z0-9-]*\s*\((?:(?:"(?:\\.|[^\"\\])*"|'(?:\\.|[^\'\\])*')|\([^)]*\)|[^\(\)]*)*\) */
3762
- 2: 11,
3763
-
3764
- /*! Conditions:: INITIAL */
3765
- /*! Rule:: \* */
3766
- 3: 8,
3767
-
3768
- /*! Conditions:: INITIAL */
3769
- /*! Rule:: \/ */
3770
- 4: 9,
3771
-
3772
- /*! Conditions:: INITIAL */
3773
- /*! Rule:: \+ */
3774
- 5: 6,
3775
-
3776
- /*! Conditions:: INITIAL */
3777
- /*! Rule:: - */
3778
- 6: 7,
3779
-
3780
- /*! Conditions:: INITIAL */
3781
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)% */
3782
- 35: 17,
3783
-
3784
- /*! Conditions:: INITIAL */
3785
- /*! Rule:: ([0-9]+(\.[0-9]+)?|\.[0-9]+)\b */
3786
- 36: 10,
3787
-
3788
- /*! Conditions:: INITIAL */
3789
- /*! Rule:: \( */
3790
- 37: 4,
3791
-
3792
- /*! Conditions:: INITIAL */
3793
- /*! Rule:: \) */
3794
- 38: 5,
3795
-
3796
- /*! Conditions:: INITIAL */
3797
- /*! Rule:: \S[^\s()*\/+-]* */
3798
- 41: 18,
3799
-
3800
- /*! Conditions:: INITIAL */
3801
- /*! Rule:: $ */
3802
- 42: 1
3803
- },
3804
-
3805
- rules: [
3806
- /* 0: */ /^(?:\s+)/i,
3807
- /* 1: */ /^(?:(-(webkit|moz)-)?calc\b)/i,
3808
- /* 2: */ /^(?:[a-z][\d\-a-z]*\s*\((?:(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')|\([^)]*\)|[^()]*)*\))/i,
3809
- /* 3: */ /^(?:\*)/i,
3810
- /* 4: */ /^(?:\/)/i,
3811
- /* 5: */ /^(?:\+)/i,
3812
- /* 6: */ /^(?:-)/i,
3813
- /* 7: */ /^(?:(\d+(\.\d+)?|\.\d+)em\b)/i,
3814
- /* 8: */ /^(?:(\d+(\.\d+)?|\.\d+)ex\b)/i,
3815
- /* 9: */ /^(?:(\d+(\.\d+)?|\.\d+)ch\b)/i,
3816
- /* 10: */ /^(?:(\d+(\.\d+)?|\.\d+)rem\b)/i,
3817
- /* 11: */ /^(?:(\d+(\.\d+)?|\.\d+)vw\b)/i,
3818
- /* 12: */ /^(?:(\d+(\.\d+)?|\.\d+)vh\b)/i,
3819
- /* 13: */ /^(?:(\d+(\.\d+)?|\.\d+)vmin\b)/i,
3820
- /* 14: */ /^(?:(\d+(\.\d+)?|\.\d+)vmax\b)/i,
3821
- /* 15: */ /^(?:(\d+(\.\d+)?|\.\d+)vm\b)/i,
3822
- /* 16: */ /^(?:(\d+(\.\d+)?|\.\d+)px\b)/i,
3823
- /* 17: */ /^(?:(\d+(\.\d+)?|\.\d+)mm\b)/i,
3824
- /* 18: */ /^(?:(\d+(\.\d+)?|\.\d+)cm\b)/i,
3825
- /* 19: */ /^(?:(\d+(\.\d+)?|\.\d+)in\b)/i,
3826
- /* 20: */ /^(?:(\d+(\.\d+)?|\.\d+)pt\b)/i,
3827
- /* 21: */ /^(?:(\d+(\.\d+)?|\.\d+)pc\b)/i,
3828
- /* 22: */ /^(?:(\d+(\.\d+)?|\.\d+)Q\b)/i,
3829
- /* 23: */ /^(?:(\d+(\.\d+)?|\.\d+)fr\b)/i,
3830
- /* 24: */ /^(?:(\d+(\.\d+)?|\.\d+)deg\b)/i,
3831
- /* 25: */ /^(?:(\d+(\.\d+)?|\.\d+)grad\b)/i,
3832
- /* 26: */ /^(?:(\d+(\.\d+)?|\.\d+)turn\b)/i,
3833
- /* 27: */ /^(?:(\d+(\.\d+)?|\.\d+)rad\b)/i,
3834
- /* 28: */ /^(?:(\d+(\.\d+)?|\.\d+)s\b)/i,
3835
- /* 29: */ /^(?:(\d+(\.\d+)?|\.\d+)ms\b)/i,
3836
- /* 30: */ /^(?:(\d+(\.\d+)?|\.\d+)Hz\b)/i,
3837
- /* 31: */ /^(?:(\d+(\.\d+)?|\.\d+)kHz\b)/i,
3838
- /* 32: */ /^(?:(\d+(\.\d+)?|\.\d+)dpi\b)/i,
3839
- /* 33: */ /^(?:(\d+(\.\d+)?|\.\d+)dpcm\b)/i,
3840
- /* 34: */ /^(?:(\d+(\.\d+)?|\.\d+)dppx\b)/i,
3841
- /* 35: */ /^(?:(\d+(\.\d+)?|\.\d+)%)/i,
3842
- /* 36: */ /^(?:(\d+(\.\d+)?|\.\d+)\b)/i,
3843
- /* 37: */ /^(?:\()/i,
3844
- /* 38: */ /^(?:\))/i,
3845
- /* 39: */ /^(?:#\{([\s\S]*?)\})/i,
3846
- /* 40: */ /^(?:@\{([\s\S]*?)\})/i,
3847
- /* 41: */ /^(?:\S[^\s()*\/+-]*)/i,
3848
- /* 42: */ /^(?:$)/i
3849
- ],
3850
-
3851
- conditions: {
3852
- 'INITIAL': {
3853
- rules: [
3854
- 0,
3855
- 1,
3856
- 2,
3857
- 3,
3858
- 4,
3859
- 5,
3860
- 6,
3861
- 7,
3862
- 8,
3863
- 9,
3864
- 10,
3865
- 11,
3866
- 12,
3867
- 13,
3868
- 14,
3869
- 15,
3870
- 16,
3871
- 17,
3872
- 18,
3873
- 19,
3874
- 20,
3875
- 21,
3876
- 22,
3877
- 23,
3878
- 24,
3879
- 25,
3880
- 26,
3881
- 27,
3882
- 28,
3883
- 29,
3884
- 30,
3885
- 31,
3886
- 32,
3887
- 33,
3888
- 34,
3889
- 35,
3890
- 36,
3891
- 37,
3892
- 38,
3893
- 39,
3894
- 40,
3895
- 41,
3896
- 42
3897
- ],
3898
-
3899
- inclusive: true
3900
- }
3901
- }
3902
- };
3903
-
3904
- return lexer;
3905
- }();
3906
- parser.lexer = lexer;
3907
-
3908
-
3909
-
3910
- function Parser() {
3911
- this.yy = {};
3912
- }
3913
- Parser.prototype = parser;
3914
- parser.Parser = Parser;
3915
-
3916
- return new Parser();
3917
- })();
3918
-
3919
-
3920
-
3921
-
3922
- if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
3923
- exports.parser = parser;
3924
- exports.Parser = parser.Parser;
3925
- exports.parse = function () {
3926
- return parser.parse.apply(parser, arguments);
3927
- };
3928
-
3929
- }