eoapi-cdk 5.4.0 → 6.0.0

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 (1283) hide show
  1. package/.jsii +360 -831
  2. package/CHANGELOG.md +19 -0
  3. package/lib/bastion-host/index.js +1 -1
  4. package/lib/{bootstrapper/runtime → database/bootstrapper_runtime}/Dockerfile +5 -3
  5. package/lib/database/index.d.ts +34 -5
  6. package/lib/database/index.js +66 -12
  7. package/lib/index.d.ts +1 -1
  8. package/lib/index.js +2 -2
  9. package/lib/ingestor-api/index.d.ts +15 -43
  10. package/lib/ingestor-api/index.js +40 -28
  11. package/lib/ingestor-api/runtime/Dockerfile +16 -0
  12. package/lib/ingestor-api/runtime/dev_requirements.txt +1 -1
  13. package/lib/ingestor-api/runtime/requirements.txt +2 -3
  14. package/lib/ingestor-api/runtime/src/main.py +8 -0
  15. package/lib/ingestor-api/runtime/src/utils.py +1 -1
  16. package/lib/ingestor-api/runtime/tests/test_collection.py +3 -2
  17. package/lib/ingestor-api/runtime/tests/test_registration.py +1 -2
  18. package/lib/ingestor-api/runtime/tests/test_utils.py +1 -1
  19. package/lib/stac-api/index.d.ts +10 -24
  20. package/lib/stac-api/index.js +24 -28
  21. package/lib/stac-api/runtime/Dockerfile +13 -0
  22. package/lib/stac-api/runtime/requirements.txt +4 -5
  23. package/lib/stac-api/runtime/src/handler.py +1 -0
  24. package/lib/stac-browser/index.js +1 -1
  25. package/lib/tipg-api/index.d.ts +9 -23
  26. package/lib/tipg-api/index.js +22 -18
  27. package/lib/tipg-api/runtime/Dockerfile +17 -0
  28. package/lib/tipg-api/runtime/src/handler.py +7 -8
  29. package/lib/tipg-api/runtime/src/utils.py +2 -1
  30. package/lib/titiler-pgstac-api/index.d.ts +6 -39
  31. package/lib/titiler-pgstac-api/index.js +20 -18
  32. package/lib/titiler-pgstac-api/runtime/Dockerfile +19 -0
  33. package/lib/titiler-pgstac-api/runtime/requirements.txt +1 -2
  34. package/lib/titiler-pgstac-api/runtime/src/handler.py +3 -2
  35. package/lib/titiler-pgstac-api/runtime/src/utils.py +1 -0
  36. package/lib/utils/index.d.ts +2 -0
  37. package/lib/utils/index.js +3 -0
  38. package/node_modules/@gulp-sourcemaps/map-sources/LICENSE +21 -0
  39. package/node_modules/@gulp-sourcemaps/map-sources/README.md +52 -0
  40. package/node_modules/@gulp-sourcemaps/map-sources/index.js +30 -0
  41. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/LICENSE +21 -0
  42. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/README.md +92 -0
  43. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/index.js +19 -0
  44. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path/package.json +78 -0
  45. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/LICENSE.md +9 -0
  46. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/README.md +134 -0
  47. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/package.json +33 -0
  48. package/node_modules/@gulp-sourcemaps/map-sources/node_modules/through2/through2.js +96 -0
  49. package/node_modules/@gulp-sourcemaps/map-sources/package.json +47 -0
  50. package/node_modules/acorn/.npmignore +10 -0
  51. package/node_modules/acorn/AUTHORS +62 -0
  52. package/node_modules/acorn/CHANGELOG.md +286 -0
  53. package/node_modules/acorn/LICENSE +19 -0
  54. package/node_modules/acorn/README.md +409 -0
  55. package/node_modules/acorn/bin/acorn +67 -0
  56. package/node_modules/acorn/dist/.keep +0 -0
  57. package/node_modules/acorn/dist/acorn.es.js +3401 -0
  58. package/node_modules/acorn/dist/acorn.js +3433 -0
  59. package/node_modules/acorn/dist/acorn_loose.es.js +1364 -0
  60. package/node_modules/acorn/dist/acorn_loose.js +1374 -0
  61. package/node_modules/acorn/dist/walk.es.js +342 -0
  62. package/node_modules/acorn/dist/walk.js +360 -0
  63. package/node_modules/acorn/package.json +46 -0
  64. package/node_modules/acorn/src/bin/acorn.js +60 -0
  65. package/node_modules/acorn/src/expression.js +819 -0
  66. package/node_modules/acorn/src/identifier.js +81 -0
  67. package/node_modules/acorn/src/index.js +77 -0
  68. package/node_modules/acorn/src/location.js +26 -0
  69. package/node_modules/acorn/src/locutil.js +42 -0
  70. package/node_modules/acorn/src/loose/expression.js +562 -0
  71. package/node_modules/acorn/src/loose/index.js +48 -0
  72. package/node_modules/acorn/src/loose/parseutil.js +1 -0
  73. package/node_modules/acorn/src/loose/state.js +161 -0
  74. package/node_modules/acorn/src/loose/statement.js +450 -0
  75. package/node_modules/acorn/src/loose/tokenize.js +108 -0
  76. package/node_modules/acorn/src/lval.js +219 -0
  77. package/node_modules/acorn/src/node.js +50 -0
  78. package/node_modules/acorn/src/options.js +128 -0
  79. package/node_modules/acorn/src/parseutil.js +128 -0
  80. package/node_modules/acorn/src/state.js +111 -0
  81. package/node_modules/acorn/src/statement.js +744 -0
  82. package/node_modules/acorn/src/tokencontext.js +110 -0
  83. package/node_modules/acorn/src/tokenize.js +686 -0
  84. package/node_modules/acorn/src/tokentype.js +147 -0
  85. package/node_modules/acorn/src/util.js +9 -0
  86. package/node_modules/acorn/src/walk/index.js +342 -0
  87. package/node_modules/acorn/src/whitespace.js +13 -0
  88. package/node_modules/arr-diff/LICENSE +21 -0
  89. package/node_modules/arr-diff/README.md +74 -0
  90. package/node_modules/arr-diff/index.js +58 -0
  91. package/node_modules/arr-diff/package.json +49 -0
  92. package/node_modules/arr-flatten/LICENSE +21 -0
  93. package/node_modules/arr-flatten/README.md +86 -0
  94. package/node_modules/arr-flatten/index.js +22 -0
  95. package/node_modules/arr-flatten/package.json +76 -0
  96. package/node_modules/array-unique/LICENSE +21 -0
  97. package/node_modules/array-unique/README.md +51 -0
  98. package/node_modules/array-unique/index.js +28 -0
  99. package/node_modules/array-unique/package.json +37 -0
  100. package/node_modules/atob/LICENSE +230 -0
  101. package/node_modules/atob/LICENSE.DOCS +319 -0
  102. package/node_modules/atob/README.md +49 -0
  103. package/node_modules/atob/bin/atob.js +6 -0
  104. package/node_modules/atob/bower.json +24 -0
  105. package/node_modules/atob/browser-atob.js +44 -0
  106. package/node_modules/atob/node-atob.js +7 -0
  107. package/node_modules/atob/package.json +24 -0
  108. package/node_modules/atob/test.js +18 -0
  109. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  110. package/node_modules/balanced-match/LICENSE.md +21 -0
  111. package/node_modules/balanced-match/README.md +97 -0
  112. package/node_modules/balanced-match/index.js +62 -0
  113. package/node_modules/balanced-match/package.json +48 -0
  114. package/node_modules/brace-expansion/LICENSE +21 -0
  115. package/node_modules/brace-expansion/README.md +129 -0
  116. package/node_modules/brace-expansion/index.js +201 -0
  117. package/node_modules/brace-expansion/package.json +47 -0
  118. package/node_modules/clone-stats/LICENSE.md +21 -0
  119. package/node_modules/clone-stats/README.md +17 -0
  120. package/node_modules/clone-stats/index.js +13 -0
  121. package/node_modules/clone-stats/package.json +31 -0
  122. package/node_modules/clone-stats/test.js +36 -0
  123. package/node_modules/code-point-at/index.js +32 -0
  124. package/node_modules/code-point-at/license +21 -0
  125. package/node_modules/code-point-at/package.json +38 -0
  126. package/node_modules/code-point-at/readme.md +32 -0
  127. package/node_modules/concat-map/.travis.yml +4 -0
  128. package/node_modules/concat-map/LICENSE +18 -0
  129. package/node_modules/concat-map/README.markdown +62 -0
  130. package/node_modules/concat-map/example/map.js +6 -0
  131. package/node_modules/concat-map/index.js +13 -0
  132. package/node_modules/concat-map/package.json +43 -0
  133. package/node_modules/concat-map/test/map.js +39 -0
  134. package/node_modules/convert-source-map/LICENSE +23 -0
  135. package/node_modules/convert-source-map/README.md +123 -0
  136. package/node_modules/convert-source-map/index.js +179 -0
  137. package/node_modules/convert-source-map/package.json +41 -0
  138. package/node_modules/core-util-is/LICENSE +19 -0
  139. package/node_modules/core-util-is/README.md +3 -0
  140. package/node_modules/core-util-is/lib/util.js +107 -0
  141. package/node_modules/core-util-is/package.json +38 -0
  142. package/node_modules/css/History.md +75 -0
  143. package/node_modules/css/LICENSE +9 -0
  144. package/node_modules/css/Readme.md +314 -0
  145. package/node_modules/css/index.js +2 -0
  146. package/node_modules/css/lib/parse/index.js +603 -0
  147. package/node_modules/css/lib/stringify/compiler.js +50 -0
  148. package/node_modules/css/lib/stringify/compress.js +199 -0
  149. package/node_modules/css/lib/stringify/identity.js +254 -0
  150. package/node_modules/css/lib/stringify/index.js +47 -0
  151. package/node_modules/css/lib/stringify/source-map-support.js +126 -0
  152. package/node_modules/css/package.json +39 -0
  153. package/node_modules/debug-fabulous/LICENSE +21 -0
  154. package/node_modules/debug-fabulous/README.md +29 -0
  155. package/node_modules/debug-fabulous/index.js +11 -0
  156. package/node_modules/debug-fabulous/node_modules/debug/.coveralls.yml +1 -0
  157. package/node_modules/debug-fabulous/node_modules/debug/.eslintrc +11 -0
  158. package/node_modules/debug-fabulous/node_modules/debug/.npmignore +9 -0
  159. package/node_modules/debug-fabulous/node_modules/debug/.travis.yml +14 -0
  160. package/node_modules/debug-fabulous/node_modules/debug/CHANGELOG.md +362 -0
  161. package/node_modules/debug-fabulous/node_modules/debug/LICENSE +19 -0
  162. package/node_modules/debug-fabulous/node_modules/debug/Makefile +50 -0
  163. package/node_modules/debug-fabulous/node_modules/debug/README.md +312 -0
  164. package/node_modules/debug-fabulous/node_modules/debug/component.json +19 -0
  165. package/node_modules/debug-fabulous/node_modules/debug/karma.conf.js +70 -0
  166. package/node_modules/debug-fabulous/node_modules/debug/node.js +1 -0
  167. package/node_modules/debug-fabulous/node_modules/debug/package.json +49 -0
  168. package/node_modules/debug-fabulous/node_modules/debug/src/browser.js +185 -0
  169. package/node_modules/debug-fabulous/node_modules/debug/src/debug.js +202 -0
  170. package/node_modules/debug-fabulous/node_modules/debug/src/index.js +10 -0
  171. package/node_modules/debug-fabulous/node_modules/debug/src/inspector-log.js +15 -0
  172. package/node_modules/debug-fabulous/node_modules/debug/src/node.js +248 -0
  173. package/node_modules/debug-fabulous/node_modules/ms/index.js +152 -0
  174. package/node_modules/debug-fabulous/node_modules/ms/license.md +21 -0
  175. package/node_modules/debug-fabulous/node_modules/ms/package.json +37 -0
  176. package/node_modules/debug-fabulous/node_modules/ms/readme.md +51 -0
  177. package/node_modules/debug-fabulous/node_modules/object-assign/index.js +83 -0
  178. package/node_modules/debug-fabulous/node_modules/object-assign/license +21 -0
  179. package/node_modules/debug-fabulous/node_modules/object-assign/package.json +42 -0
  180. package/node_modules/debug-fabulous/node_modules/object-assign/readme.md +56 -0
  181. package/node_modules/debug-fabulous/package.json +32 -0
  182. package/node_modules/debug-fabulous/src/lazy-debug.js +9 -0
  183. package/node_modules/debug-fabulous/src/lazy-eval.js +50 -0
  184. package/node_modules/decode-uri-component/index.js +94 -0
  185. package/node_modules/decode-uri-component/license +9 -0
  186. package/node_modules/decode-uri-component/package.json +37 -0
  187. package/node_modules/decode-uri-component/readme.md +83 -0
  188. package/node_modules/detect-newline/index.js +24 -0
  189. package/node_modules/detect-newline/license +21 -0
  190. package/node_modules/detect-newline/package.json +37 -0
  191. package/node_modules/detect-newline/readme.md +42 -0
  192. package/node_modules/duplexify/.travis.yml +6 -0
  193. package/node_modules/duplexify/LICENSE +21 -0
  194. package/node_modules/duplexify/README.md +97 -0
  195. package/node_modules/duplexify/example.js +21 -0
  196. package/node_modules/duplexify/index.js +234 -0
  197. package/node_modules/duplexify/package.json +39 -0
  198. package/node_modules/duplexify/test.js +295 -0
  199. package/node_modules/end-of-stream/LICENSE +21 -0
  200. package/node_modules/end-of-stream/README.md +54 -0
  201. package/node_modules/end-of-stream/index.js +94 -0
  202. package/node_modules/end-of-stream/package.json +37 -0
  203. package/node_modules/error-ex/LICENSE +21 -0
  204. package/node_modules/error-ex/README.md +144 -0
  205. package/node_modules/error-ex/index.js +141 -0
  206. package/node_modules/error-ex/package.json +46 -0
  207. package/node_modules/expand-brackets/LICENSE +21 -0
  208. package/node_modules/expand-brackets/README.md +107 -0
  209. package/node_modules/expand-brackets/index.js +163 -0
  210. package/node_modules/expand-brackets/package.json +62 -0
  211. package/node_modules/expand-range/LICENSE +24 -0
  212. package/node_modules/expand-range/README.md +145 -0
  213. package/node_modules/expand-range/index.js +43 -0
  214. package/node_modules/expand-range/node_modules/fill-range/LICENSE +21 -0
  215. package/node_modules/expand-range/node_modules/fill-range/README.md +317 -0
  216. package/node_modules/expand-range/node_modules/fill-range/index.js +408 -0
  217. package/node_modules/expand-range/node_modules/fill-range/package.json +78 -0
  218. package/node_modules/expand-range/node_modules/is-number/LICENSE +21 -0
  219. package/node_modules/expand-range/node_modules/is-number/README.md +103 -0
  220. package/node_modules/expand-range/node_modules/is-number/index.js +19 -0
  221. package/node_modules/expand-range/node_modules/is-number/package.json +59 -0
  222. package/node_modules/expand-range/node_modules/kind-of/LICENSE +21 -0
  223. package/node_modules/expand-range/node_modules/kind-of/README.md +261 -0
  224. package/node_modules/expand-range/node_modules/kind-of/index.js +116 -0
  225. package/node_modules/expand-range/node_modules/kind-of/package.json +90 -0
  226. package/node_modules/expand-range/package.json +73 -0
  227. package/node_modules/extend/.editorconfig +20 -0
  228. package/node_modules/extend/.eslintrc +17 -0
  229. package/node_modules/extend/.jscs.json +175 -0
  230. package/node_modules/extend/.travis.yml +230 -0
  231. package/node_modules/extend/CHANGELOG.md +83 -0
  232. package/node_modules/extend/LICENSE +23 -0
  233. package/node_modules/extend/README.md +81 -0
  234. package/node_modules/extend/component.json +32 -0
  235. package/node_modules/extend/index.js +117 -0
  236. package/node_modules/extend/package.json +42 -0
  237. package/node_modules/extend-shallow/LICENSE +21 -0
  238. package/node_modules/extend-shallow/README.md +61 -0
  239. package/node_modules/extend-shallow/index.js +33 -0
  240. package/node_modules/extend-shallow/package.json +56 -0
  241. package/node_modules/extglob/LICENSE +21 -0
  242. package/node_modules/extglob/README.md +88 -0
  243. package/node_modules/extglob/index.js +178 -0
  244. package/node_modules/extglob/node_modules/is-extglob/LICENSE +21 -0
  245. package/node_modules/extglob/node_modules/is-extglob/README.md +75 -0
  246. package/node_modules/extglob/node_modules/is-extglob/index.js +11 -0
  247. package/node_modules/extglob/node_modules/is-extglob/package.json +48 -0
  248. package/node_modules/extglob/package.json +60 -0
  249. package/node_modules/filename-regex/LICENSE +21 -0
  250. package/node_modules/filename-regex/README.md +63 -0
  251. package/node_modules/filename-regex/index.js +10 -0
  252. package/node_modules/filename-regex/package.json +50 -0
  253. package/node_modules/first-chunk-stream/index.js +93 -0
  254. package/node_modules/first-chunk-stream/package.json +36 -0
  255. package/node_modules/first-chunk-stream/readme.md +62 -0
  256. package/node_modules/for-in/LICENSE +21 -0
  257. package/node_modules/for-in/README.md +85 -0
  258. package/node_modules/for-in/index.js +16 -0
  259. package/node_modules/for-in/package.json +68 -0
  260. package/node_modules/for-own/LICENSE +21 -0
  261. package/node_modules/for-own/README.md +85 -0
  262. package/node_modules/for-own/index.js +19 -0
  263. package/node_modules/for-own/package.json +70 -0
  264. package/node_modules/function-bind/.editorconfig +20 -0
  265. package/node_modules/function-bind/.eslintrc +15 -0
  266. package/node_modules/function-bind/.jscs.json +176 -0
  267. package/node_modules/function-bind/.npmignore +22 -0
  268. package/node_modules/function-bind/.travis.yml +168 -0
  269. package/node_modules/function-bind/LICENSE +20 -0
  270. package/node_modules/function-bind/README.md +48 -0
  271. package/node_modules/function-bind/implementation.js +52 -0
  272. package/node_modules/function-bind/index.js +5 -0
  273. package/node_modules/function-bind/package.json +63 -0
  274. package/node_modules/function-bind/test/.eslintrc +9 -0
  275. package/node_modules/function-bind/test/index.js +252 -0
  276. package/node_modules/glob-base/LICENSE +21 -0
  277. package/node_modules/glob-base/README.md +158 -0
  278. package/node_modules/glob-base/index.js +51 -0
  279. package/node_modules/glob-base/node_modules/glob-parent/.npmignore +4 -0
  280. package/node_modules/glob-base/node_modules/glob-parent/.travis.yml +8 -0
  281. package/node_modules/glob-base/node_modules/glob-parent/LICENSE +15 -0
  282. package/node_modules/glob-base/node_modules/glob-parent/README.md +43 -0
  283. package/node_modules/glob-base/node_modules/glob-parent/index.js +10 -0
  284. package/node_modules/glob-base/node_modules/glob-parent/package.json +35 -0
  285. package/node_modules/glob-base/node_modules/glob-parent/test.js +28 -0
  286. package/node_modules/glob-base/node_modules/is-extglob/LICENSE +21 -0
  287. package/node_modules/glob-base/node_modules/is-extglob/README.md +75 -0
  288. package/node_modules/glob-base/node_modules/is-extglob/index.js +11 -0
  289. package/node_modules/glob-base/node_modules/is-extglob/package.json +48 -0
  290. package/node_modules/glob-base/node_modules/is-glob/LICENSE +21 -0
  291. package/node_modules/glob-base/node_modules/is-glob/README.md +105 -0
  292. package/node_modules/glob-base/node_modules/is-glob/index.js +14 -0
  293. package/node_modules/glob-base/node_modules/is-glob/package.json +60 -0
  294. package/node_modules/glob-base/package.json +52 -0
  295. package/node_modules/glob-stream/LICENSE +21 -0
  296. package/node_modules/glob-stream/README.md +95 -0
  297. package/node_modules/glob-stream/index.js +209 -0
  298. package/node_modules/glob-stream/node_modules/braces/LICENSE +21 -0
  299. package/node_modules/glob-stream/node_modules/braces/README.md +248 -0
  300. package/node_modules/glob-stream/node_modules/braces/index.js +399 -0
  301. package/node_modules/glob-stream/node_modules/braces/package.json +83 -0
  302. package/node_modules/glob-stream/node_modules/glob/LICENSE +15 -0
  303. package/node_modules/glob-stream/node_modules/glob/README.md +377 -0
  304. package/node_modules/glob-stream/node_modules/glob/common.js +245 -0
  305. package/node_modules/glob-stream/node_modules/glob/glob.js +752 -0
  306. package/node_modules/glob-stream/node_modules/glob/package.json +42 -0
  307. package/node_modules/glob-stream/node_modules/glob/sync.js +460 -0
  308. package/node_modules/glob-stream/node_modules/glob-parent/LICENSE +15 -0
  309. package/node_modules/glob-stream/node_modules/glob-parent/README.md +109 -0
  310. package/node_modules/glob-stream/node_modules/glob-parent/index.js +24 -0
  311. package/node_modules/glob-stream/node_modules/glob-parent/package.json +42 -0
  312. package/node_modules/glob-stream/node_modules/is-glob/LICENSE +21 -0
  313. package/node_modules/glob-stream/node_modules/is-glob/README.md +142 -0
  314. package/node_modules/glob-stream/node_modules/is-glob/index.js +25 -0
  315. package/node_modules/glob-stream/node_modules/is-glob/package.json +80 -0
  316. package/node_modules/glob-stream/node_modules/isarray/README.md +54 -0
  317. package/node_modules/glob-stream/node_modules/isarray/build/build.js +209 -0
  318. package/node_modules/glob-stream/node_modules/isarray/component.json +19 -0
  319. package/node_modules/glob-stream/node_modules/isarray/index.js +3 -0
  320. package/node_modules/glob-stream/node_modules/isarray/package.json +25 -0
  321. package/node_modules/glob-stream/node_modules/kind-of/LICENSE +21 -0
  322. package/node_modules/glob-stream/node_modules/kind-of/README.md +261 -0
  323. package/node_modules/glob-stream/node_modules/kind-of/index.js +116 -0
  324. package/node_modules/glob-stream/node_modules/kind-of/package.json +90 -0
  325. package/node_modules/glob-stream/node_modules/micromatch/LICENSE +21 -0
  326. package/node_modules/glob-stream/node_modules/micromatch/README.md +689 -0
  327. package/node_modules/glob-stream/node_modules/micromatch/index.js +431 -0
  328. package/node_modules/glob-stream/node_modules/micromatch/lib/chars.js +67 -0
  329. package/node_modules/glob-stream/node_modules/micromatch/lib/expand.js +304 -0
  330. package/node_modules/glob-stream/node_modules/micromatch/lib/glob.js +193 -0
  331. package/node_modules/glob-stream/node_modules/micromatch/lib/utils.js +149 -0
  332. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/LICENSE +21 -0
  333. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/README.md +75 -0
  334. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/index.js +11 -0
  335. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-extglob/package.json +48 -0
  336. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/LICENSE +21 -0
  337. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/README.md +105 -0
  338. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/index.js +14 -0
  339. package/node_modules/glob-stream/node_modules/micromatch/node_modules/is-glob/package.json +60 -0
  340. package/node_modules/glob-stream/node_modules/micromatch/package.json +114 -0
  341. package/node_modules/glob-stream/node_modules/normalize-path/LICENSE +21 -0
  342. package/node_modules/glob-stream/node_modules/normalize-path/README.md +92 -0
  343. package/node_modules/glob-stream/node_modules/normalize-path/index.js +19 -0
  344. package/node_modules/glob-stream/node_modules/normalize-path/package.json +78 -0
  345. package/node_modules/glob-stream/node_modules/readable-stream/.npmignore +5 -0
  346. package/node_modules/glob-stream/node_modules/readable-stream/LICENSE +18 -0
  347. package/node_modules/glob-stream/node_modules/readable-stream/README.md +15 -0
  348. package/node_modules/glob-stream/node_modules/readable-stream/duplex.js +1 -0
  349. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
  350. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
  351. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_readable.js +982 -0
  352. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_transform.js +210 -0
  353. package/node_modules/glob-stream/node_modules/readable-stream/lib/_stream_writable.js +386 -0
  354. package/node_modules/glob-stream/node_modules/readable-stream/package.json +32 -0
  355. package/node_modules/glob-stream/node_modules/readable-stream/passthrough.js +1 -0
  356. package/node_modules/glob-stream/node_modules/readable-stream/readable.js +11 -0
  357. package/node_modules/glob-stream/node_modules/readable-stream/transform.js +1 -0
  358. package/node_modules/glob-stream/node_modules/readable-stream/writable.js +1 -0
  359. package/node_modules/glob-stream/node_modules/string_decoder/.npmignore +2 -0
  360. package/node_modules/glob-stream/node_modules/string_decoder/LICENSE +20 -0
  361. package/node_modules/glob-stream/node_modules/string_decoder/README.md +7 -0
  362. package/node_modules/glob-stream/node_modules/string_decoder/index.js +221 -0
  363. package/node_modules/glob-stream/node_modules/string_decoder/package.json +25 -0
  364. package/node_modules/glob-stream/node_modules/through2/.npmignore +3 -0
  365. package/node_modules/glob-stream/node_modules/through2/LICENSE +39 -0
  366. package/node_modules/glob-stream/node_modules/through2/README.md +132 -0
  367. package/node_modules/glob-stream/node_modules/through2/package.json +31 -0
  368. package/node_modules/glob-stream/node_modules/through2/through2.js +96 -0
  369. package/node_modules/glob-stream/package.json +51 -0
  370. package/node_modules/graceful-fs/LICENSE +15 -0
  371. package/node_modules/graceful-fs/README.md +143 -0
  372. package/node_modules/graceful-fs/clone.js +23 -0
  373. package/node_modules/graceful-fs/graceful-fs.js +448 -0
  374. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  375. package/node_modules/graceful-fs/package.json +50 -0
  376. package/node_modules/graceful-fs/polyfills.js +355 -0
  377. package/node_modules/gulp-sourcemaps/LICENSE.md +15 -0
  378. package/node_modules/gulp-sourcemaps/README.md +395 -0
  379. package/node_modules/gulp-sourcemaps/index.js +7 -0
  380. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/index.js +17 -0
  381. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/license +21 -0
  382. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/package.json +42 -0
  383. package/node_modules/gulp-sourcemaps/node_modules/strip-bom/readme.md +39 -0
  384. package/node_modules/gulp-sourcemaps/node_modules/through2/LICENSE.md +9 -0
  385. package/node_modules/gulp-sourcemaps/node_modules/through2/README.md +134 -0
  386. package/node_modules/gulp-sourcemaps/node_modules/through2/package.json +33 -0
  387. package/node_modules/gulp-sourcemaps/node_modules/through2/through2.js +96 -0
  388. package/node_modules/gulp-sourcemaps/package.json +64 -0
  389. package/node_modules/gulp-sourcemaps/src/init/index.internals.js +122 -0
  390. package/node_modules/gulp-sourcemaps/src/init/index.js +141 -0
  391. package/node_modules/gulp-sourcemaps/src/utils.js +81 -0
  392. package/node_modules/gulp-sourcemaps/src/write/index.internals.js +181 -0
  393. package/node_modules/gulp-sourcemaps/src/write/index.js +71 -0
  394. package/node_modules/has/LICENSE-MIT +22 -0
  395. package/node_modules/has/README.md +18 -0
  396. package/node_modules/has/package.json +48 -0
  397. package/node_modules/has/src/index.js +5 -0
  398. package/node_modules/has/test/index.js +10 -0
  399. package/node_modules/has-ansi/index.js +4 -0
  400. package/node_modules/has-ansi/license +21 -0
  401. package/node_modules/has-ansi/node_modules/ansi-regex/index.js +4 -0
  402. package/node_modules/has-ansi/node_modules/ansi-regex/license +21 -0
  403. package/node_modules/has-ansi/node_modules/ansi-regex/package.json +64 -0
  404. package/node_modules/has-ansi/node_modules/ansi-regex/readme.md +39 -0
  405. package/node_modules/has-ansi/package.json +55 -0
  406. package/node_modules/has-ansi/readme.md +36 -0
  407. package/node_modules/hosted-git-info/CHANGELOG.md +151 -0
  408. package/node_modules/hosted-git-info/LICENSE +13 -0
  409. package/node_modules/hosted-git-info/README.md +133 -0
  410. package/node_modules/hosted-git-info/git-host-info.js +79 -0
  411. package/node_modules/hosted-git-info/git-host.js +156 -0
  412. package/node_modules/hosted-git-info/index.js +148 -0
  413. package/node_modules/hosted-git-info/package.json +40 -0
  414. package/node_modules/inflight/LICENSE +15 -0
  415. package/node_modules/inflight/README.md +37 -0
  416. package/node_modules/inflight/inflight.js +54 -0
  417. package/node_modules/inflight/package.json +29 -0
  418. package/node_modules/inherits/LICENSE +16 -0
  419. package/node_modules/inherits/README.md +42 -0
  420. package/node_modules/inherits/inherits.js +9 -0
  421. package/node_modules/inherits/inherits_browser.js +27 -0
  422. package/node_modules/inherits/package.json +29 -0
  423. package/node_modules/invert-kv/index.js +15 -0
  424. package/node_modules/invert-kv/package.json +33 -0
  425. package/node_modules/invert-kv/readme.md +25 -0
  426. package/node_modules/is-arrayish/.editorconfig +18 -0
  427. package/node_modules/is-arrayish/.istanbul.yml +4 -0
  428. package/node_modules/is-arrayish/.npmignore +5 -0
  429. package/node_modules/is-arrayish/.travis.yml +17 -0
  430. package/node_modules/is-arrayish/LICENSE +21 -0
  431. package/node_modules/is-arrayish/README.md +16 -0
  432. package/node_modules/is-arrayish/index.js +10 -0
  433. package/node_modules/is-arrayish/package.json +34 -0
  434. package/node_modules/is-buffer/LICENSE +21 -0
  435. package/node_modules/is-buffer/README.md +53 -0
  436. package/node_modules/is-buffer/index.js +21 -0
  437. package/node_modules/is-buffer/package.json +51 -0
  438. package/node_modules/is-buffer/test/basic.js +24 -0
  439. package/node_modules/is-core-module/.eslintrc +18 -0
  440. package/node_modules/is-core-module/.nycrc +9 -0
  441. package/node_modules/is-core-module/CHANGELOG.md +151 -0
  442. package/node_modules/is-core-module/LICENSE +20 -0
  443. package/node_modules/is-core-module/README.md +40 -0
  444. package/node_modules/is-core-module/core.json +155 -0
  445. package/node_modules/is-core-module/index.js +69 -0
  446. package/node_modules/is-core-module/package.json +72 -0
  447. package/node_modules/is-core-module/test/index.js +133 -0
  448. package/node_modules/is-dotfile/LICENSE +21 -0
  449. package/node_modules/is-dotfile/README.md +95 -0
  450. package/node_modules/is-dotfile/index.js +14 -0
  451. package/node_modules/is-dotfile/package.json +69 -0
  452. package/node_modules/is-equal-shallow/LICENSE +21 -0
  453. package/node_modules/is-equal-shallow/README.md +90 -0
  454. package/node_modules/is-equal-shallow/index.js +27 -0
  455. package/node_modules/is-equal-shallow/package.json +54 -0
  456. package/node_modules/is-extendable/LICENSE +21 -0
  457. package/node_modules/is-extendable/README.md +72 -0
  458. package/node_modules/is-extendable/index.js +13 -0
  459. package/node_modules/is-extendable/package.json +51 -0
  460. package/node_modules/is-extglob/LICENSE +21 -0
  461. package/node_modules/is-extglob/README.md +107 -0
  462. package/node_modules/is-extglob/index.js +20 -0
  463. package/node_modules/is-extglob/package.json +69 -0
  464. package/node_modules/is-posix-bracket/LICENSE +21 -0
  465. package/node_modules/is-posix-bracket/README.md +88 -0
  466. package/node_modules/is-posix-bracket/index.js +10 -0
  467. package/node_modules/is-posix-bracket/package.json +64 -0
  468. package/node_modules/is-primitive/LICENSE +21 -0
  469. package/node_modules/is-primitive/README.md +57 -0
  470. package/node_modules/is-primitive/index.js +13 -0
  471. package/node_modules/is-primitive/package.json +46 -0
  472. package/node_modules/is-utf8/LICENSE +9 -0
  473. package/node_modules/is-utf8/README.md +16 -0
  474. package/node_modules/is-utf8/is-utf8.js +76 -0
  475. package/node_modules/is-utf8/package.json +19 -0
  476. package/node_modules/is-valid-glob/LICENSE +21 -0
  477. package/node_modules/is-valid-glob/README.md +88 -0
  478. package/node_modules/is-valid-glob/index.js +21 -0
  479. package/node_modules/is-valid-glob/package.json +51 -0
  480. package/node_modules/isarray/.npmignore +1 -0
  481. package/node_modules/isarray/.travis.yml +4 -0
  482. package/node_modules/isarray/Makefile +6 -0
  483. package/node_modules/isarray/README.md +60 -0
  484. package/node_modules/isarray/component.json +19 -0
  485. package/node_modules/isarray/index.js +5 -0
  486. package/node_modules/isarray/package.json +45 -0
  487. package/node_modules/isarray/test.js +20 -0
  488. package/node_modules/isobject/LICENSE +21 -0
  489. package/node_modules/isobject/README.md +112 -0
  490. package/node_modules/isobject/index.js +14 -0
  491. package/node_modules/isobject/package.json +67 -0
  492. package/node_modules/json-stable-stringify-without-jsonify/.npmignore +1 -0
  493. package/node_modules/json-stable-stringify-without-jsonify/.travis.yml +4 -0
  494. package/node_modules/json-stable-stringify-without-jsonify/LICENSE +18 -0
  495. package/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js +7 -0
  496. package/node_modules/json-stable-stringify-without-jsonify/example/nested.js +3 -0
  497. package/node_modules/json-stable-stringify-without-jsonify/example/str.js +3 -0
  498. package/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js +7 -0
  499. package/node_modules/json-stable-stringify-without-jsonify/index.js +82 -0
  500. package/node_modules/json-stable-stringify-without-jsonify/package.json +43 -0
  501. package/node_modules/json-stable-stringify-without-jsonify/readme.markdown +132 -0
  502. package/node_modules/json-stable-stringify-without-jsonify/test/cmp.js +11 -0
  503. package/node_modules/json-stable-stringify-without-jsonify/test/nested.js +42 -0
  504. package/node_modules/json-stable-stringify-without-jsonify/test/replacer.js +74 -0
  505. package/node_modules/json-stable-stringify-without-jsonify/test/space.js +59 -0
  506. package/node_modules/json-stable-stringify-without-jsonify/test/str.js +32 -0
  507. package/node_modules/json-stable-stringify-without-jsonify/test/to-json.js +20 -0
  508. package/node_modules/kind-of/CHANGELOG.md +160 -0
  509. package/node_modules/kind-of/LICENSE +21 -0
  510. package/node_modules/kind-of/README.md +367 -0
  511. package/node_modules/kind-of/index.js +129 -0
  512. package/node_modules/kind-of/package.json +88 -0
  513. package/node_modules/lazy-debug-legacy/.npmignore +4 -0
  514. package/node_modules/lazy-debug-legacy/LICENSE.md +21 -0
  515. package/node_modules/lazy-debug-legacy/README.md +40 -0
  516. package/node_modules/lazy-debug-legacy/package.json +74 -0
  517. package/node_modules/lazy-debug-legacy/src/functions.js +116 -0
  518. package/node_modules/lazy-debug-legacy/src/index.js +30 -0
  519. package/node_modules/lazystream/LICENSE +23 -0
  520. package/node_modules/lazystream/README.md +114 -0
  521. package/node_modules/lazystream/lib/lazystream.js +54 -0
  522. package/node_modules/lazystream/package.json +46 -0
  523. package/node_modules/lazystream/test/data.md +13 -0
  524. package/node_modules/lazystream/test/fs_test.js +69 -0
  525. package/node_modules/lazystream/test/helper.js +39 -0
  526. package/node_modules/lazystream/test/pipe_test.js +36 -0
  527. package/node_modules/lazystream/test/readable_test.js +90 -0
  528. package/node_modules/lazystream/test/writable_test.js +59 -0
  529. package/node_modules/lcid/index.js +22 -0
  530. package/node_modules/lcid/lcid.json +203 -0
  531. package/node_modules/lcid/license +21 -0
  532. package/node_modules/lcid/package.json +46 -0
  533. package/node_modules/lcid/readme.md +35 -0
  534. package/node_modules/lodash._reinterpolate/LICENSE.txt +22 -0
  535. package/node_modules/lodash._reinterpolate/README.md +20 -0
  536. package/node_modules/lodash._reinterpolate/index.js +13 -0
  537. package/node_modules/lodash._reinterpolate/package.json +18 -0
  538. package/node_modules/lodash.assign/LICENSE +47 -0
  539. package/node_modules/lodash.assign/README.md +18 -0
  540. package/node_modules/lodash.assign/index.js +637 -0
  541. package/node_modules/lodash.assign/package.json +17 -0
  542. package/node_modules/lodash.assigninwith/LICENSE +47 -0
  543. package/node_modules/lodash.assigninwith/README.md +18 -0
  544. package/node_modules/lodash.assigninwith/index.js +624 -0
  545. package/node_modules/lodash.assigninwith/package.json +17 -0
  546. package/node_modules/lodash.isequal/LICENSE +47 -0
  547. package/node_modules/lodash.isequal/README.md +18 -0
  548. package/node_modules/lodash.isequal/index.js +1848 -0
  549. package/node_modules/lodash.isequal/package.json +16 -0
  550. package/node_modules/lodash.keys/LICENSE +47 -0
  551. package/node_modules/lodash.keys/README.md +18 -0
  552. package/node_modules/lodash.keys/index.js +401 -0
  553. package/node_modules/lodash.keys/package.json +17 -0
  554. package/node_modules/lodash.rest/LICENSE +47 -0
  555. package/node_modules/lodash.rest/README.md +18 -0
  556. package/node_modules/lodash.rest/index.js +323 -0
  557. package/node_modules/lodash.rest/package.json +17 -0
  558. package/node_modules/lodash.template/LICENSE +47 -0
  559. package/node_modules/lodash.template/README.md +18 -0
  560. package/node_modules/lodash.template/index.js +657 -0
  561. package/node_modules/lodash.template/package.json +25 -0
  562. package/node_modules/lodash.templatesettings/LICENSE +47 -0
  563. package/node_modules/lodash.templatesettings/README.md +18 -0
  564. package/node_modules/lodash.templatesettings/index.js +382 -0
  565. package/node_modules/lodash.templatesettings/package.json +19 -0
  566. package/node_modules/lodash.tostring/LICENSE +47 -0
  567. package/node_modules/lodash.tostring/README.md +18 -0
  568. package/node_modules/lodash.tostring/index.js +137 -0
  569. package/node_modules/lodash.tostring/package.json +17 -0
  570. package/node_modules/map-stream/.npmignore +3 -0
  571. package/node_modules/map-stream/.travis.yml +4 -0
  572. package/node_modules/map-stream/LICENCE +24 -0
  573. package/node_modules/map-stream/examples/pretty.js +26 -0
  574. package/node_modules/map-stream/index.js +145 -0
  575. package/node_modules/map-stream/package/.npmignore +3 -0
  576. package/node_modules/map-stream/package/.travis.yml +4 -0
  577. package/node_modules/map-stream/package/LICENCE +22 -0
  578. package/node_modules/map-stream/package/examples/pretty.js +26 -0
  579. package/node_modules/map-stream/package/index.js +145 -0
  580. package/node_modules/map-stream/package/package.json +24 -0
  581. package/node_modules/map-stream/package/readme.markdown +37 -0
  582. package/node_modules/map-stream/package/test/simple-map.asynct.js +318 -0
  583. package/node_modules/map-stream/package.json +24 -0
  584. package/node_modules/map-stream/readme.markdown +37 -0
  585. package/node_modules/map-stream/test/simple-map.asynct.js +318 -0
  586. package/node_modules/math-random/.travis.yml +6 -0
  587. package/node_modules/math-random/browser.js +17 -0
  588. package/node_modules/math-random/node.js +13 -0
  589. package/node_modules/math-random/package.json +16 -0
  590. package/node_modules/math-random/readme.md +26 -0
  591. package/node_modules/math-random/test.js +21 -0
  592. package/node_modules/minimatch/LICENSE +15 -0
  593. package/node_modules/minimatch/README.md +230 -0
  594. package/node_modules/minimatch/minimatch.js +947 -0
  595. package/node_modules/minimatch/package.json +33 -0
  596. package/node_modules/minimist/.travis.yml +8 -0
  597. package/node_modules/minimist/LICENSE +18 -0
  598. package/node_modules/minimist/example/parse.js +2 -0
  599. package/node_modules/minimist/index.js +249 -0
  600. package/node_modules/minimist/package.json +45 -0
  601. package/node_modules/minimist/readme.markdown +98 -0
  602. package/node_modules/minimist/test/all_bool.js +32 -0
  603. package/node_modules/minimist/test/bool.js +178 -0
  604. package/node_modules/minimist/test/dash.js +31 -0
  605. package/node_modules/minimist/test/default_bool.js +35 -0
  606. package/node_modules/minimist/test/dotted.js +22 -0
  607. package/node_modules/minimist/test/kv_short.js +16 -0
  608. package/node_modules/minimist/test/long.js +31 -0
  609. package/node_modules/minimist/test/num.js +36 -0
  610. package/node_modules/minimist/test/parse.js +197 -0
  611. package/node_modules/minimist/test/parse_modified.js +9 -0
  612. package/node_modules/minimist/test/proto.js +60 -0
  613. package/node_modules/minimist/test/short.js +67 -0
  614. package/node_modules/minimist/test/stop_early.js +15 -0
  615. package/node_modules/minimist/test/unknown.js +102 -0
  616. package/node_modules/minimist/test/whitespace.js +8 -0
  617. package/node_modules/mkdirp/LICENSE +21 -0
  618. package/node_modules/mkdirp/bin/cmd.js +33 -0
  619. package/node_modules/mkdirp/bin/usage.txt +12 -0
  620. package/node_modules/mkdirp/index.js +102 -0
  621. package/node_modules/mkdirp/package.json +33 -0
  622. package/node_modules/mkdirp/readme.markdown +100 -0
  623. package/node_modules/module/.npmignore +1 -0
  624. package/node_modules/module/LICENSE +21 -0
  625. package/node_modules/module/README.md +35 -0
  626. package/node_modules/module/dist/cli.js +57 -0
  627. package/node_modules/module/dist/index.js +61 -0
  628. package/node_modules/module/node_modules/ansi-regex/index.js +4 -0
  629. package/node_modules/module/node_modules/ansi-regex/license +21 -0
  630. package/node_modules/module/node_modules/ansi-regex/package.json +64 -0
  631. package/node_modules/module/node_modules/ansi-regex/readme.md +39 -0
  632. package/node_modules/module/node_modules/ansi-styles/index.js +65 -0
  633. package/node_modules/module/node_modules/ansi-styles/license +21 -0
  634. package/node_modules/module/node_modules/ansi-styles/package.json +50 -0
  635. package/node_modules/module/node_modules/ansi-styles/readme.md +86 -0
  636. package/node_modules/module/node_modules/camelcase/index.js +56 -0
  637. package/node_modules/module/node_modules/camelcase/license +21 -0
  638. package/node_modules/module/node_modules/camelcase/package.json +39 -0
  639. package/node_modules/module/node_modules/camelcase/readme.md +57 -0
  640. package/node_modules/module/node_modules/chalk/index.js +116 -0
  641. package/node_modules/module/node_modules/chalk/license +21 -0
  642. package/node_modules/module/node_modules/chalk/package.json +70 -0
  643. package/node_modules/module/node_modules/chalk/readme.md +213 -0
  644. package/node_modules/module/node_modules/cliui/CHANGELOG.md +15 -0
  645. package/node_modules/module/node_modules/cliui/LICENSE.txt +14 -0
  646. package/node_modules/module/node_modules/cliui/README.md +110 -0
  647. package/node_modules/module/node_modules/cliui/index.js +316 -0
  648. package/node_modules/module/node_modules/cliui/package.json +64 -0
  649. package/node_modules/module/node_modules/concat-stream/LICENSE +24 -0
  650. package/node_modules/module/node_modules/concat-stream/index.js +136 -0
  651. package/node_modules/module/node_modules/concat-stream/package.json +54 -0
  652. package/node_modules/module/node_modules/concat-stream/readme.md +100 -0
  653. package/node_modules/module/node_modules/decamelize/index.js +13 -0
  654. package/node_modules/module/node_modules/decamelize/license +21 -0
  655. package/node_modules/module/node_modules/decamelize/package.json +38 -0
  656. package/node_modules/module/node_modules/decamelize/readme.md +48 -0
  657. package/node_modules/module/node_modules/escape-string-regexp/index.js +11 -0
  658. package/node_modules/module/node_modules/escape-string-regexp/license +21 -0
  659. package/node_modules/module/node_modules/escape-string-regexp/package.json +41 -0
  660. package/node_modules/module/node_modules/escape-string-regexp/readme.md +27 -0
  661. package/node_modules/module/node_modules/find-up/index.js +53 -0
  662. package/node_modules/module/node_modules/find-up/license +21 -0
  663. package/node_modules/module/node_modules/find-up/package.json +51 -0
  664. package/node_modules/module/node_modules/find-up/readme.md +72 -0
  665. package/node_modules/module/node_modules/is-fullwidth-code-point/index.js +46 -0
  666. package/node_modules/module/node_modules/is-fullwidth-code-point/license +21 -0
  667. package/node_modules/module/node_modules/is-fullwidth-code-point/package.json +45 -0
  668. package/node_modules/module/node_modules/is-fullwidth-code-point/readme.md +39 -0
  669. package/node_modules/module/node_modules/load-json-file/index.js +21 -0
  670. package/node_modules/module/node_modules/load-json-file/license +21 -0
  671. package/node_modules/module/node_modules/load-json-file/package.json +46 -0
  672. package/node_modules/module/node_modules/load-json-file/readme.md +45 -0
  673. package/node_modules/module/node_modules/parse-json/index.js +35 -0
  674. package/node_modules/module/node_modules/parse-json/license +21 -0
  675. package/node_modules/module/node_modules/parse-json/package.json +46 -0
  676. package/node_modules/module/node_modules/parse-json/readme.md +83 -0
  677. package/node_modules/module/node_modules/parse-json/vendor/parse.js +752 -0
  678. package/node_modules/module/node_modules/parse-json/vendor/unicode.js +71 -0
  679. package/node_modules/module/node_modules/path-exists/index.js +24 -0
  680. package/node_modules/module/node_modules/path-exists/license +21 -0
  681. package/node_modules/module/node_modules/path-exists/package.json +40 -0
  682. package/node_modules/module/node_modules/path-exists/readme.md +45 -0
  683. package/node_modules/module/node_modules/path-type/index.js +29 -0
  684. package/node_modules/module/node_modules/path-type/license +21 -0
  685. package/node_modules/module/node_modules/path-type/package.json +52 -0
  686. package/node_modules/module/node_modules/path-type/readme.md +42 -0
  687. package/node_modules/module/node_modules/pify/index.js +68 -0
  688. package/node_modules/module/node_modules/pify/license +21 -0
  689. package/node_modules/module/node_modules/pify/package.json +48 -0
  690. package/node_modules/module/node_modules/pify/readme.md +119 -0
  691. package/node_modules/module/node_modules/pkg-conf/index.js +62 -0
  692. package/node_modules/module/node_modules/pkg-conf/license +21 -0
  693. package/node_modules/module/node_modules/pkg-conf/package.json +51 -0
  694. package/node_modules/module/node_modules/pkg-conf/readme.md +86 -0
  695. package/node_modules/module/node_modules/process-nextick-args/.travis.yml +12 -0
  696. package/node_modules/module/node_modules/process-nextick-args/index.js +43 -0
  697. package/node_modules/module/node_modules/process-nextick-args/license.md +19 -0
  698. package/node_modules/module/node_modules/process-nextick-args/package.json +22 -0
  699. package/node_modules/module/node_modules/process-nextick-args/readme.md +18 -0
  700. package/node_modules/module/node_modules/process-nextick-args/test.js +24 -0
  701. package/node_modules/module/node_modules/read-pkg/index.js +48 -0
  702. package/node_modules/module/node_modules/read-pkg/license +21 -0
  703. package/node_modules/module/node_modules/read-pkg/package.json +42 -0
  704. package/node_modules/module/node_modules/read-pkg/readme.md +79 -0
  705. package/node_modules/module/node_modules/read-pkg-up/index.js +31 -0
  706. package/node_modules/module/node_modules/read-pkg-up/license +21 -0
  707. package/node_modules/module/node_modules/read-pkg-up/package.json +59 -0
  708. package/node_modules/module/node_modules/read-pkg-up/readme.md +79 -0
  709. package/node_modules/module/node_modules/readable-stream/.npmignore +5 -0
  710. package/node_modules/module/node_modules/readable-stream/.travis.yml +52 -0
  711. package/node_modules/module/node_modules/readable-stream/.zuul.yml +1 -0
  712. package/node_modules/module/node_modules/readable-stream/LICENSE +18 -0
  713. package/node_modules/module/node_modules/readable-stream/README.md +36 -0
  714. package/node_modules/module/node_modules/readable-stream/doc/stream.markdown +1760 -0
  715. package/node_modules/module/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  716. package/node_modules/module/node_modules/readable-stream/duplex.js +1 -0
  717. package/node_modules/module/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
  718. package/node_modules/module/node_modules/readable-stream/lib/_stream_passthrough.js +26 -0
  719. package/node_modules/module/node_modules/readable-stream/lib/_stream_readable.js +880 -0
  720. package/node_modules/module/node_modules/readable-stream/lib/_stream_transform.js +180 -0
  721. package/node_modules/module/node_modules/readable-stream/lib/_stream_writable.js +516 -0
  722. package/node_modules/module/node_modules/readable-stream/package.json +37 -0
  723. package/node_modules/module/node_modules/readable-stream/passthrough.js +1 -0
  724. package/node_modules/module/node_modules/readable-stream/readable.js +12 -0
  725. package/node_modules/module/node_modules/readable-stream/transform.js +1 -0
  726. package/node_modules/module/node_modules/readable-stream/writable.js +1 -0
  727. package/node_modules/module/node_modules/string-width/index.js +37 -0
  728. package/node_modules/module/node_modules/string-width/license +21 -0
  729. package/node_modules/module/node_modules/string-width/package.json +56 -0
  730. package/node_modules/module/node_modules/string-width/readme.md +42 -0
  731. package/node_modules/module/node_modules/string_decoder/.npmignore +2 -0
  732. package/node_modules/module/node_modules/string_decoder/LICENSE +20 -0
  733. package/node_modules/module/node_modules/string_decoder/README.md +7 -0
  734. package/node_modules/module/node_modules/string_decoder/index.js +221 -0
  735. package/node_modules/module/node_modules/string_decoder/package.json +25 -0
  736. package/node_modules/module/node_modules/strip-ansi/index.js +6 -0
  737. package/node_modules/module/node_modules/strip-ansi/license +21 -0
  738. package/node_modules/module/node_modules/strip-ansi/package.json +57 -0
  739. package/node_modules/module/node_modules/strip-ansi/readme.md +33 -0
  740. package/node_modules/module/node_modules/strip-bom/index.js +17 -0
  741. package/node_modules/module/node_modules/strip-bom/license +21 -0
  742. package/node_modules/module/node_modules/strip-bom/package.json +42 -0
  743. package/node_modules/module/node_modules/strip-bom/readme.md +39 -0
  744. package/node_modules/module/node_modules/supports-color/index.js +50 -0
  745. package/node_modules/module/node_modules/supports-color/license +21 -0
  746. package/node_modules/module/node_modules/supports-color/package.json +49 -0
  747. package/node_modules/module/node_modules/supports-color/readme.md +36 -0
  748. package/node_modules/module/node_modules/wrap-ansi/index.js +168 -0
  749. package/node_modules/module/node_modules/wrap-ansi/license +21 -0
  750. package/node_modules/module/node_modules/wrap-ansi/package.json +68 -0
  751. package/node_modules/module/node_modules/wrap-ansi/readme.md +73 -0
  752. package/node_modules/module/node_modules/y18n/CHANGELOG.md +6 -0
  753. package/node_modules/module/node_modules/y18n/LICENSE +13 -0
  754. package/node_modules/module/node_modules/y18n/README.md +91 -0
  755. package/node_modules/module/node_modules/y18n/index.js +172 -0
  756. package/node_modules/module/node_modules/y18n/package.json +37 -0
  757. package/node_modules/module/node_modules/yargs/CHANGELOG.md +589 -0
  758. package/node_modules/module/node_modules/yargs/LICENSE +22 -0
  759. package/node_modules/module/node_modules/yargs/README.md +1482 -0
  760. package/node_modules/module/node_modules/yargs/completion.sh.hbs +28 -0
  761. package/node_modules/module/node_modules/yargs/index.js +31 -0
  762. package/node_modules/module/node_modules/yargs/lib/command.js +151 -0
  763. package/node_modules/module/node_modules/yargs/lib/completion.js +99 -0
  764. package/node_modules/module/node_modules/yargs/lib/obj-filter.js +10 -0
  765. package/node_modules/module/node_modules/yargs/lib/usage.js +405 -0
  766. package/node_modules/module/node_modules/yargs/lib/validation.js +279 -0
  767. package/node_modules/module/node_modules/yargs/locales/de.json +37 -0
  768. package/node_modules/module/node_modules/yargs/locales/en.json +37 -0
  769. package/node_modules/module/node_modules/yargs/locales/es.json +37 -0
  770. package/node_modules/module/node_modules/yargs/locales/fr.json +37 -0
  771. package/node_modules/module/node_modules/yargs/locales/id.json +38 -0
  772. package/node_modules/module/node_modules/yargs/locales/it.json +37 -0
  773. package/node_modules/module/node_modules/yargs/locales/ja.json +37 -0
  774. package/node_modules/module/node_modules/yargs/locales/ko.json +37 -0
  775. package/node_modules/module/node_modules/yargs/locales/nb.json +37 -0
  776. package/node_modules/module/node_modules/yargs/locales/pirate.json +12 -0
  777. package/node_modules/module/node_modules/yargs/locales/pl.json +37 -0
  778. package/node_modules/module/node_modules/yargs/locales/pt.json +37 -0
  779. package/node_modules/module/node_modules/yargs/locales/pt_BR.json +37 -0
  780. package/node_modules/module/node_modules/yargs/locales/tr.json +37 -0
  781. package/node_modules/module/node_modules/yargs/locales/zh.json +37 -0
  782. package/node_modules/module/node_modules/yargs/package.json +72 -0
  783. package/node_modules/module/node_modules/yargs/yargs.js +730 -0
  784. package/node_modules/module/node_modules/yargs-parser/CHANGELOG.md +40 -0
  785. package/node_modules/module/node_modules/yargs-parser/LICENSE.txt +14 -0
  786. package/node_modules/module/node_modules/yargs-parser/README.md +209 -0
  787. package/node_modules/module/node_modules/yargs-parser/index.js +689 -0
  788. package/node_modules/module/node_modules/yargs-parser/lib/tokenize-arg-string.js +34 -0
  789. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/index.js +56 -0
  790. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/license +21 -0
  791. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/package.json +39 -0
  792. package/node_modules/module/node_modules/yargs-parser/node_modules/camelcase/readme.md +57 -0
  793. package/node_modules/module/node_modules/yargs-parser/package.json +44 -0
  794. package/node_modules/module/package.json +51 -0
  795. package/node_modules/module/templates/README.md +3 -0
  796. package/node_modules/module/templates/cli.js +6 -0
  797. package/node_modules/module/templates/gitignore +2 -0
  798. package/node_modules/module/templates/index.js +5 -0
  799. package/node_modules/module/templates/package.json +9 -0
  800. package/node_modules/normalize-package-data/AUTHORS +4 -0
  801. package/node_modules/normalize-package-data/LICENSE +30 -0
  802. package/node_modules/normalize-package-data/README.md +106 -0
  803. package/node_modules/normalize-package-data/lib/extract_description.js +14 -0
  804. package/node_modules/normalize-package-data/lib/fixer.js +418 -0
  805. package/node_modules/normalize-package-data/lib/make_warning.js +23 -0
  806. package/node_modules/normalize-package-data/lib/normalize.js +39 -0
  807. package/node_modules/normalize-package-data/lib/safe_format.js +9 -0
  808. package/node_modules/normalize-package-data/lib/typos.json +25 -0
  809. package/node_modules/normalize-package-data/lib/warning_messages.json +30 -0
  810. package/node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md +39 -0
  811. package/node_modules/normalize-package-data/node_modules/semver/LICENSE +15 -0
  812. package/node_modules/normalize-package-data/node_modules/semver/README.md +412 -0
  813. package/node_modules/normalize-package-data/node_modules/semver/bin/semver +160 -0
  814. package/node_modules/normalize-package-data/node_modules/semver/package.json +28 -0
  815. package/node_modules/normalize-package-data/node_modules/semver/range.bnf +16 -0
  816. package/node_modules/normalize-package-data/node_modules/semver/semver.js +1483 -0
  817. package/node_modules/normalize-package-data/package.json +31 -0
  818. package/node_modules/number-is-nan/index.js +4 -0
  819. package/node_modules/number-is-nan/license +21 -0
  820. package/node_modules/number-is-nan/package.json +35 -0
  821. package/node_modules/number-is-nan/readme.md +28 -0
  822. package/node_modules/object-assign/index.js +90 -0
  823. package/node_modules/object-assign/license +21 -0
  824. package/node_modules/object-assign/package.json +42 -0
  825. package/node_modules/object-assign/readme.md +61 -0
  826. package/node_modules/object.omit/LICENSE +21 -0
  827. package/node_modules/object.omit/README.md +118 -0
  828. package/node_modules/object.omit/index.js +40 -0
  829. package/node_modules/object.omit/package.json +67 -0
  830. package/node_modules/once/LICENSE +15 -0
  831. package/node_modules/once/README.md +79 -0
  832. package/node_modules/once/once.js +42 -0
  833. package/node_modules/once/package.json +33 -0
  834. package/node_modules/ordered-read-streams/LICENSE +20 -0
  835. package/node_modules/ordered-read-streams/README.md +65 -0
  836. package/node_modules/ordered-read-streams/index.js +81 -0
  837. package/node_modules/ordered-read-streams/node_modules/is-stream/index.js +21 -0
  838. package/node_modules/ordered-read-streams/node_modules/is-stream/license +21 -0
  839. package/node_modules/ordered-read-streams/node_modules/is-stream/package.json +38 -0
  840. package/node_modules/ordered-read-streams/node_modules/is-stream/readme.md +42 -0
  841. package/node_modules/ordered-read-streams/package.json +25 -0
  842. package/node_modules/os-homedir/index.js +24 -0
  843. package/node_modules/os-homedir/license +21 -0
  844. package/node_modules/os-homedir/package.json +41 -0
  845. package/node_modules/os-homedir/readme.md +31 -0
  846. package/node_modules/os-locale/index.js +127 -0
  847. package/node_modules/os-locale/license +21 -0
  848. package/node_modules/os-locale/package.json +43 -0
  849. package/node_modules/os-locale/readme.md +47 -0
  850. package/node_modules/parse-glob/LICENSE +21 -0
  851. package/node_modules/parse-glob/README.md +115 -0
  852. package/node_modules/parse-glob/index.js +156 -0
  853. package/node_modules/parse-glob/node_modules/is-extglob/LICENSE +21 -0
  854. package/node_modules/parse-glob/node_modules/is-extglob/README.md +75 -0
  855. package/node_modules/parse-glob/node_modules/is-extglob/index.js +11 -0
  856. package/node_modules/parse-glob/node_modules/is-extglob/package.json +48 -0
  857. package/node_modules/parse-glob/node_modules/is-glob/LICENSE +21 -0
  858. package/node_modules/parse-glob/node_modules/is-glob/README.md +105 -0
  859. package/node_modules/parse-glob/node_modules/is-glob/index.js +14 -0
  860. package/node_modules/parse-glob/node_modules/is-glob/package.json +60 -0
  861. package/node_modules/parse-glob/package.json +62 -0
  862. package/node_modules/path-dirname/index.js +143 -0
  863. package/node_modules/path-dirname/license +22 -0
  864. package/node_modules/path-dirname/package.json +29 -0
  865. package/node_modules/path-dirname/readme.md +53 -0
  866. package/node_modules/path-is-absolute/index.js +20 -0
  867. package/node_modules/path-is-absolute/license +21 -0
  868. package/node_modules/path-is-absolute/package.json +43 -0
  869. package/node_modules/path-is-absolute/readme.md +59 -0
  870. package/node_modules/path-parse/LICENSE +21 -0
  871. package/node_modules/path-parse/README.md +42 -0
  872. package/node_modules/path-parse/index.js +75 -0
  873. package/node_modules/path-parse/package.json +33 -0
  874. package/node_modules/pinkie/index.js +292 -0
  875. package/node_modules/pinkie/license +21 -0
  876. package/node_modules/pinkie/package.json +36 -0
  877. package/node_modules/pinkie/readme.md +83 -0
  878. package/node_modules/pinkie-promise/index.js +3 -0
  879. package/node_modules/pinkie-promise/license +21 -0
  880. package/node_modules/pinkie-promise/package.json +35 -0
  881. package/node_modules/pinkie-promise/readme.md +28 -0
  882. package/node_modules/preserve/.gitattributes +14 -0
  883. package/node_modules/preserve/.jshintrc +24 -0
  884. package/node_modules/preserve/.npmignore +53 -0
  885. package/node_modules/preserve/.travis.yml +3 -0
  886. package/node_modules/preserve/.verb.md +59 -0
  887. package/node_modules/preserve/LICENSE +24 -0
  888. package/node_modules/preserve/README.md +90 -0
  889. package/node_modules/preserve/index.js +54 -0
  890. package/node_modules/preserve/package.json +48 -0
  891. package/node_modules/preserve/test.js +48 -0
  892. package/node_modules/process-nextick-args/index.js +45 -0
  893. package/node_modules/process-nextick-args/license.md +19 -0
  894. package/node_modules/process-nextick-args/package.json +25 -0
  895. package/node_modules/process-nextick-args/readme.md +18 -0
  896. package/node_modules/randomatic/LICENSE +21 -0
  897. package/node_modules/randomatic/README.md +193 -0
  898. package/node_modules/randomatic/index.js +95 -0
  899. package/node_modules/randomatic/node_modules/is-number/LICENSE +21 -0
  900. package/node_modules/randomatic/node_modules/is-number/README.md +135 -0
  901. package/node_modules/randomatic/node_modules/is-number/index.js +21 -0
  902. package/node_modules/randomatic/node_modules/is-number/package.json +76 -0
  903. package/node_modules/randomatic/package.json +80 -0
  904. package/node_modules/readable-stream/.travis.yml +34 -0
  905. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  906. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  907. package/node_modules/readable-stream/LICENSE +47 -0
  908. package/node_modules/readable-stream/README.md +58 -0
  909. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  910. package/node_modules/readable-stream/duplex-browser.js +1 -0
  911. package/node_modules/readable-stream/duplex.js +1 -0
  912. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  913. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  914. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  915. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  916. package/node_modules/readable-stream/lib/_stream_writable.js +687 -0
  917. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +79 -0
  918. package/node_modules/readable-stream/lib/internal/streams/destroy.js +74 -0
  919. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  920. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  921. package/node_modules/readable-stream/package.json +52 -0
  922. package/node_modules/readable-stream/passthrough.js +1 -0
  923. package/node_modules/readable-stream/readable-browser.js +7 -0
  924. package/node_modules/readable-stream/readable.js +19 -0
  925. package/node_modules/readable-stream/transform.js +1 -0
  926. package/node_modules/readable-stream/writable-browser.js +1 -0
  927. package/node_modules/readable-stream/writable.js +8 -0
  928. package/node_modules/regex-cache/LICENSE +21 -0
  929. package/node_modules/regex-cache/README.md +166 -0
  930. package/node_modules/regex-cache/index.js +68 -0
  931. package/node_modules/regex-cache/package.json +64 -0
  932. package/node_modules/remove-trailing-separator/history.md +17 -0
  933. package/node_modules/remove-trailing-separator/index.js +17 -0
  934. package/node_modules/remove-trailing-separator/license +3 -0
  935. package/node_modules/remove-trailing-separator/package.json +37 -0
  936. package/node_modules/remove-trailing-separator/readme.md +51 -0
  937. package/node_modules/repeat-element/LICENSE +21 -0
  938. package/node_modules/repeat-element/README.md +99 -0
  939. package/node_modules/repeat-element/index.js +22 -0
  940. package/node_modules/repeat-element/package.json +49 -0
  941. package/node_modules/repeat-string/LICENSE +21 -0
  942. package/node_modules/repeat-string/README.md +136 -0
  943. package/node_modules/repeat-string/index.js +70 -0
  944. package/node_modules/repeat-string/package.json +77 -0
  945. package/node_modules/replace-ext/.npmignore +6 -0
  946. package/node_modules/replace-ext/.travis.yml +8 -0
  947. package/node_modules/replace-ext/LICENSE +20 -0
  948. package/node_modules/replace-ext/README.md +44 -0
  949. package/node_modules/replace-ext/index.js +9 -0
  950. package/node_modules/replace-ext/package.json +35 -0
  951. package/node_modules/replace-ext/test/main.js +51 -0
  952. package/node_modules/require-main-filename/.npmignore +3 -0
  953. package/node_modules/require-main-filename/.travis.yml +8 -0
  954. package/node_modules/require-main-filename/LICENSE.txt +14 -0
  955. package/node_modules/require-main-filename/README.md +26 -0
  956. package/node_modules/require-main-filename/index.js +18 -0
  957. package/node_modules/require-main-filename/package.json +30 -0
  958. package/node_modules/require-main-filename/test.js +36 -0
  959. package/node_modules/resolve/.editorconfig +37 -0
  960. package/node_modules/resolve/.eslintrc +65 -0
  961. package/node_modules/resolve/.github/FUNDING.yml +12 -0
  962. package/node_modules/resolve/LICENSE +21 -0
  963. package/node_modules/resolve/SECURITY.md +3 -0
  964. package/node_modules/resolve/async.js +3 -0
  965. package/node_modules/resolve/bin/resolve +50 -0
  966. package/node_modules/resolve/example/async.js +5 -0
  967. package/node_modules/resolve/example/sync.js +3 -0
  968. package/node_modules/resolve/index.js +6 -0
  969. package/node_modules/resolve/lib/async.js +329 -0
  970. package/node_modules/resolve/lib/caller.js +8 -0
  971. package/node_modules/resolve/lib/core.js +52 -0
  972. package/node_modules/resolve/lib/core.json +153 -0
  973. package/node_modules/resolve/lib/homedir.js +24 -0
  974. package/node_modules/resolve/lib/is-core.js +5 -0
  975. package/node_modules/resolve/lib/node-modules-paths.js +42 -0
  976. package/node_modules/resolve/lib/normalize-options.js +10 -0
  977. package/node_modules/resolve/lib/sync.js +208 -0
  978. package/node_modules/resolve/package.json +71 -0
  979. package/node_modules/resolve/readme.markdown +301 -0
  980. package/node_modules/resolve/sync.js +3 -0
  981. package/node_modules/resolve/test/core.js +88 -0
  982. package/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  983. package/node_modules/resolve/test/dotdot/index.js +1 -0
  984. package/node_modules/resolve/test/dotdot.js +29 -0
  985. package/node_modules/resolve/test/faulty_basedir.js +29 -0
  986. package/node_modules/resolve/test/filter.js +34 -0
  987. package/node_modules/resolve/test/filter_sync.js +33 -0
  988. package/node_modules/resolve/test/home_paths.js +127 -0
  989. package/node_modules/resolve/test/home_paths_sync.js +114 -0
  990. package/node_modules/resolve/test/mock.js +315 -0
  991. package/node_modules/resolve/test/mock_sync.js +214 -0
  992. package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  993. package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  994. package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  995. package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  996. package/node_modules/resolve/test/module_dir.js +56 -0
  997. package/node_modules/resolve/test/node-modules-paths.js +143 -0
  998. package/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  999. package/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  1000. package/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  1001. package/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  1002. package/node_modules/resolve/test/node_path.js +70 -0
  1003. package/node_modules/resolve/test/nonstring.js +9 -0
  1004. package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  1005. package/node_modules/resolve/test/pathfilter.js +75 -0
  1006. package/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  1007. package/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  1008. package/node_modules/resolve/test/precedence/aaa.js +1 -0
  1009. package/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  1010. package/node_modules/resolve/test/precedence/bbb.js +1 -0
  1011. package/node_modules/resolve/test/precedence.js +23 -0
  1012. package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  1013. package/node_modules/resolve/test/resolver/baz/package.json +4 -0
  1014. package/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  1015. package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  1016. package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  1017. package/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  1018. package/node_modules/resolve/test/resolver/cup.coffee +1 -0
  1019. package/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  1020. package/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  1021. package/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  1022. package/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  1023. package/node_modules/resolve/test/resolver/false_main/index.js +0 -0
  1024. package/node_modules/resolve/test/resolver/false_main/package.json +4 -0
  1025. package/node_modules/resolve/test/resolver/foo.js +1 -0
  1026. package/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  1027. package/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  1028. package/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  1029. package/node_modules/resolve/test/resolver/malformed_package_json/index.js +0 -0
  1030. package/node_modules/resolve/test/resolver/malformed_package_json/package.json +1 -0
  1031. package/node_modules/resolve/test/resolver/mug.coffee +0 -0
  1032. package/node_modules/resolve/test/resolver/mug.js +0 -0
  1033. package/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  1034. package/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  1035. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  1036. package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  1037. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  1038. package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  1039. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
  1040. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
  1041. package/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
  1042. package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  1043. package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  1044. package/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  1045. package/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  1046. package/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  1047. package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  1048. package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  1049. package/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
  1050. package/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
  1051. package/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  1052. package/node_modules/resolve/test/resolver.js +595 -0
  1053. package/node_modules/resolve/test/resolver_sync.js +726 -0
  1054. package/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  1055. package/node_modules/resolve/test/shadowed_core.js +54 -0
  1056. package/node_modules/resolve/test/subdirs.js +13 -0
  1057. package/node_modules/resolve/test/symlinks.js +176 -0
  1058. package/node_modules/resolve-url/.jshintrc +44 -0
  1059. package/node_modules/resolve-url/LICENSE +21 -0
  1060. package/node_modules/resolve-url/bower.json +15 -0
  1061. package/node_modules/resolve-url/changelog.md +15 -0
  1062. package/node_modules/resolve-url/component.json +15 -0
  1063. package/node_modules/resolve-url/package.json +34 -0
  1064. package/node_modules/resolve-url/readme.md +83 -0
  1065. package/node_modules/resolve-url/resolve-url.js +47 -0
  1066. package/node_modules/resolve-url/test/resolve-url.js +70 -0
  1067. package/node_modules/safe-buffer/LICENSE +21 -0
  1068. package/node_modules/safe-buffer/README.md +584 -0
  1069. package/node_modules/safe-buffer/index.d.ts +187 -0
  1070. package/node_modules/safe-buffer/index.js +62 -0
  1071. package/node_modules/safe-buffer/package.json +37 -0
  1072. package/node_modules/source-map/CHANGELOG.md +301 -0
  1073. package/node_modules/source-map/LICENSE +28 -0
  1074. package/node_modules/source-map/README.md +742 -0
  1075. package/node_modules/source-map/dist/source-map.debug.js +3234 -0
  1076. package/node_modules/source-map/dist/source-map.js +3233 -0
  1077. package/node_modules/source-map/dist/source-map.min.js +2 -0
  1078. package/node_modules/source-map/dist/source-map.min.js.map +1 -0
  1079. package/node_modules/source-map/lib/array-set.js +121 -0
  1080. package/node_modules/source-map/lib/base64-vlq.js +140 -0
  1081. package/node_modules/source-map/lib/base64.js +67 -0
  1082. package/node_modules/source-map/lib/binary-search.js +111 -0
  1083. package/node_modules/source-map/lib/mapping-list.js +79 -0
  1084. package/node_modules/source-map/lib/quick-sort.js +114 -0
  1085. package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  1086. package/node_modules/source-map/lib/source-map-generator.js +425 -0
  1087. package/node_modules/source-map/lib/source-node.js +413 -0
  1088. package/node_modules/source-map/lib/util.js +488 -0
  1089. package/node_modules/source-map/package.json +73 -0
  1090. package/node_modules/source-map/source-map.d.ts +98 -0
  1091. package/node_modules/source-map/source-map.js +8 -0
  1092. package/node_modules/source-map-resolve/LICENSE +22 -0
  1093. package/node_modules/source-map-resolve/changelog.md +108 -0
  1094. package/node_modules/source-map-resolve/lib/decode-uri-component.js +8 -0
  1095. package/node_modules/source-map-resolve/lib/resolve-url.js +9 -0
  1096. package/node_modules/source-map-resolve/lib/source-map-resolve-node.js +342 -0
  1097. package/node_modules/source-map-resolve/package.json +47 -0
  1098. package/node_modules/source-map-resolve/readme.md +231 -0
  1099. package/node_modules/source-map-resolve/source-map-resolve.js +348 -0
  1100. package/node_modules/source-map-url/LICENSE +21 -0
  1101. package/node_modules/source-map-url/changelog.md +57 -0
  1102. package/node_modules/source-map-url/package.json +39 -0
  1103. package/node_modules/source-map-url/readme.md +97 -0
  1104. package/node_modules/source-map-url/source-map-url.js +57 -0
  1105. package/node_modules/spdx-correct/LICENSE +202 -0
  1106. package/node_modules/spdx-correct/README.md +14 -0
  1107. package/node_modules/spdx-correct/index.js +364 -0
  1108. package/node_modules/spdx-correct/package.json +39 -0
  1109. package/node_modules/spdx-exceptions/README.md +36 -0
  1110. package/node_modules/spdx-exceptions/index.json +40 -0
  1111. package/node_modules/spdx-exceptions/package.json +17 -0
  1112. package/node_modules/spdx-expression-parse/AUTHORS +4 -0
  1113. package/node_modules/spdx-expression-parse/LICENSE +22 -0
  1114. package/node_modules/spdx-expression-parse/README.md +91 -0
  1115. package/node_modules/spdx-expression-parse/index.js +8 -0
  1116. package/node_modules/spdx-expression-parse/package.json +39 -0
  1117. package/node_modules/spdx-expression-parse/parse.js +138 -0
  1118. package/node_modules/spdx-expression-parse/scan.js +131 -0
  1119. package/node_modules/spdx-license-ids/README.md +52 -0
  1120. package/node_modules/spdx-license-ids/deprecated.json +27 -0
  1121. package/node_modules/spdx-license-ids/index.json +467 -0
  1122. package/node_modules/spdx-license-ids/package.json +39 -0
  1123. package/node_modules/stream-shift/.travis.yml +6 -0
  1124. package/node_modules/stream-shift/LICENSE +21 -0
  1125. package/node_modules/stream-shift/README.md +25 -0
  1126. package/node_modules/stream-shift/index.js +20 -0
  1127. package/node_modules/stream-shift/package.json +25 -0
  1128. package/node_modules/stream-shift/test.js +48 -0
  1129. package/node_modules/string_decoder/.travis.yml +50 -0
  1130. package/node_modules/string_decoder/LICENSE +48 -0
  1131. package/node_modules/string_decoder/README.md +47 -0
  1132. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  1133. package/node_modules/string_decoder/package.json +31 -0
  1134. package/node_modules/strip-bom-stream/index.js +10 -0
  1135. package/node_modules/strip-bom-stream/license +21 -0
  1136. package/node_modules/strip-bom-stream/node_modules/strip-bom/index.js +17 -0
  1137. package/node_modules/strip-bom-stream/node_modules/strip-bom/license +21 -0
  1138. package/node_modules/strip-bom-stream/node_modules/strip-bom/package.json +42 -0
  1139. package/node_modules/strip-bom-stream/node_modules/strip-bom/readme.md +39 -0
  1140. package/node_modules/strip-bom-stream/package.json +44 -0
  1141. package/node_modules/strip-bom-stream/readme.md +39 -0
  1142. package/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
  1143. package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
  1144. package/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
  1145. package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
  1146. package/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
  1147. package/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
  1148. package/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
  1149. package/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
  1150. package/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
  1151. package/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
  1152. package/node_modules/symbol/LICENSE +373 -0
  1153. package/node_modules/symbol/README.md +19 -0
  1154. package/node_modules/symbol/index.js +55 -0
  1155. package/node_modules/symbol/package.json +20 -0
  1156. package/node_modules/through2-filter/README.md +79 -0
  1157. package/node_modules/through2-filter/index.js +46 -0
  1158. package/node_modules/through2-filter/node_modules/through2/LICENSE.md +9 -0
  1159. package/node_modules/through2-filter/node_modules/through2/README.md +134 -0
  1160. package/node_modules/through2-filter/node_modules/through2/package.json +33 -0
  1161. package/node_modules/through2-filter/node_modules/through2/through2.js +96 -0
  1162. package/node_modules/through2-filter/package.json +48 -0
  1163. package/node_modules/tildify/index.js +9 -0
  1164. package/node_modules/tildify/license +21 -0
  1165. package/node_modules/tildify/package.json +41 -0
  1166. package/node_modules/tildify/readme.md +30 -0
  1167. package/node_modules/to-absolute-glob/LICENSE +21 -0
  1168. package/node_modules/to-absolute-glob/index.js +28 -0
  1169. package/node_modules/to-absolute-glob/package.json +41 -0
  1170. package/node_modules/to-absolute-glob/readme.md +134 -0
  1171. package/node_modules/typedarray/.travis.yml +4 -0
  1172. package/node_modules/typedarray/LICENSE +35 -0
  1173. package/node_modules/typedarray/example/tarray.js +4 -0
  1174. package/node_modules/typedarray/index.js +630 -0
  1175. package/node_modules/typedarray/package.json +55 -0
  1176. package/node_modules/typedarray/readme.markdown +61 -0
  1177. package/node_modules/typedarray/test/server/undef_globals.js +19 -0
  1178. package/node_modules/typedarray/test/tarray.js +10 -0
  1179. package/node_modules/unique-stream/LICENSE +20 -0
  1180. package/node_modules/unique-stream/README.md +134 -0
  1181. package/node_modules/unique-stream/index.js +48 -0
  1182. package/node_modules/unique-stream/node_modules/through2/LICENSE.md +9 -0
  1183. package/node_modules/unique-stream/node_modules/through2/README.md +134 -0
  1184. package/node_modules/unique-stream/node_modules/through2/package.json +33 -0
  1185. package/node_modules/unique-stream/node_modules/through2/through2.js +96 -0
  1186. package/node_modules/unique-stream/node_modules/through2-filter/LICENSE +9 -0
  1187. package/node_modules/unique-stream/node_modules/through2-filter/README.md +79 -0
  1188. package/node_modules/unique-stream/node_modules/through2-filter/index.js +50 -0
  1189. package/node_modules/unique-stream/node_modules/through2-filter/package.json +48 -0
  1190. package/node_modules/unique-stream/package.json +32 -0
  1191. package/node_modules/urix/.jshintrc +42 -0
  1192. package/node_modules/urix/LICENSE +21 -0
  1193. package/node_modules/urix/index.js +17 -0
  1194. package/node_modules/urix/package.json +25 -0
  1195. package/node_modules/urix/readme.md +46 -0
  1196. package/node_modules/urix/test/index.js +43 -0
  1197. package/node_modules/util-deprecate/History.md +16 -0
  1198. package/node_modules/util-deprecate/LICENSE +24 -0
  1199. package/node_modules/util-deprecate/README.md +53 -0
  1200. package/node_modules/util-deprecate/browser.js +67 -0
  1201. package/node_modules/util-deprecate/node.js +6 -0
  1202. package/node_modules/util-deprecate/package.json +27 -0
  1203. package/node_modules/vali-date/index.js +4 -0
  1204. package/node_modules/vali-date/license +21 -0
  1205. package/node_modules/vali-date/package.json +34 -0
  1206. package/node_modules/vali-date/readme.md +44 -0
  1207. package/node_modules/validate-npm-package-license/LICENSE +202 -0
  1208. package/node_modules/validate-npm-package-license/README.md +113 -0
  1209. package/node_modules/validate-npm-package-license/index.js +86 -0
  1210. package/node_modules/validate-npm-package-license/package.json +28 -0
  1211. package/node_modules/vinyl/CHANGELOG.md +163 -0
  1212. package/node_modules/vinyl/LICENSE +20 -0
  1213. package/node_modules/vinyl/README.md +265 -0
  1214. package/node_modules/vinyl/index.js +270 -0
  1215. package/node_modules/vinyl/lib/cloneBuffer.js +7 -0
  1216. package/node_modules/vinyl/lib/inspectStream.js +15 -0
  1217. package/node_modules/vinyl/lib/isBuffer.js +1 -0
  1218. package/node_modules/vinyl/lib/isNull.js +3 -0
  1219. package/node_modules/vinyl/lib/isStream.js +5 -0
  1220. package/node_modules/vinyl/node_modules/clone/.npmignore +4 -0
  1221. package/node_modules/vinyl/node_modules/clone/LICENSE +18 -0
  1222. package/node_modules/vinyl/node_modules/clone/README.md +126 -0
  1223. package/node_modules/vinyl/node_modules/clone/clone.iml +10 -0
  1224. package/node_modules/vinyl/node_modules/clone/clone.js +166 -0
  1225. package/node_modules/vinyl/node_modules/clone/package.json +51 -0
  1226. package/node_modules/vinyl/package.json +44 -0
  1227. package/node_modules/vinyl-fs/CHANGELOG.md +369 -0
  1228. package/node_modules/vinyl-fs/LICENSE +20 -0
  1229. package/node_modules/vinyl-fs/README.md +293 -0
  1230. package/node_modules/vinyl-fs/index.js +7 -0
  1231. package/node_modules/vinyl-fs/lib/dest/index.js +54 -0
  1232. package/node_modules/vinyl-fs/lib/dest/writeContents/index.js +59 -0
  1233. package/node_modules/vinyl-fs/lib/dest/writeContents/writeBuffer.js +26 -0
  1234. package/node_modules/vinyl-fs/lib/dest/writeContents/writeDir.js +53 -0
  1235. package/node_modules/vinyl-fs/lib/dest/writeContents/writeStream.js +57 -0
  1236. package/node_modules/vinyl-fs/lib/dest/writeContents/writeSymbolicLink.js +20 -0
  1237. package/node_modules/vinyl-fs/lib/fileOperations.js +206 -0
  1238. package/node_modules/vinyl-fs/lib/filterSince.js +16 -0
  1239. package/node_modules/vinyl-fs/lib/prepareWrite.js +69 -0
  1240. package/node_modules/vinyl-fs/lib/sink.js +53 -0
  1241. package/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js +22 -0
  1242. package/node_modules/vinyl-fs/lib/src/getContents/index.js +31 -0
  1243. package/node_modules/vinyl-fs/lib/src/getContents/readDir.js +8 -0
  1244. package/node_modules/vinyl-fs/lib/src/getContents/readSymbolicLink.js +18 -0
  1245. package/node_modules/vinyl-fs/lib/src/getContents/streamFile.js +26 -0
  1246. package/node_modules/vinyl-fs/lib/src/index.js +62 -0
  1247. package/node_modules/vinyl-fs/lib/src/wrapWithVinylFile.js +51 -0
  1248. package/node_modules/vinyl-fs/lib/symlink/index.js +30 -0
  1249. package/node_modules/vinyl-fs/node_modules/merge-stream/LICENSE +21 -0
  1250. package/node_modules/vinyl-fs/node_modules/merge-stream/README.md +55 -0
  1251. package/node_modules/vinyl-fs/node_modules/merge-stream/index.js +41 -0
  1252. package/node_modules/vinyl-fs/node_modules/merge-stream/package.json +21 -0
  1253. package/node_modules/vinyl-fs/node_modules/strip-bom/index.js +17 -0
  1254. package/node_modules/vinyl-fs/node_modules/strip-bom/license +21 -0
  1255. package/node_modules/vinyl-fs/node_modules/strip-bom/package.json +42 -0
  1256. package/node_modules/vinyl-fs/node_modules/strip-bom/readme.md +39 -0
  1257. package/node_modules/vinyl-fs/node_modules/through2/LICENSE.md +9 -0
  1258. package/node_modules/vinyl-fs/node_modules/through2/README.md +134 -0
  1259. package/node_modules/vinyl-fs/node_modules/through2/package.json +33 -0
  1260. package/node_modules/vinyl-fs/node_modules/through2/through2.js +96 -0
  1261. package/node_modules/vinyl-fs/package.json +61 -0
  1262. package/node_modules/window-size/LICENSE +21 -0
  1263. package/node_modules/window-size/README.md +45 -0
  1264. package/node_modules/window-size/cli.js +30 -0
  1265. package/node_modules/window-size/index.js +32 -0
  1266. package/node_modules/window-size/package.json +48 -0
  1267. package/node_modules/wrappy/LICENSE +15 -0
  1268. package/node_modules/wrappy/README.md +36 -0
  1269. package/node_modules/wrappy/package.json +29 -0
  1270. package/node_modules/wrappy/wrappy.js +33 -0
  1271. package/node_modules/xtend/.jshintrc +30 -0
  1272. package/node_modules/xtend/LICENSE +20 -0
  1273. package/node_modules/xtend/README.md +32 -0
  1274. package/node_modules/xtend/immutable.js +19 -0
  1275. package/node_modules/xtend/mutable.js +17 -0
  1276. package/node_modules/xtend/package.json +55 -0
  1277. package/node_modules/xtend/test.js +103 -0
  1278. package/package.json +8 -4
  1279. package/tsconfig.tsbuildinfo +1276 -741
  1280. package/lib/bootstrapper/index.d.ts +0 -57
  1281. package/lib/bootstrapper/index.js +0 -73
  1282. package/lib/tipg-api/runtime/requirements.txt +0 -2
  1283. package/lib/{bootstrapper/runtime → database/bootstrapper_runtime}/handler.py +1 -1
@@ -0,0 +1,3401 @@
1
+ // Reserved word lists for various dialects of the language
2
+
3
+ var reservedWords = {
4
+ 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5
+ 5: "class enum extends super const export import",
6
+ 6: "enum",
7
+ strict: "implements interface let package private protected public static yield",
8
+ strictBind: "eval arguments"
9
+ }
10
+
11
+ // And the keywords
12
+
13
+ var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
14
+
15
+ var keywords = {
16
+ 5: ecma5AndLessKeywords,
17
+ 6: ecma5AndLessKeywords + " const class extends export import super"
18
+ }
19
+
20
+ // ## Character categories
21
+
22
+ // Big ugly regular expressions that match characters in the
23
+ // whitespace, identifier, and identifier-start categories. These
24
+ // are only applied when a character is found to actually have a
25
+ // code point above 128.
26
+ // Generated by `bin/generate-identifier-regex.js`.
27
+
28
+ var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
29
+ var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
30
+
31
+ var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
32
+ var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]")
33
+
34
+ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null
35
+
36
+ // These are a run-length and offset encoded representation of the
37
+ // >0xffff code points that are a valid part of identifiers. The
38
+ // offset starts at 0x10000, and each pair of numbers represents an
39
+ // offset to the next range, and then a size of the range. They were
40
+ // generated by bin/generate-identifier-regex.js
41
+ var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541]
42
+ var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]
43
+
44
+ // This has a complexity linear to the value of the code. The
45
+ // assumption is that looking up astral identifier characters is
46
+ // rare.
47
+ function isInAstralSet(code, set) {
48
+ var pos = 0x10000
49
+ for (var i = 0; i < set.length; i += 2) {
50
+ pos += set[i]
51
+ if (pos > code) return false
52
+ pos += set[i + 1]
53
+ if (pos >= code) return true
54
+ }
55
+ }
56
+
57
+ // Test whether a given character code starts an identifier.
58
+
59
+ function isIdentifierStart(code, astral) {
60
+ if (code < 65) return code === 36
61
+ if (code < 91) return true
62
+ if (code < 97) return code === 95
63
+ if (code < 123) return true
64
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
65
+ if (astral === false) return false
66
+ return isInAstralSet(code, astralIdentifierStartCodes)
67
+ }
68
+
69
+ // Test whether a given character is part of an identifier.
70
+
71
+ function isIdentifierChar(code, astral) {
72
+ if (code < 48) return code === 36
73
+ if (code < 58) return true
74
+ if (code < 65) return false
75
+ if (code < 91) return true
76
+ if (code < 97) return code === 95
77
+ if (code < 123) return true
78
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
79
+ if (astral === false) return false
80
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
81
+ }
82
+
83
+ // ## Token types
84
+
85
+ // The assignment of fine-grained, information-carrying type objects
86
+ // allows the tokenizer to store the information it has about a
87
+ // token in a way that is very cheap for the parser to look up.
88
+
89
+ // All token type variables start with an underscore, to make them
90
+ // easy to recognize.
91
+
92
+ // The `beforeExpr` property is used to disambiguate between regular
93
+ // expressions and divisions. It is set on all token types that can
94
+ // be followed by an expression (thus, a slash after them would be a
95
+ // regular expression).
96
+ //
97
+ // The `startsExpr` property is used to check if the token ends a
98
+ // `yield` expression. It is set on all token types that either can
99
+ // directly start an expression (like a quotation mark) or can
100
+ // continue an expression (like the body of a string).
101
+ //
102
+ // `isLoop` marks a keyword as starting a loop, which is important
103
+ // to know when parsing a label, in order to allow or disallow
104
+ // continue jumps to that label.
105
+
106
+ var TokenType = function TokenType(label, conf) {
107
+ if ( conf === void 0 ) conf = {};
108
+
109
+ this.label = label
110
+ this.keyword = conf.keyword
111
+ this.beforeExpr = !!conf.beforeExpr
112
+ this.startsExpr = !!conf.startsExpr
113
+ this.isLoop = !!conf.isLoop
114
+ this.isAssign = !!conf.isAssign
115
+ this.prefix = !!conf.prefix
116
+ this.postfix = !!conf.postfix
117
+ this.binop = conf.binop || null
118
+ this.updateContext = null
119
+ };
120
+
121
+ function binop(name, prec) {
122
+ return new TokenType(name, {beforeExpr: true, binop: prec})
123
+ }
124
+ var beforeExpr = {beforeExpr: true};
125
+ var startsExpr = {startsExpr: true};
126
+ // Map keyword names to token types.
127
+
128
+ var keywordTypes = {}
129
+
130
+ // Succinct definitions of keyword token types
131
+ function kw(name, options) {
132
+ if ( options === void 0 ) options = {};
133
+
134
+ options.keyword = name
135
+ return keywordTypes[name] = new TokenType(name, options)
136
+ }
137
+
138
+ var tt = {
139
+ num: new TokenType("num", startsExpr),
140
+ regexp: new TokenType("regexp", startsExpr),
141
+ string: new TokenType("string", startsExpr),
142
+ name: new TokenType("name", startsExpr),
143
+ eof: new TokenType("eof"),
144
+
145
+ // Punctuation token types.
146
+ bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
147
+ bracketR: new TokenType("]"),
148
+ braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
149
+ braceR: new TokenType("}"),
150
+ parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
151
+ parenR: new TokenType(")"),
152
+ comma: new TokenType(",", beforeExpr),
153
+ semi: new TokenType(";", beforeExpr),
154
+ colon: new TokenType(":", beforeExpr),
155
+ dot: new TokenType("."),
156
+ question: new TokenType("?", beforeExpr),
157
+ arrow: new TokenType("=>", beforeExpr),
158
+ template: new TokenType("template"),
159
+ ellipsis: new TokenType("...", beforeExpr),
160
+ backQuote: new TokenType("`", startsExpr),
161
+ dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
162
+
163
+ // Operators. These carry several kinds of properties to help the
164
+ // parser use them properly (the presence of these properties is
165
+ // what categorizes them as operators).
166
+ //
167
+ // `binop`, when present, specifies that this operator is a binary
168
+ // operator, and will refer to its precedence.
169
+ //
170
+ // `prefix` and `postfix` mark the operator as a prefix or postfix
171
+ // unary operator.
172
+ //
173
+ // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
174
+ // binary operators with a very low precedence, that should result
175
+ // in AssignmentExpression nodes.
176
+
177
+ eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
178
+ assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
179
+ incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
180
+ prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
181
+ logicalOR: binop("||", 1),
182
+ logicalAND: binop("&&", 2),
183
+ bitwiseOR: binop("|", 3),
184
+ bitwiseXOR: binop("^", 4),
185
+ bitwiseAND: binop("&", 5),
186
+ equality: binop("==/!=", 6),
187
+ relational: binop("</>", 7),
188
+ bitShift: binop("<</>>", 8),
189
+ plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
190
+ modulo: binop("%", 10),
191
+ star: binop("*", 10),
192
+ slash: binop("/", 10),
193
+ starstar: new TokenType("**", {beforeExpr: true}),
194
+
195
+ // Keyword token types.
196
+ _break: kw("break"),
197
+ _case: kw("case", beforeExpr),
198
+ _catch: kw("catch"),
199
+ _continue: kw("continue"),
200
+ _debugger: kw("debugger"),
201
+ _default: kw("default", beforeExpr),
202
+ _do: kw("do", {isLoop: true, beforeExpr: true}),
203
+ _else: kw("else", beforeExpr),
204
+ _finally: kw("finally"),
205
+ _for: kw("for", {isLoop: true}),
206
+ _function: kw("function", startsExpr),
207
+ _if: kw("if"),
208
+ _return: kw("return", beforeExpr),
209
+ _switch: kw("switch"),
210
+ _throw: kw("throw", beforeExpr),
211
+ _try: kw("try"),
212
+ _var: kw("var"),
213
+ _const: kw("const"),
214
+ _while: kw("while", {isLoop: true}),
215
+ _with: kw("with"),
216
+ _new: kw("new", {beforeExpr: true, startsExpr: true}),
217
+ _this: kw("this", startsExpr),
218
+ _super: kw("super", startsExpr),
219
+ _class: kw("class"),
220
+ _extends: kw("extends", beforeExpr),
221
+ _export: kw("export"),
222
+ _import: kw("import"),
223
+ _null: kw("null", startsExpr),
224
+ _true: kw("true", startsExpr),
225
+ _false: kw("false", startsExpr),
226
+ _in: kw("in", {beforeExpr: true, binop: 7}),
227
+ _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}),
228
+ _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}),
229
+ _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}),
230
+ _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
231
+ }
232
+
233
+ // Matches a whole line break (where CRLF is considered a single
234
+ // line break). Used to count lines.
235
+
236
+ var lineBreak = /\r\n?|\n|\u2028|\u2029/
237
+ var lineBreakG = new RegExp(lineBreak.source, "g")
238
+
239
+ function isNewLine(code) {
240
+ return code === 10 || code === 13 || code === 0x2028 || code === 0x2029
241
+ }
242
+
243
+ var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
244
+
245
+ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
246
+
247
+ function isArray(obj) {
248
+ return Object.prototype.toString.call(obj) === "[object Array]"
249
+ }
250
+
251
+ // Checks if an object has a property.
252
+
253
+ function has(obj, propName) {
254
+ return Object.prototype.hasOwnProperty.call(obj, propName)
255
+ }
256
+
257
+ // These are used when `options.locations` is on, for the
258
+ // `startLoc` and `endLoc` properties.
259
+
260
+ var Position = function Position(line, col) {
261
+ this.line = line
262
+ this.column = col
263
+ };
264
+
265
+ Position.prototype.offset = function offset (n) {
266
+ return new Position(this.line, this.column + n)
267
+ };
268
+
269
+ var SourceLocation = function SourceLocation(p, start, end) {
270
+ this.start = start
271
+ this.end = end
272
+ if (p.sourceFile !== null) this.source = p.sourceFile
273
+ };
274
+
275
+ // The `getLineInfo` function is mostly useful when the
276
+ // `locations` option is off (for performance reasons) and you
277
+ // want to find the line/column position for a given character
278
+ // offset. `input` should be the code string that the offset refers
279
+ // into.
280
+
281
+ function getLineInfo(input, offset) {
282
+ for (var line = 1, cur = 0;;) {
283
+ lineBreakG.lastIndex = cur
284
+ var match = lineBreakG.exec(input)
285
+ if (match && match.index < offset) {
286
+ ++line
287
+ cur = match.index + match[0].length
288
+ } else {
289
+ return new Position(line, offset - cur)
290
+ }
291
+ }
292
+ }
293
+
294
+ // A second optional argument can be given to further configure
295
+ // the parser process. These options are recognized:
296
+
297
+ var defaultOptions = {
298
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
299
+ // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support
300
+ // for strict mode, the set of reserved words, and support for
301
+ // new syntax features. The default is 7.
302
+ ecmaVersion: 7,
303
+ // `sourceType` indicates the mode the code should be parsed in.
304
+ // Can be either `"script"` or `"module"`. This influences global
305
+ // strict mode and parsing of `import` and `export` declarations.
306
+ sourceType: "script",
307
+ // `onInsertedSemicolon` can be a callback that will be called
308
+ // when a semicolon is automatically inserted. It will be passed
309
+ // th position of the comma as an offset, and if `locations` is
310
+ // enabled, it is given the location as a `{line, column}` object
311
+ // as second argument.
312
+ onInsertedSemicolon: null,
313
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
314
+ // trailing commas.
315
+ onTrailingComma: null,
316
+ // By default, reserved words are only enforced if ecmaVersion >= 5.
317
+ // Set `allowReserved` to a boolean value to explicitly turn this on
318
+ // an off. When this option has the value "never", reserved words
319
+ // and keywords can also not be used as property names.
320
+ allowReserved: null,
321
+ // When enabled, a return at the top level is not considered an
322
+ // error.
323
+ allowReturnOutsideFunction: false,
324
+ // When enabled, import/export statements are not constrained to
325
+ // appearing at the top of the program.
326
+ allowImportExportEverywhere: false,
327
+ // When enabled, hashbang directive in the beginning of file
328
+ // is allowed and treated as a line comment.
329
+ allowHashBang: false,
330
+ // When `locations` is on, `loc` properties holding objects with
331
+ // `start` and `end` properties in `{line, column}` form (with
332
+ // line being 1-based and column 0-based) will be attached to the
333
+ // nodes.
334
+ locations: false,
335
+ // A function can be passed as `onToken` option, which will
336
+ // cause Acorn to call that function with object in the same
337
+ // format as tokens returned from `tokenizer().getToken()`. Note
338
+ // that you are not allowed to call the parser from the
339
+ // callback—that will corrupt its internal state.
340
+ onToken: null,
341
+ // A function can be passed as `onComment` option, which will
342
+ // cause Acorn to call that function with `(block, text, start,
343
+ // end)` parameters whenever a comment is skipped. `block` is a
344
+ // boolean indicating whether this is a block (`/* */`) comment,
345
+ // `text` is the content of the comment, and `start` and `end` are
346
+ // character offsets that denote the start and end of the comment.
347
+ // When the `locations` option is on, two more parameters are
348
+ // passed, the full `{line, column}` locations of the start and
349
+ // end of the comments. Note that you are not allowed to call the
350
+ // parser from the callback—that will corrupt its internal state.
351
+ onComment: null,
352
+ // Nodes have their start and end characters offsets recorded in
353
+ // `start` and `end` properties (directly on the node, rather than
354
+ // the `loc` object, which holds line/column data. To also add a
355
+ // [semi-standardized][range] `range` property holding a `[start,
356
+ // end]` array with the same numbers, set the `ranges` option to
357
+ // `true`.
358
+ //
359
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
360
+ ranges: false,
361
+ // It is possible to parse multiple files into a single AST by
362
+ // passing the tree produced by parsing the first file as
363
+ // `program` option in subsequent parses. This will add the
364
+ // toplevel forms of the parsed file to the `Program` (top) node
365
+ // of an existing parse tree.
366
+ program: null,
367
+ // When `locations` is on, you can pass this to record the source
368
+ // file in every node's `loc` object.
369
+ sourceFile: null,
370
+ // This value, if given, is stored in every node, whether
371
+ // `locations` is on or off.
372
+ directSourceFile: null,
373
+ // When enabled, parenthesized expressions are represented by
374
+ // (non-standard) ParenthesizedExpression nodes
375
+ preserveParens: false,
376
+ plugins: {}
377
+ }
378
+
379
+ // Interpret and default an options object
380
+
381
+ function getOptions(opts) {
382
+ var options = {}
383
+
384
+ for (var opt in defaultOptions)
385
+ options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
386
+
387
+ if (options.ecmaVersion >= 2015)
388
+ options.ecmaVersion -= 2009
389
+
390
+ if (options.allowReserved == null)
391
+ options.allowReserved = options.ecmaVersion < 5
392
+
393
+ if (isArray(options.onToken)) {
394
+ var tokens = options.onToken
395
+ options.onToken = function (token) { return tokens.push(token); }
396
+ }
397
+ if (isArray(options.onComment))
398
+ options.onComment = pushComment(options, options.onComment)
399
+
400
+ return options
401
+ }
402
+
403
+ function pushComment(options, array) {
404
+ return function (block, text, start, end, startLoc, endLoc) {
405
+ var comment = {
406
+ type: block ? 'Block' : 'Line',
407
+ value: text,
408
+ start: start,
409
+ end: end
410
+ }
411
+ if (options.locations)
412
+ comment.loc = new SourceLocation(this, startLoc, endLoc)
413
+ if (options.ranges)
414
+ comment.range = [start, end]
415
+ array.push(comment)
416
+ }
417
+ }
418
+
419
+ // Registered plugins
420
+ var plugins = {}
421
+
422
+ function keywordRegexp(words) {
423
+ return new RegExp("^(" + words.replace(/ /g, "|") + ")$")
424
+ }
425
+
426
+ var Parser = function Parser(options, input, startPos) {
427
+ this.options = options = getOptions(options)
428
+ this.sourceFile = options.sourceFile
429
+ this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5])
430
+ var reserved = ""
431
+ if (!options.allowReserved) {
432
+ for (var v = options.ecmaVersion;; v--)
433
+ if (reserved = reservedWords[v]) break
434
+ if (options.sourceType == "module") reserved += " await"
435
+ }
436
+ this.reservedWords = keywordRegexp(reserved)
437
+ var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict
438
+ this.reservedWordsStrict = keywordRegexp(reservedStrict)
439
+ this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind)
440
+ this.input = String(input)
441
+
442
+ // Used to signal to callers of `readWord1` whether the word
443
+ // contained any escape sequences. This is needed because words with
444
+ // escape sequences must not be interpreted as keywords.
445
+ this.containsEsc = false
446
+
447
+ // Load plugins
448
+ this.loadPlugins(options.plugins)
449
+
450
+ // Set up token state
451
+
452
+ // The current position of the tokenizer in the input.
453
+ if (startPos) {
454
+ this.pos = startPos
455
+ this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1
456
+ this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
457
+ } else {
458
+ this.pos = this.lineStart = 0
459
+ this.curLine = 1
460
+ }
461
+
462
+ // Properties of the current token:
463
+ // Its type
464
+ this.type = tt.eof
465
+ // For tokens that include more information than their type, the value
466
+ this.value = null
467
+ // Its start and end offset
468
+ this.start = this.end = this.pos
469
+ // And, if locations are used, the {line, column} object
470
+ // corresponding to those offsets
471
+ this.startLoc = this.endLoc = this.curPosition()
472
+
473
+ // Position information for the previous token
474
+ this.lastTokEndLoc = this.lastTokStartLoc = null
475
+ this.lastTokStart = this.lastTokEnd = this.pos
476
+
477
+ // The context stack is used to superficially track syntactic
478
+ // context to predict whether a regular expression is allowed in a
479
+ // given position.
480
+ this.context = this.initialContext()
481
+ this.exprAllowed = true
482
+
483
+ // Figure out if it's a module code.
484
+ this.inModule = options.sourceType === "module"
485
+ this.strict = this.inModule || this.strictDirective(this.pos)
486
+
487
+ // Used to signify the start of a potential arrow function
488
+ this.potentialArrowAt = -1
489
+
490
+ // Flags to track whether we are in a function, a generator, an async function.
491
+ this.inFunction = this.inGenerator = this.inAsync = false
492
+ // Positions to delayed-check that yield/await does not exist in default parameters.
493
+ this.yieldPos = this.awaitPos = 0
494
+ // Labels in scope.
495
+ this.labels = []
496
+
497
+ // If enabled, skip leading hashbang line.
498
+ if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!')
499
+ this.skipLineComment(2)
500
+ };
501
+
502
+ // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them
503
+ Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) };
504
+ Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) };
505
+
506
+ Parser.prototype.extend = function extend (name, f) {
507
+ this[name] = f(this[name])
508
+ };
509
+
510
+ Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) {
511
+ var this$1 = this;
512
+
513
+ for (var name in pluginConfigs) {
514
+ var plugin = plugins[name]
515
+ if (!plugin) throw new Error("Plugin '" + name + "' not found")
516
+ plugin(this$1, pluginConfigs[name])
517
+ }
518
+ };
519
+
520
+ Parser.prototype.parse = function parse () {
521
+ var node = this.options.program || this.startNode()
522
+ this.nextToken()
523
+ return this.parseTopLevel(node)
524
+ };
525
+
526
+ var pp = Parser.prototype
527
+
528
+ // ## Parser utilities
529
+
530
+ var literal = /^(?:'((?:[^\']|\.)*)'|"((?:[^\"]|\.)*)"|;)/
531
+ pp.strictDirective = function(start) {
532
+ var this$1 = this;
533
+
534
+ for (;;) {
535
+ skipWhiteSpace.lastIndex = start
536
+ start += skipWhiteSpace.exec(this$1.input)[0].length
537
+ var match = literal.exec(this$1.input.slice(start))
538
+ if (!match) return false
539
+ if ((match[1] || match[2]) == "use strict") return true
540
+ start += match[0].length
541
+ }
542
+ }
543
+
544
+ // Predicate that tests whether the next token is of the given
545
+ // type, and if yes, consumes it as a side effect.
546
+
547
+ pp.eat = function(type) {
548
+ if (this.type === type) {
549
+ this.next()
550
+ return true
551
+ } else {
552
+ return false
553
+ }
554
+ }
555
+
556
+ // Tests whether parsed token is a contextual keyword.
557
+
558
+ pp.isContextual = function(name) {
559
+ return this.type === tt.name && this.value === name
560
+ }
561
+
562
+ // Consumes contextual keyword if possible.
563
+
564
+ pp.eatContextual = function(name) {
565
+ return this.value === name && this.eat(tt.name)
566
+ }
567
+
568
+ // Asserts that following token is given contextual keyword.
569
+
570
+ pp.expectContextual = function(name) {
571
+ if (!this.eatContextual(name)) this.unexpected()
572
+ }
573
+
574
+ // Test whether a semicolon can be inserted at the current position.
575
+
576
+ pp.canInsertSemicolon = function() {
577
+ return this.type === tt.eof ||
578
+ this.type === tt.braceR ||
579
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
580
+ }
581
+
582
+ pp.insertSemicolon = function() {
583
+ if (this.canInsertSemicolon()) {
584
+ if (this.options.onInsertedSemicolon)
585
+ this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
586
+ return true
587
+ }
588
+ }
589
+
590
+ // Consume a semicolon, or, failing that, see if we are allowed to
591
+ // pretend that there is a semicolon at this position.
592
+
593
+ pp.semicolon = function() {
594
+ if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
595
+ }
596
+
597
+ pp.afterTrailingComma = function(tokType, notNext) {
598
+ if (this.type == tokType) {
599
+ if (this.options.onTrailingComma)
600
+ this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
601
+ if (!notNext)
602
+ this.next()
603
+ return true
604
+ }
605
+ }
606
+
607
+ // Expect a token of a given type. If found, consume it, otherwise,
608
+ // raise an unexpected token error.
609
+
610
+ pp.expect = function(type) {
611
+ this.eat(type) || this.unexpected()
612
+ }
613
+
614
+ // Raise an unexpected token error.
615
+
616
+ pp.unexpected = function(pos) {
617
+ this.raise(pos != null ? pos : this.start, "Unexpected token")
618
+ }
619
+
620
+ var DestructuringErrors = function DestructuringErrors() {
621
+ this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = -1
622
+ };
623
+
624
+ pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
625
+ if (!refDestructuringErrors) return
626
+ if (refDestructuringErrors.trailingComma > -1)
627
+ this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element")
628
+ var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind
629
+ if (parens > -1) this.raiseRecoverable(parens, "Parenthesized pattern")
630
+ }
631
+
632
+ pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
633
+ var pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1
634
+ if (!andThrow) return pos >= 0
635
+ if (pos > -1) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns")
636
+ }
637
+
638
+ pp.checkYieldAwaitInDefaultParams = function() {
639
+ if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
640
+ this.raise(this.yieldPos, "Yield expression cannot be a default value")
641
+ if (this.awaitPos)
642
+ this.raise(this.awaitPos, "Await expression cannot be a default value")
643
+ }
644
+
645
+ pp.isSimpleAssignTarget = function(expr) {
646
+ if (expr.type === "ParenthesizedExpression")
647
+ return this.isSimpleAssignTarget(expr.expression)
648
+ return expr.type === "Identifier" || expr.type === "MemberExpression"
649
+ }
650
+
651
+ var pp$1 = Parser.prototype
652
+
653
+ // ### Statement parsing
654
+
655
+ // Parse a program. Initializes the parser, reads any number of
656
+ // statements, and wraps them in a Program node. Optionally takes a
657
+ // `program` argument. If present, the statements will be appended
658
+ // to its body instead of creating a new node.
659
+
660
+ pp$1.parseTopLevel = function(node) {
661
+ var this$1 = this;
662
+
663
+ var exports = {}
664
+ if (!node.body) node.body = []
665
+ while (this.type !== tt.eof) {
666
+ var stmt = this$1.parseStatement(true, true, exports)
667
+ node.body.push(stmt)
668
+ }
669
+ this.next()
670
+ if (this.options.ecmaVersion >= 6) {
671
+ node.sourceType = this.options.sourceType
672
+ }
673
+ return this.finishNode(node, "Program")
674
+ }
675
+
676
+ var loopLabel = {kind: "loop"};
677
+ var switchLabel = {kind: "switch"};
678
+ pp$1.isLet = function() {
679
+ if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false
680
+ skipWhiteSpace.lastIndex = this.pos
681
+ var skip = skipWhiteSpace.exec(this.input)
682
+ var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next)
683
+ if (nextCh === 91 || nextCh == 123) return true // '{' and '['
684
+ if (isIdentifierStart(nextCh, true)) {
685
+ for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {}
686
+ var ident = this.input.slice(next, pos)
687
+ if (!this.isKeyword(ident)) return true
688
+ }
689
+ return false
690
+ }
691
+
692
+ // check 'async [no LineTerminator here] function'
693
+ // - 'async /*foo*/ function' is OK.
694
+ // - 'async /*\n*/ function' is invalid.
695
+ pp$1.isAsyncFunction = function() {
696
+ if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async")
697
+ return false
698
+
699
+ skipWhiteSpace.lastIndex = this.pos
700
+ var skip = skipWhiteSpace.exec(this.input)
701
+ var next = this.pos + skip[0].length
702
+ return !lineBreak.test(this.input.slice(this.pos, next)) &&
703
+ this.input.slice(next, next + 8) === "function" &&
704
+ (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8)))
705
+ }
706
+
707
+ // Parse a single statement.
708
+ //
709
+ // If expecting a statement and finding a slash operator, parse a
710
+ // regular expression literal. This is to handle cases like
711
+ // `if (foo) /blah/.exec(foo)`, where looking at the previous token
712
+ // does not help.
713
+
714
+ pp$1.parseStatement = function(declaration, topLevel, exports) {
715
+ var starttype = this.type, node = this.startNode(), kind
716
+
717
+ if (this.isLet()) {
718
+ starttype = tt._var
719
+ kind = "let"
720
+ }
721
+
722
+ // Most types of statements are recognized by the keyword they
723
+ // start with. Many are trivial to parse, some require a bit of
724
+ // complexity.
725
+
726
+ switch (starttype) {
727
+ case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
728
+ case tt._debugger: return this.parseDebuggerStatement(node)
729
+ case tt._do: return this.parseDoStatement(node)
730
+ case tt._for: return this.parseForStatement(node)
731
+ case tt._function:
732
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
733
+ return this.parseFunctionStatement(node, false)
734
+ case tt._class:
735
+ if (!declaration) this.unexpected()
736
+ return this.parseClass(node, true)
737
+ case tt._if: return this.parseIfStatement(node)
738
+ case tt._return: return this.parseReturnStatement(node)
739
+ case tt._switch: return this.parseSwitchStatement(node)
740
+ case tt._throw: return this.parseThrowStatement(node)
741
+ case tt._try: return this.parseTryStatement(node)
742
+ case tt._const: case tt._var:
743
+ kind = kind || this.value
744
+ if (!declaration && kind != "var") this.unexpected()
745
+ return this.parseVarStatement(node, kind)
746
+ case tt._while: return this.parseWhileStatement(node)
747
+ case tt._with: return this.parseWithStatement(node)
748
+ case tt.braceL: return this.parseBlock()
749
+ case tt.semi: return this.parseEmptyStatement(node)
750
+ case tt._export:
751
+ case tt._import:
752
+ if (!this.options.allowImportExportEverywhere) {
753
+ if (!topLevel)
754
+ this.raise(this.start, "'import' and 'export' may only appear at the top level")
755
+ if (!this.inModule)
756
+ this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
757
+ }
758
+ return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports)
759
+
760
+ // If the statement does not start with a statement keyword or a
761
+ // brace, it's an ExpressionStatement or LabeledStatement. We
762
+ // simply start parsing an expression, and afterwards, if the
763
+ // next token is a colon and the expression was a simple
764
+ // Identifier node, we switch to interpreting it as a label.
765
+ default:
766
+ if (this.isAsyncFunction() && declaration) {
767
+ this.next()
768
+ return this.parseFunctionStatement(node, true)
769
+ }
770
+
771
+ var maybeName = this.value, expr = this.parseExpression()
772
+ if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
773
+ return this.parseLabeledStatement(node, maybeName, expr)
774
+ else return this.parseExpressionStatement(node, expr)
775
+ }
776
+ }
777
+
778
+ pp$1.parseBreakContinueStatement = function(node, keyword) {
779
+ var this$1 = this;
780
+
781
+ var isBreak = keyword == "break"
782
+ this.next()
783
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
784
+ else if (this.type !== tt.name) this.unexpected()
785
+ else {
786
+ node.label = this.parseIdent()
787
+ this.semicolon()
788
+ }
789
+
790
+ // Verify that there is an actual destination to break or
791
+ // continue to.
792
+ for (var i = 0; i < this.labels.length; ++i) {
793
+ var lab = this$1.labels[i]
794
+ if (node.label == null || lab.name === node.label.name) {
795
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break
796
+ if (node.label && isBreak) break
797
+ }
798
+ }
799
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
800
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
801
+ }
802
+
803
+ pp$1.parseDebuggerStatement = function(node) {
804
+ this.next()
805
+ this.semicolon()
806
+ return this.finishNode(node, "DebuggerStatement")
807
+ }
808
+
809
+ pp$1.parseDoStatement = function(node) {
810
+ this.next()
811
+ this.labels.push(loopLabel)
812
+ node.body = this.parseStatement(false)
813
+ this.labels.pop()
814
+ this.expect(tt._while)
815
+ node.test = this.parseParenExpression()
816
+ if (this.options.ecmaVersion >= 6)
817
+ this.eat(tt.semi)
818
+ else
819
+ this.semicolon()
820
+ return this.finishNode(node, "DoWhileStatement")
821
+ }
822
+
823
+ // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
824
+ // loop is non-trivial. Basically, we have to parse the init `var`
825
+ // statement or expression, disallowing the `in` operator (see
826
+ // the second parameter to `parseExpression`), and then check
827
+ // whether the next token is `in` or `of`. When there is no init
828
+ // part (semicolon immediately after the opening parenthesis), it
829
+ // is a regular `for` loop.
830
+
831
+ pp$1.parseForStatement = function(node) {
832
+ this.next()
833
+ this.labels.push(loopLabel)
834
+ this.expect(tt.parenL)
835
+ if (this.type === tt.semi) return this.parseFor(node, null)
836
+ var isLet = this.isLet()
837
+ if (this.type === tt._var || this.type === tt._const || isLet) {
838
+ var init$1 = this.startNode(), kind = isLet ? "let" : this.value
839
+ this.next()
840
+ this.parseVar(init$1, true, kind)
841
+ this.finishNode(init$1, "VariableDeclaration")
842
+ if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 &&
843
+ !(kind !== "var" && init$1.declarations[0].init))
844
+ return this.parseForIn(node, init$1)
845
+ return this.parseFor(node, init$1)
846
+ }
847
+ var refDestructuringErrors = new DestructuringErrors
848
+ var init = this.parseExpression(true, refDestructuringErrors)
849
+ if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
850
+ this.toAssignable(init)
851
+ this.checkLVal(init)
852
+ this.checkPatternErrors(refDestructuringErrors, true)
853
+ return this.parseForIn(node, init)
854
+ } else {
855
+ this.checkExpressionErrors(refDestructuringErrors, true)
856
+ }
857
+ return this.parseFor(node, init)
858
+ }
859
+
860
+ pp$1.parseFunctionStatement = function(node, isAsync) {
861
+ this.next()
862
+ return this.parseFunction(node, true, false, isAsync)
863
+ }
864
+
865
+ pp$1.isFunction = function() {
866
+ return this.type === tt._function || this.isAsyncFunction()
867
+ }
868
+
869
+ pp$1.parseIfStatement = function(node) {
870
+ this.next()
871
+ node.test = this.parseParenExpression()
872
+ // allow function declarations in branches, but only in non-strict mode
873
+ node.consequent = this.parseStatement(!this.strict && this.isFunction())
874
+ node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null
875
+ return this.finishNode(node, "IfStatement")
876
+ }
877
+
878
+ pp$1.parseReturnStatement = function(node) {
879
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction)
880
+ this.raise(this.start, "'return' outside of function")
881
+ this.next()
882
+
883
+ // In `return` (and `break`/`continue`), the keywords with
884
+ // optional arguments, we eagerly look for a semicolon or the
885
+ // possibility to insert one.
886
+
887
+ if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
888
+ else { node.argument = this.parseExpression(); this.semicolon() }
889
+ return this.finishNode(node, "ReturnStatement")
890
+ }
891
+
892
+ pp$1.parseSwitchStatement = function(node) {
893
+ var this$1 = this;
894
+
895
+ this.next()
896
+ node.discriminant = this.parseParenExpression()
897
+ node.cases = []
898
+ this.expect(tt.braceL)
899
+ this.labels.push(switchLabel)
900
+
901
+ // Statements under must be grouped (by label) in SwitchCase
902
+ // nodes. `cur` is used to keep the node that we are currently
903
+ // adding statements to.
904
+
905
+ for (var cur, sawDefault = false; this.type != tt.braceR;) {
906
+ if (this$1.type === tt._case || this$1.type === tt._default) {
907
+ var isCase = this$1.type === tt._case
908
+ if (cur) this$1.finishNode(cur, "SwitchCase")
909
+ node.cases.push(cur = this$1.startNode())
910
+ cur.consequent = []
911
+ this$1.next()
912
+ if (isCase) {
913
+ cur.test = this$1.parseExpression()
914
+ } else {
915
+ if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses")
916
+ sawDefault = true
917
+ cur.test = null
918
+ }
919
+ this$1.expect(tt.colon)
920
+ } else {
921
+ if (!cur) this$1.unexpected()
922
+ cur.consequent.push(this$1.parseStatement(true))
923
+ }
924
+ }
925
+ if (cur) this.finishNode(cur, "SwitchCase")
926
+ this.next() // Closing brace
927
+ this.labels.pop()
928
+ return this.finishNode(node, "SwitchStatement")
929
+ }
930
+
931
+ pp$1.parseThrowStatement = function(node) {
932
+ this.next()
933
+ if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
934
+ this.raise(this.lastTokEnd, "Illegal newline after throw")
935
+ node.argument = this.parseExpression()
936
+ this.semicolon()
937
+ return this.finishNode(node, "ThrowStatement")
938
+ }
939
+
940
+ // Reused empty array added for node fields that are always empty.
941
+
942
+ var empty = []
943
+
944
+ pp$1.parseTryStatement = function(node) {
945
+ this.next()
946
+ node.block = this.parseBlock()
947
+ node.handler = null
948
+ if (this.type === tt._catch) {
949
+ var clause = this.startNode()
950
+ this.next()
951
+ this.expect(tt.parenL)
952
+ clause.param = this.parseBindingAtom()
953
+ this.checkLVal(clause.param, true)
954
+ this.expect(tt.parenR)
955
+ clause.body = this.parseBlock()
956
+ node.handler = this.finishNode(clause, "CatchClause")
957
+ }
958
+ node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
959
+ if (!node.handler && !node.finalizer)
960
+ this.raise(node.start, "Missing catch or finally clause")
961
+ return this.finishNode(node, "TryStatement")
962
+ }
963
+
964
+ pp$1.parseVarStatement = function(node, kind) {
965
+ this.next()
966
+ this.parseVar(node, false, kind)
967
+ this.semicolon()
968
+ return this.finishNode(node, "VariableDeclaration")
969
+ }
970
+
971
+ pp$1.parseWhileStatement = function(node) {
972
+ this.next()
973
+ node.test = this.parseParenExpression()
974
+ this.labels.push(loopLabel)
975
+ node.body = this.parseStatement(false)
976
+ this.labels.pop()
977
+ return this.finishNode(node, "WhileStatement")
978
+ }
979
+
980
+ pp$1.parseWithStatement = function(node) {
981
+ if (this.strict) this.raise(this.start, "'with' in strict mode")
982
+ this.next()
983
+ node.object = this.parseParenExpression()
984
+ node.body = this.parseStatement(false)
985
+ return this.finishNode(node, "WithStatement")
986
+ }
987
+
988
+ pp$1.parseEmptyStatement = function(node) {
989
+ this.next()
990
+ return this.finishNode(node, "EmptyStatement")
991
+ }
992
+
993
+ pp$1.parseLabeledStatement = function(node, maybeName, expr) {
994
+ var this$1 = this;
995
+
996
+ for (var i = 0; i < this.labels.length; ++i)
997
+ if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared")
998
+ var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
999
+ for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) {
1000
+ var label = this$1.labels[i$1]
1001
+ if (label.statementStart == node.start) {
1002
+ label.statementStart = this$1.start
1003
+ label.kind = kind
1004
+ } else break
1005
+ }
1006
+ this.labels.push({name: maybeName, kind: kind, statementStart: this.start})
1007
+ node.body = this.parseStatement(true)
1008
+ if (node.body.type == "ClassDeclaration" ||
1009
+ node.body.type == "VariableDeclaration" && (this.strict || node.body.kind != "var") ||
1010
+ node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator))
1011
+ this.raiseRecoverable(node.body.start, "Invalid labeled declaration")
1012
+ this.labels.pop()
1013
+ node.label = expr
1014
+ return this.finishNode(node, "LabeledStatement")
1015
+ }
1016
+
1017
+ pp$1.parseExpressionStatement = function(node, expr) {
1018
+ node.expression = expr
1019
+ this.semicolon()
1020
+ return this.finishNode(node, "ExpressionStatement")
1021
+ }
1022
+
1023
+ // Parse a semicolon-enclosed block of statements, handling `"use
1024
+ // strict"` declarations when `allowStrict` is true (used for
1025
+ // function bodies).
1026
+
1027
+ pp$1.parseBlock = function() {
1028
+ var this$1 = this;
1029
+
1030
+ var node = this.startNode()
1031
+ node.body = []
1032
+ this.expect(tt.braceL)
1033
+ while (!this.eat(tt.braceR)) {
1034
+ var stmt = this$1.parseStatement(true)
1035
+ node.body.push(stmt)
1036
+ }
1037
+ return this.finishNode(node, "BlockStatement")
1038
+ }
1039
+
1040
+ // Parse a regular `for` loop. The disambiguation code in
1041
+ // `parseStatement` will already have parsed the init statement or
1042
+ // expression.
1043
+
1044
+ pp$1.parseFor = function(node, init) {
1045
+ node.init = init
1046
+ this.expect(tt.semi)
1047
+ node.test = this.type === tt.semi ? null : this.parseExpression()
1048
+ this.expect(tt.semi)
1049
+ node.update = this.type === tt.parenR ? null : this.parseExpression()
1050
+ this.expect(tt.parenR)
1051
+ node.body = this.parseStatement(false)
1052
+ this.labels.pop()
1053
+ return this.finishNode(node, "ForStatement")
1054
+ }
1055
+
1056
+ // Parse a `for`/`in` and `for`/`of` loop, which are almost
1057
+ // same from parser's perspective.
1058
+
1059
+ pp$1.parseForIn = function(node, init) {
1060
+ var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
1061
+ this.next()
1062
+ node.left = init
1063
+ node.right = this.parseExpression()
1064
+ this.expect(tt.parenR)
1065
+ node.body = this.parseStatement(false)
1066
+ this.labels.pop()
1067
+ return this.finishNode(node, type)
1068
+ }
1069
+
1070
+ // Parse a list of variable declarations.
1071
+
1072
+ pp$1.parseVar = function(node, isFor, kind) {
1073
+ var this$1 = this;
1074
+
1075
+ node.declarations = []
1076
+ node.kind = kind
1077
+ for (;;) {
1078
+ var decl = this$1.startNode()
1079
+ this$1.parseVarId(decl)
1080
+ if (this$1.eat(tt.eq)) {
1081
+ decl.init = this$1.parseMaybeAssign(isFor)
1082
+ } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) {
1083
+ this$1.unexpected()
1084
+ } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) {
1085
+ this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value")
1086
+ } else {
1087
+ decl.init = null
1088
+ }
1089
+ node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"))
1090
+ if (!this$1.eat(tt.comma)) break
1091
+ }
1092
+ return node
1093
+ }
1094
+
1095
+ pp$1.parseVarId = function(decl) {
1096
+ decl.id = this.parseBindingAtom()
1097
+ this.checkLVal(decl.id, true)
1098
+ }
1099
+
1100
+ // Parse a function declaration or literal (depending on the
1101
+ // `isStatement` parameter).
1102
+
1103
+ pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) {
1104
+ this.initFunction(node)
1105
+ if (this.options.ecmaVersion >= 6 && !isAsync)
1106
+ node.generator = this.eat(tt.star)
1107
+ if (this.options.ecmaVersion >= 8)
1108
+ node.async = !!isAsync
1109
+
1110
+ if (isStatement == null)
1111
+ isStatement = this.type == tt.name
1112
+ if (isStatement)
1113
+ node.id = this.parseIdent()
1114
+
1115
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
1116
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
1117
+ this.inGenerator = node.generator
1118
+ this.inAsync = node.async
1119
+ this.yieldPos = 0
1120
+ this.awaitPos = 0
1121
+ this.inFunction = true
1122
+
1123
+ if (!isStatement && this.type === tt.name)
1124
+ node.id = this.parseIdent()
1125
+ this.parseFunctionParams(node)
1126
+ this.parseFunctionBody(node, allowExpressionBody)
1127
+
1128
+ this.inGenerator = oldInGen
1129
+ this.inAsync = oldInAsync
1130
+ this.yieldPos = oldYieldPos
1131
+ this.awaitPos = oldAwaitPos
1132
+ this.inFunction = oldInFunc
1133
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
1134
+ }
1135
+
1136
+ pp$1.parseFunctionParams = function(node) {
1137
+ this.expect(tt.parenL)
1138
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true)
1139
+ this.checkYieldAwaitInDefaultParams()
1140
+ }
1141
+
1142
+ // Parse a class declaration or literal (depending on the
1143
+ // `isStatement` parameter).
1144
+
1145
+ pp$1.parseClass = function(node, isStatement) {
1146
+ var this$1 = this;
1147
+
1148
+ this.next()
1149
+ if (isStatement == null) isStatement = this.type === tt.name
1150
+ this.parseClassId(node, isStatement)
1151
+ this.parseClassSuper(node)
1152
+ var classBody = this.startNode()
1153
+ var hadConstructor = false
1154
+ classBody.body = []
1155
+ this.expect(tt.braceL)
1156
+ while (!this.eat(tt.braceR)) {
1157
+ if (this$1.eat(tt.semi)) continue
1158
+ var method = this$1.startNode()
1159
+ var isGenerator = this$1.eat(tt.star)
1160
+ var isAsync = false
1161
+ var isMaybeStatic = this$1.type === tt.name && this$1.value === "static"
1162
+ this$1.parsePropertyName(method)
1163
+ method.static = isMaybeStatic && this$1.type !== tt.parenL
1164
+ if (method.static) {
1165
+ if (isGenerator) this$1.unexpected()
1166
+ isGenerator = this$1.eat(tt.star)
1167
+ this$1.parsePropertyName(method)
1168
+ }
1169
+ if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed &&
1170
+ method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== tt.parenL &&
1171
+ !this$1.canInsertSemicolon()) {
1172
+ isAsync = true
1173
+ this$1.parsePropertyName(method)
1174
+ }
1175
+ method.kind = "method"
1176
+ var isGetSet = false
1177
+ if (!method.computed) {
1178
+ var key = method.key;
1179
+ if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
1180
+ isGetSet = true
1181
+ method.kind = key.name
1182
+ key = this$1.parsePropertyName(method)
1183
+ }
1184
+ if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
1185
+ key.type === "Literal" && key.value === "constructor")) {
1186
+ if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class")
1187
+ if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier")
1188
+ if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator")
1189
+ if (isAsync) this$1.raise(key.start, "Constructor can't be an async method")
1190
+ method.kind = "constructor"
1191
+ hadConstructor = true
1192
+ }
1193
+ }
1194
+ this$1.parseClassMethod(classBody, method, isGenerator, isAsync)
1195
+ if (isGetSet) {
1196
+ var paramCount = method.kind === "get" ? 0 : 1
1197
+ if (method.value.params.length !== paramCount) {
1198
+ var start = method.value.start
1199
+ if (method.kind === "get")
1200
+ this$1.raiseRecoverable(start, "getter should have no params")
1201
+ else
1202
+ this$1.raiseRecoverable(start, "setter should have exactly one param")
1203
+ } else {
1204
+ if (method.kind === "set" && method.value.params[0].type === "RestElement")
1205
+ this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params")
1206
+ }
1207
+ }
1208
+ }
1209
+ node.body = this.finishNode(classBody, "ClassBody")
1210
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
1211
+ }
1212
+
1213
+ pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) {
1214
+ method.value = this.parseMethod(isGenerator, isAsync)
1215
+ classBody.body.push(this.finishNode(method, "MethodDefinition"))
1216
+ }
1217
+
1218
+ pp$1.parseClassId = function(node, isStatement) {
1219
+ node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
1220
+ }
1221
+
1222
+ pp$1.parseClassSuper = function(node) {
1223
+ node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
1224
+ }
1225
+
1226
+ // Parses module export declaration.
1227
+
1228
+ pp$1.parseExport = function(node, exports) {
1229
+ var this$1 = this;
1230
+
1231
+ this.next()
1232
+ // export * from '...'
1233
+ if (this.eat(tt.star)) {
1234
+ this.expectContextual("from")
1235
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1236
+ this.semicolon()
1237
+ return this.finishNode(node, "ExportAllDeclaration")
1238
+ }
1239
+ if (this.eat(tt._default)) { // export default ...
1240
+ this.checkExport(exports, "default", this.lastTokStart)
1241
+ var isAsync
1242
+ if (this.type === tt._function || (isAsync = this.isAsyncFunction())) {
1243
+ var fNode = this.startNode()
1244
+ this.next()
1245
+ if (isAsync) this.next()
1246
+ node.declaration = this.parseFunction(fNode, null, false, isAsync)
1247
+ } else if (this.type === tt._class) {
1248
+ var cNode = this.startNode()
1249
+ node.declaration = this.parseClass(cNode, null)
1250
+ } else {
1251
+ node.declaration = this.parseMaybeAssign()
1252
+ this.semicolon()
1253
+ }
1254
+ return this.finishNode(node, "ExportDefaultDeclaration")
1255
+ }
1256
+ // export var|const|let|function|class ...
1257
+ if (this.shouldParseExportStatement()) {
1258
+ node.declaration = this.parseStatement(true)
1259
+ if (node.declaration.type === "VariableDeclaration")
1260
+ this.checkVariableExport(exports, node.declaration.declarations)
1261
+ else
1262
+ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start)
1263
+ node.specifiers = []
1264
+ node.source = null
1265
+ } else { // export { x, y as z } [from '...']
1266
+ node.declaration = null
1267
+ node.specifiers = this.parseExportSpecifiers(exports)
1268
+ if (this.eatContextual("from")) {
1269
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1270
+ } else {
1271
+ // check for keywords used as local names
1272
+ for (var i = 0; i < node.specifiers.length; i++) {
1273
+ if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) {
1274
+ this$1.unexpected(node.specifiers[i].local.start)
1275
+ }
1276
+ }
1277
+
1278
+ node.source = null
1279
+ }
1280
+ this.semicolon()
1281
+ }
1282
+ return this.finishNode(node, "ExportNamedDeclaration")
1283
+ }
1284
+
1285
+ pp$1.checkExport = function(exports, name, pos) {
1286
+ if (!exports) return
1287
+ if (Object.prototype.hasOwnProperty.call(exports, name))
1288
+ this.raiseRecoverable(pos, "Duplicate export '" + name + "'")
1289
+ exports[name] = true
1290
+ }
1291
+
1292
+ pp$1.checkPatternExport = function(exports, pat) {
1293
+ var this$1 = this;
1294
+
1295
+ var type = pat.type
1296
+ if (type == "Identifier")
1297
+ this.checkExport(exports, pat.name, pat.start)
1298
+ else if (type == "ObjectPattern")
1299
+ for (var i = 0; i < pat.properties.length; ++i)
1300
+ this$1.checkPatternExport(exports, pat.properties[i].value)
1301
+ else if (type == "ArrayPattern")
1302
+ for (var i$1 = 0; i$1 < pat.elements.length; ++i$1) {
1303
+ var elt = pat.elements[i$1]
1304
+ if (elt) this$1.checkPatternExport(exports, elt)
1305
+ }
1306
+ else if (type == "AssignmentPattern")
1307
+ this.checkPatternExport(exports, pat.left)
1308
+ else if (type == "ParenthesizedExpression")
1309
+ this.checkPatternExport(exports, pat.expression)
1310
+ }
1311
+
1312
+ pp$1.checkVariableExport = function(exports, decls) {
1313
+ var this$1 = this;
1314
+
1315
+ if (!exports) return
1316
+ for (var i = 0; i < decls.length; i++)
1317
+ this$1.checkPatternExport(exports, decls[i].id)
1318
+ }
1319
+
1320
+ pp$1.shouldParseExportStatement = function() {
1321
+ return this.type.keyword === "var"
1322
+ || this.type.keyword === "const"
1323
+ || this.type.keyword === "class"
1324
+ || this.type.keyword === "function"
1325
+ || this.isLet()
1326
+ || this.isAsyncFunction()
1327
+ }
1328
+
1329
+ // Parses a comma-separated list of module exports.
1330
+
1331
+ pp$1.parseExportSpecifiers = function(exports) {
1332
+ var this$1 = this;
1333
+
1334
+ var nodes = [], first = true
1335
+ // export { x, y as z } [from '...']
1336
+ this.expect(tt.braceL)
1337
+ while (!this.eat(tt.braceR)) {
1338
+ if (!first) {
1339
+ this$1.expect(tt.comma)
1340
+ if (this$1.afterTrailingComma(tt.braceR)) break
1341
+ } else first = false
1342
+
1343
+ var node = this$1.startNode()
1344
+ node.local = this$1.parseIdent(true)
1345
+ node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local
1346
+ this$1.checkExport(exports, node.exported.name, node.exported.start)
1347
+ nodes.push(this$1.finishNode(node, "ExportSpecifier"))
1348
+ }
1349
+ return nodes
1350
+ }
1351
+
1352
+ // Parses import declaration.
1353
+
1354
+ pp$1.parseImport = function(node) {
1355
+ this.next()
1356
+ // import '...'
1357
+ if (this.type === tt.string) {
1358
+ node.specifiers = empty
1359
+ node.source = this.parseExprAtom()
1360
+ } else {
1361
+ node.specifiers = this.parseImportSpecifiers()
1362
+ this.expectContextual("from")
1363
+ node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
1364
+ }
1365
+ this.semicolon()
1366
+ return this.finishNode(node, "ImportDeclaration")
1367
+ }
1368
+
1369
+ // Parses a comma-separated list of module imports.
1370
+
1371
+ pp$1.parseImportSpecifiers = function() {
1372
+ var this$1 = this;
1373
+
1374
+ var nodes = [], first = true
1375
+ if (this.type === tt.name) {
1376
+ // import defaultObj, { x, y as z } from '...'
1377
+ var node = this.startNode()
1378
+ node.local = this.parseIdent()
1379
+ this.checkLVal(node.local, true)
1380
+ nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
1381
+ if (!this.eat(tt.comma)) return nodes
1382
+ }
1383
+ if (this.type === tt.star) {
1384
+ var node$1 = this.startNode()
1385
+ this.next()
1386
+ this.expectContextual("as")
1387
+ node$1.local = this.parseIdent()
1388
+ this.checkLVal(node$1.local, true)
1389
+ nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"))
1390
+ return nodes
1391
+ }
1392
+ this.expect(tt.braceL)
1393
+ while (!this.eat(tt.braceR)) {
1394
+ if (!first) {
1395
+ this$1.expect(tt.comma)
1396
+ if (this$1.afterTrailingComma(tt.braceR)) break
1397
+ } else first = false
1398
+
1399
+ var node$2 = this$1.startNode()
1400
+ node$2.imported = this$1.parseIdent(true)
1401
+ if (this$1.eatContextual("as")) {
1402
+ node$2.local = this$1.parseIdent()
1403
+ } else {
1404
+ node$2.local = node$2.imported
1405
+ if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start)
1406
+ if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raiseRecoverable(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved")
1407
+ }
1408
+ this$1.checkLVal(node$2.local, true)
1409
+ nodes.push(this$1.finishNode(node$2, "ImportSpecifier"))
1410
+ }
1411
+ return nodes
1412
+ }
1413
+
1414
+ var pp$2 = Parser.prototype
1415
+
1416
+ // Convert existing expression atom to assignable pattern
1417
+ // if possible.
1418
+
1419
+ pp$2.toAssignable = function(node, isBinding) {
1420
+ var this$1 = this;
1421
+
1422
+ if (this.options.ecmaVersion >= 6 && node) {
1423
+ switch (node.type) {
1424
+ case "Identifier":
1425
+ if (this.inAsync && node.name === "await")
1426
+ this.raise(node.start, "Can not use 'await' as identifier inside an async function")
1427
+ break
1428
+
1429
+ case "ObjectPattern":
1430
+ case "ArrayPattern":
1431
+ break
1432
+
1433
+ case "ObjectExpression":
1434
+ node.type = "ObjectPattern"
1435
+ for (var i = 0; i < node.properties.length; i++) {
1436
+ var prop = node.properties[i]
1437
+ if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter")
1438
+ this$1.toAssignable(prop.value, isBinding)
1439
+ }
1440
+ break
1441
+
1442
+ case "ArrayExpression":
1443
+ node.type = "ArrayPattern"
1444
+ this.toAssignableList(node.elements, isBinding)
1445
+ break
1446
+
1447
+ case "AssignmentExpression":
1448
+ if (node.operator === "=") {
1449
+ node.type = "AssignmentPattern"
1450
+ delete node.operator
1451
+ this.toAssignable(node.left, isBinding)
1452
+ // falls through to AssignmentPattern
1453
+ } else {
1454
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
1455
+ break
1456
+ }
1457
+
1458
+ case "AssignmentPattern":
1459
+ break
1460
+
1461
+ case "ParenthesizedExpression":
1462
+ node.expression = this.toAssignable(node.expression, isBinding)
1463
+ break
1464
+
1465
+ case "MemberExpression":
1466
+ if (!isBinding) break
1467
+
1468
+ default:
1469
+ this.raise(node.start, "Assigning to rvalue")
1470
+ }
1471
+ }
1472
+ return node
1473
+ }
1474
+
1475
+ // Convert list of expression atoms to binding list.
1476
+
1477
+ pp$2.toAssignableList = function(exprList, isBinding) {
1478
+ var this$1 = this;
1479
+
1480
+ var end = exprList.length
1481
+ if (end) {
1482
+ var last = exprList[end - 1]
1483
+ if (last && last.type == "RestElement") {
1484
+ --end
1485
+ } else if (last && last.type == "SpreadElement") {
1486
+ last.type = "RestElement"
1487
+ var arg = last.argument
1488
+ this.toAssignable(arg, isBinding)
1489
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
1490
+ this.unexpected(arg.start)
1491
+ --end
1492
+ }
1493
+
1494
+ if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
1495
+ this.unexpected(last.argument.start)
1496
+ }
1497
+ for (var i = 0; i < end; i++) {
1498
+ var elt = exprList[i]
1499
+ if (elt) this$1.toAssignable(elt, isBinding)
1500
+ }
1501
+ return exprList
1502
+ }
1503
+
1504
+ // Parses spread element.
1505
+
1506
+ pp$2.parseSpread = function(refDestructuringErrors) {
1507
+ var node = this.startNode()
1508
+ this.next()
1509
+ node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
1510
+ return this.finishNode(node, "SpreadElement")
1511
+ }
1512
+
1513
+ pp$2.parseRest = function(allowNonIdent) {
1514
+ var node = this.startNode()
1515
+ this.next()
1516
+
1517
+ // RestElement inside of a function parameter must be an identifier
1518
+ if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected()
1519
+ else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
1520
+
1521
+ return this.finishNode(node, "RestElement")
1522
+ }
1523
+
1524
+ // Parses lvalue (assignable) atom.
1525
+
1526
+ pp$2.parseBindingAtom = function() {
1527
+ if (this.options.ecmaVersion < 6) return this.parseIdent()
1528
+ switch (this.type) {
1529
+ case tt.name:
1530
+ return this.parseIdent()
1531
+
1532
+ case tt.bracketL:
1533
+ var node = this.startNode()
1534
+ this.next()
1535
+ node.elements = this.parseBindingList(tt.bracketR, true, true)
1536
+ return this.finishNode(node, "ArrayPattern")
1537
+
1538
+ case tt.braceL:
1539
+ return this.parseObj(true)
1540
+
1541
+ default:
1542
+ this.unexpected()
1543
+ }
1544
+ }
1545
+
1546
+ pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) {
1547
+ var this$1 = this;
1548
+
1549
+ var elts = [], first = true
1550
+ while (!this.eat(close)) {
1551
+ if (first) first = false
1552
+ else this$1.expect(tt.comma)
1553
+ if (allowEmpty && this$1.type === tt.comma) {
1554
+ elts.push(null)
1555
+ } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
1556
+ break
1557
+ } else if (this$1.type === tt.ellipsis) {
1558
+ var rest = this$1.parseRest(allowNonIdent)
1559
+ this$1.parseBindingListItem(rest)
1560
+ elts.push(rest)
1561
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
1562
+ this$1.expect(close)
1563
+ break
1564
+ } else {
1565
+ var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc)
1566
+ this$1.parseBindingListItem(elem)
1567
+ elts.push(elem)
1568
+ }
1569
+ }
1570
+ return elts
1571
+ }
1572
+
1573
+ pp$2.parseBindingListItem = function(param) {
1574
+ return param
1575
+ }
1576
+
1577
+ // Parses assignment pattern around given atom if possible.
1578
+
1579
+ pp$2.parseMaybeDefault = function(startPos, startLoc, left) {
1580
+ left = left || this.parseBindingAtom()
1581
+ if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left
1582
+ var node = this.startNodeAt(startPos, startLoc)
1583
+ node.left = left
1584
+ node.right = this.parseMaybeAssign()
1585
+ return this.finishNode(node, "AssignmentPattern")
1586
+ }
1587
+
1588
+ // Verify that a node is an lval — something that can be assigned
1589
+ // to.
1590
+
1591
+ pp$2.checkLVal = function(expr, isBinding, checkClashes) {
1592
+ var this$1 = this;
1593
+
1594
+ switch (expr.type) {
1595
+ case "Identifier":
1596
+ if (this.strict && this.reservedWordsStrictBind.test(expr.name))
1597
+ this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
1598
+ if (checkClashes) {
1599
+ if (has(checkClashes, expr.name))
1600
+ this.raiseRecoverable(expr.start, "Argument name clash")
1601
+ checkClashes[expr.name] = true
1602
+ }
1603
+ break
1604
+
1605
+ case "MemberExpression":
1606
+ if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
1607
+ break
1608
+
1609
+ case "ObjectPattern":
1610
+ for (var i = 0; i < expr.properties.length; i++)
1611
+ this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes)
1612
+ break
1613
+
1614
+ case "ArrayPattern":
1615
+ for (var i$1 = 0; i$1 < expr.elements.length; i$1++) {
1616
+ var elem = expr.elements[i$1]
1617
+ if (elem) this$1.checkLVal(elem, isBinding, checkClashes)
1618
+ }
1619
+ break
1620
+
1621
+ case "AssignmentPattern":
1622
+ this.checkLVal(expr.left, isBinding, checkClashes)
1623
+ break
1624
+
1625
+ case "RestElement":
1626
+ this.checkLVal(expr.argument, isBinding, checkClashes)
1627
+ break
1628
+
1629
+ case "ParenthesizedExpression":
1630
+ this.checkLVal(expr.expression, isBinding, checkClashes)
1631
+ break
1632
+
1633
+ default:
1634
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
1635
+ }
1636
+ }
1637
+
1638
+ // A recursive descent parser operates by defining functions for all
1639
+ // syntactic elements, and recursively calling those, each function
1640
+ // advancing the input stream and returning an AST node. Precedence
1641
+ // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
1642
+ // instead of `(!x)[1]` is handled by the fact that the parser
1643
+ // function that parses unary prefix operators is called first, and
1644
+ // in turn calls the function that parses `[]` subscripts — that
1645
+ // way, it'll receive the node for `x[1]` already parsed, and wraps
1646
+ // *that* in the unary operator node.
1647
+ //
1648
+ // Acorn uses an [operator precedence parser][opp] to handle binary
1649
+ // operator precedence, because it is much more compact than using
1650
+ // the technique outlined above, which uses different, nesting
1651
+ // functions to specify precedence, for all of the ten binary
1652
+ // precedence levels that JavaScript defines.
1653
+ //
1654
+ // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
1655
+
1656
+ var pp$3 = Parser.prototype
1657
+
1658
+ // Check if property name clashes with already added.
1659
+ // Object/class getters and setters are not allowed to clash —
1660
+ // either with each other or with an init property — and in
1661
+ // strict mode, init properties are also not allowed to be repeated.
1662
+
1663
+ pp$3.checkPropClash = function(prop, propHash) {
1664
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
1665
+ return
1666
+ var key = prop.key;
1667
+ var name
1668
+ switch (key.type) {
1669
+ case "Identifier": name = key.name; break
1670
+ case "Literal": name = String(key.value); break
1671
+ default: return
1672
+ }
1673
+ var kind = prop.kind;
1674
+ if (this.options.ecmaVersion >= 6) {
1675
+ if (name === "__proto__" && kind === "init") {
1676
+ if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
1677
+ propHash.proto = true
1678
+ }
1679
+ return
1680
+ }
1681
+ name = "$" + name
1682
+ var other = propHash[name]
1683
+ if (other) {
1684
+ var isGetSet = kind !== "init"
1685
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
1686
+ this.raiseRecoverable(key.start, "Redefinition of property")
1687
+ } else {
1688
+ other = propHash[name] = {
1689
+ init: false,
1690
+ get: false,
1691
+ set: false
1692
+ }
1693
+ }
1694
+ other[kind] = true
1695
+ }
1696
+
1697
+ // ### Expression parsing
1698
+
1699
+ // These nest, from the most general expression type at the top to
1700
+ // 'atomic', nondivisible expression types at the bottom. Most of
1701
+ // the functions will simply let the function(s) below them parse,
1702
+ // and, *if* the syntactic construct they handle is present, wrap
1703
+ // the AST node that the inner parser gave them in another node.
1704
+
1705
+ // Parse a full expression. The optional arguments are used to
1706
+ // forbid the `in` operator (in for loops initalization expressions)
1707
+ // and provide reference for storing '=' operator inside shorthand
1708
+ // property assignment in contexts where both object expression
1709
+ // and object pattern might appear (so it's possible to raise
1710
+ // delayed syntax error at correct position).
1711
+
1712
+ pp$3.parseExpression = function(noIn, refDestructuringErrors) {
1713
+ var this$1 = this;
1714
+
1715
+ var startPos = this.start, startLoc = this.startLoc
1716
+ var expr = this.parseMaybeAssign(noIn, refDestructuringErrors)
1717
+ if (this.type === tt.comma) {
1718
+ var node = this.startNodeAt(startPos, startLoc)
1719
+ node.expressions = [expr]
1720
+ while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors))
1721
+ return this.finishNode(node, "SequenceExpression")
1722
+ }
1723
+ return expr
1724
+ }
1725
+
1726
+ // Parse an assignment expression. This includes applications of
1727
+ // operators like `+=`.
1728
+
1729
+ pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) {
1730
+ if (this.inGenerator && this.isContextual("yield")) return this.parseYield()
1731
+
1732
+ var ownDestructuringErrors = false, oldParenAssign = -1
1733
+ if (refDestructuringErrors) {
1734
+ oldParenAssign = refDestructuringErrors.parenthesizedAssign
1735
+ refDestructuringErrors.parenthesizedAssign = -1
1736
+ } else {
1737
+ refDestructuringErrors = new DestructuringErrors
1738
+ ownDestructuringErrors = true
1739
+ }
1740
+
1741
+ var startPos = this.start, startLoc = this.startLoc
1742
+ if (this.type == tt.parenL || this.type == tt.name)
1743
+ this.potentialArrowAt = this.start
1744
+ var left = this.parseMaybeConditional(noIn, refDestructuringErrors)
1745
+ if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
1746
+ if (this.type.isAssign) {
1747
+ this.checkPatternErrors(refDestructuringErrors, true)
1748
+ if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors)
1749
+ var node = this.startNodeAt(startPos, startLoc)
1750
+ node.operator = this.value
1751
+ node.left = this.type === tt.eq ? this.toAssignable(left) : left
1752
+ refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly
1753
+ this.checkLVal(left)
1754
+ this.next()
1755
+ node.right = this.parseMaybeAssign(noIn)
1756
+ return this.finishNode(node, "AssignmentExpression")
1757
+ } else {
1758
+ if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
1759
+ }
1760
+ if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign
1761
+ return left
1762
+ }
1763
+
1764
+ // Parse a ternary conditional (`?:`) operator.
1765
+
1766
+ pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) {
1767
+ var startPos = this.start, startLoc = this.startLoc
1768
+ var expr = this.parseExprOps(noIn, refDestructuringErrors)
1769
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1770
+ if (this.eat(tt.question)) {
1771
+ var node = this.startNodeAt(startPos, startLoc)
1772
+ node.test = expr
1773
+ node.consequent = this.parseMaybeAssign()
1774
+ this.expect(tt.colon)
1775
+ node.alternate = this.parseMaybeAssign(noIn)
1776
+ return this.finishNode(node, "ConditionalExpression")
1777
+ }
1778
+ return expr
1779
+ }
1780
+
1781
+ // Start the precedence parser.
1782
+
1783
+ pp$3.parseExprOps = function(noIn, refDestructuringErrors) {
1784
+ var startPos = this.start, startLoc = this.startLoc
1785
+ var expr = this.parseMaybeUnary(refDestructuringErrors, false)
1786
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1787
+ return this.parseExprOp(expr, startPos, startLoc, -1, noIn)
1788
+ }
1789
+
1790
+ // Parse binary operators with the operator precedence parsing
1791
+ // algorithm. `left` is the left-hand side of the operator.
1792
+ // `minPrec` provides context that allows the function to stop and
1793
+ // defer further parser to one of its callers when it encounters an
1794
+ // operator that has a lower precedence than the set it is parsing.
1795
+
1796
+ pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
1797
+ var prec = this.type.binop
1798
+ if (prec != null && (!noIn || this.type !== tt._in)) {
1799
+ if (prec > minPrec) {
1800
+ var logical = this.type === tt.logicalOR || this.type === tt.logicalAND
1801
+ var op = this.value
1802
+ this.next()
1803
+ var startPos = this.start, startLoc = this.startLoc
1804
+ var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn)
1805
+ var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical)
1806
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
1807
+ }
1808
+ }
1809
+ return left
1810
+ }
1811
+
1812
+ pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) {
1813
+ var node = this.startNodeAt(startPos, startLoc)
1814
+ node.left = left
1815
+ node.operator = op
1816
+ node.right = right
1817
+ return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
1818
+ }
1819
+
1820
+ // Parse unary operators, both prefix and postfix.
1821
+
1822
+ pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) {
1823
+ var this$1 = this;
1824
+
1825
+ var startPos = this.start, startLoc = this.startLoc, expr
1826
+ if (this.inAsync && this.isContextual("await")) {
1827
+ expr = this.parseAwait(refDestructuringErrors)
1828
+ sawUnary = true
1829
+ } else if (this.type.prefix) {
1830
+ var node = this.startNode(), update = this.type === tt.incDec
1831
+ node.operator = this.value
1832
+ node.prefix = true
1833
+ this.next()
1834
+ node.argument = this.parseMaybeUnary(null, true)
1835
+ this.checkExpressionErrors(refDestructuringErrors, true)
1836
+ if (update) this.checkLVal(node.argument)
1837
+ else if (this.strict && node.operator === "delete" &&
1838
+ node.argument.type === "Identifier")
1839
+ this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
1840
+ else sawUnary = true
1841
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
1842
+ } else {
1843
+ expr = this.parseExprSubscripts(refDestructuringErrors)
1844
+ if (this.checkExpressionErrors(refDestructuringErrors)) return expr
1845
+ while (this.type.postfix && !this.canInsertSemicolon()) {
1846
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
1847
+ node$1.operator = this$1.value
1848
+ node$1.prefix = false
1849
+ node$1.argument = expr
1850
+ this$1.checkLVal(expr)
1851
+ this$1.next()
1852
+ expr = this$1.finishNode(node$1, "UpdateExpression")
1853
+ }
1854
+ }
1855
+
1856
+ if (!sawUnary && this.eat(tt.starstar))
1857
+ return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false)
1858
+ else
1859
+ return expr
1860
+ }
1861
+
1862
+ // Parse call, dot, and `[]`-subscript expressions.
1863
+
1864
+ pp$3.parseExprSubscripts = function(refDestructuringErrors) {
1865
+ var startPos = this.start, startLoc = this.startLoc
1866
+ var expr = this.parseExprAtom(refDestructuringErrors)
1867
+ var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"
1868
+ if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr
1869
+ var result = this.parseSubscripts(expr, startPos, startLoc)
1870
+ if (refDestructuringErrors && result.type === "MemberExpression") {
1871
+ if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1
1872
+ if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1
1873
+ }
1874
+ return result
1875
+ }
1876
+
1877
+ pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) {
1878
+ var this$1 = this;
1879
+
1880
+ var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
1881
+ this.lastTokEnd == base.end && !this.canInsertSemicolon()
1882
+ for (var computed;;) {
1883
+ if ((computed = this$1.eat(tt.bracketL)) || this$1.eat(tt.dot)) {
1884
+ var node = this$1.startNodeAt(startPos, startLoc)
1885
+ node.object = base
1886
+ node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true)
1887
+ node.computed = !!computed
1888
+ if (computed) this$1.expect(tt.bracketR)
1889
+ base = this$1.finishNode(node, "MemberExpression")
1890
+ } else if (!noCalls && this$1.eat(tt.parenL)) {
1891
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos
1892
+ this$1.yieldPos = 0
1893
+ this$1.awaitPos = 0
1894
+ var exprList = this$1.parseExprList(tt.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors)
1895
+ if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(tt.arrow)) {
1896
+ this$1.checkPatternErrors(refDestructuringErrors, false)
1897
+ this$1.checkYieldAwaitInDefaultParams()
1898
+ this$1.yieldPos = oldYieldPos
1899
+ this$1.awaitPos = oldAwaitPos
1900
+ return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true)
1901
+ }
1902
+ this$1.checkExpressionErrors(refDestructuringErrors, true)
1903
+ this$1.yieldPos = oldYieldPos || this$1.yieldPos
1904
+ this$1.awaitPos = oldAwaitPos || this$1.awaitPos
1905
+ var node$1 = this$1.startNodeAt(startPos, startLoc)
1906
+ node$1.callee = base
1907
+ node$1.arguments = exprList
1908
+ base = this$1.finishNode(node$1, "CallExpression")
1909
+ } else if (this$1.type === tt.backQuote) {
1910
+ var node$2 = this$1.startNodeAt(startPos, startLoc)
1911
+ node$2.tag = base
1912
+ node$2.quasi = this$1.parseTemplate()
1913
+ base = this$1.finishNode(node$2, "TaggedTemplateExpression")
1914
+ } else {
1915
+ return base
1916
+ }
1917
+ }
1918
+ }
1919
+
1920
+ // Parse an atomic expression — either a single token that is an
1921
+ // expression, an expression started by a keyword like `function` or
1922
+ // `new`, or an expression wrapped in punctuation like `()`, `[]`,
1923
+ // or `{}`.
1924
+
1925
+ pp$3.parseExprAtom = function(refDestructuringErrors) {
1926
+ var node, canBeArrow = this.potentialArrowAt == this.start
1927
+ switch (this.type) {
1928
+ case tt._super:
1929
+ if (!this.inFunction)
1930
+ this.raise(this.start, "'super' outside of function or class")
1931
+
1932
+ case tt._this:
1933
+ var type = this.type === tt._this ? "ThisExpression" : "Super"
1934
+ node = this.startNode()
1935
+ this.next()
1936
+ return this.finishNode(node, type)
1937
+
1938
+ case tt.name:
1939
+ var startPos = this.start, startLoc = this.startLoc
1940
+ var id = this.parseIdent(this.type !== tt.name)
1941
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function))
1942
+ return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true)
1943
+ if (canBeArrow && !this.canInsertSemicolon()) {
1944
+ if (this.eat(tt.arrow))
1945
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false)
1946
+ if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) {
1947
+ id = this.parseIdent()
1948
+ if (this.canInsertSemicolon() || !this.eat(tt.arrow))
1949
+ this.unexpected()
1950
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true)
1951
+ }
1952
+ }
1953
+ return id
1954
+
1955
+ case tt.regexp:
1956
+ var value = this.value
1957
+ node = this.parseLiteral(value.value)
1958
+ node.regex = {pattern: value.pattern, flags: value.flags}
1959
+ return node
1960
+
1961
+ case tt.num: case tt.string:
1962
+ return this.parseLiteral(this.value)
1963
+
1964
+ case tt._null: case tt._true: case tt._false:
1965
+ node = this.startNode()
1966
+ node.value = this.type === tt._null ? null : this.type === tt._true
1967
+ node.raw = this.type.keyword
1968
+ this.next()
1969
+ return this.finishNode(node, "Literal")
1970
+
1971
+ case tt.parenL:
1972
+ var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow)
1973
+ if (refDestructuringErrors) {
1974
+ if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
1975
+ refDestructuringErrors.parenthesizedAssign = start
1976
+ if (refDestructuringErrors.parenthesizedBind < 0)
1977
+ refDestructuringErrors.parenthesizedBind = start
1978
+ }
1979
+ return expr
1980
+
1981
+ case tt.bracketL:
1982
+ node = this.startNode()
1983
+ this.next()
1984
+ node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
1985
+ return this.finishNode(node, "ArrayExpression")
1986
+
1987
+ case tt.braceL:
1988
+ return this.parseObj(false, refDestructuringErrors)
1989
+
1990
+ case tt._function:
1991
+ node = this.startNode()
1992
+ this.next()
1993
+ return this.parseFunction(node, false)
1994
+
1995
+ case tt._class:
1996
+ return this.parseClass(this.startNode(), false)
1997
+
1998
+ case tt._new:
1999
+ return this.parseNew()
2000
+
2001
+ case tt.backQuote:
2002
+ return this.parseTemplate()
2003
+
2004
+ default:
2005
+ this.unexpected()
2006
+ }
2007
+ }
2008
+
2009
+ pp$3.parseLiteral = function(value) {
2010
+ var node = this.startNode()
2011
+ node.value = value
2012
+ node.raw = this.input.slice(this.start, this.end)
2013
+ this.next()
2014
+ return this.finishNode(node, "Literal")
2015
+ }
2016
+
2017
+ pp$3.parseParenExpression = function() {
2018
+ this.expect(tt.parenL)
2019
+ var val = this.parseExpression()
2020
+ this.expect(tt.parenR)
2021
+ return val
2022
+ }
2023
+
2024
+ pp$3.parseParenAndDistinguishExpression = function(canBeArrow) {
2025
+ var this$1 = this;
2026
+
2027
+ var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
2028
+ if (this.options.ecmaVersion >= 6) {
2029
+ this.next()
2030
+
2031
+ var innerStartPos = this.start, innerStartLoc = this.startLoc
2032
+ var exprList = [], first = true, lastIsComma = false
2033
+ var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart
2034
+ this.yieldPos = 0
2035
+ this.awaitPos = 0
2036
+ while (this.type !== tt.parenR) {
2037
+ first ? first = false : this$1.expect(tt.comma)
2038
+ if (allowTrailingComma && this$1.afterTrailingComma(tt.parenR, true)) {
2039
+ lastIsComma = true
2040
+ break
2041
+ } else if (this$1.type === tt.ellipsis) {
2042
+ spreadStart = this$1.start
2043
+ exprList.push(this$1.parseParenItem(this$1.parseRest()))
2044
+ if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element")
2045
+ break
2046
+ } else {
2047
+ if (this$1.type === tt.parenL && !innerParenStart) {
2048
+ innerParenStart = this$1.start
2049
+ }
2050
+ exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem))
2051
+ }
2052
+ }
2053
+ var innerEndPos = this.start, innerEndLoc = this.startLoc
2054
+ this.expect(tt.parenR)
2055
+
2056
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
2057
+ this.checkPatternErrors(refDestructuringErrors, false)
2058
+ this.checkYieldAwaitInDefaultParams()
2059
+ if (innerParenStart) this.unexpected(innerParenStart)
2060
+ this.yieldPos = oldYieldPos
2061
+ this.awaitPos = oldAwaitPos
2062
+ return this.parseParenArrowList(startPos, startLoc, exprList)
2063
+ }
2064
+
2065
+ if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
2066
+ if (spreadStart) this.unexpected(spreadStart)
2067
+ this.checkExpressionErrors(refDestructuringErrors, true)
2068
+ this.yieldPos = oldYieldPos || this.yieldPos
2069
+ this.awaitPos = oldAwaitPos || this.awaitPos
2070
+
2071
+ if (exprList.length > 1) {
2072
+ val = this.startNodeAt(innerStartPos, innerStartLoc)
2073
+ val.expressions = exprList
2074
+ this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
2075
+ } else {
2076
+ val = exprList[0]
2077
+ }
2078
+ } else {
2079
+ val = this.parseParenExpression()
2080
+ }
2081
+
2082
+ if (this.options.preserveParens) {
2083
+ var par = this.startNodeAt(startPos, startLoc)
2084
+ par.expression = val
2085
+ return this.finishNode(par, "ParenthesizedExpression")
2086
+ } else {
2087
+ return val
2088
+ }
2089
+ }
2090
+
2091
+ pp$3.parseParenItem = function(item) {
2092
+ return item
2093
+ }
2094
+
2095
+ pp$3.parseParenArrowList = function(startPos, startLoc, exprList) {
2096
+ return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
2097
+ }
2098
+
2099
+ // New's precedence is slightly tricky. It must allow its argument to
2100
+ // be a `[]` or dot subscript expression, but not a call — at least,
2101
+ // not without wrapping it in parentheses. Thus, it uses the noCalls
2102
+ // argument to parseSubscripts to prevent it from consuming the
2103
+ // argument list.
2104
+
2105
+ var empty$1 = []
2106
+
2107
+ pp$3.parseNew = function() {
2108
+ var node = this.startNode()
2109
+ var meta = this.parseIdent(true)
2110
+ if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
2111
+ node.meta = meta
2112
+ node.property = this.parseIdent(true)
2113
+ if (node.property.name !== "target")
2114
+ this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target")
2115
+ if (!this.inFunction)
2116
+ this.raiseRecoverable(node.start, "new.target can only be used in functions")
2117
+ return this.finishNode(node, "MetaProperty")
2118
+ }
2119
+ var startPos = this.start, startLoc = this.startLoc
2120
+ node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
2121
+ if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
2122
+ else node.arguments = empty$1
2123
+ return this.finishNode(node, "NewExpression")
2124
+ }
2125
+
2126
+ // Parse template expression.
2127
+
2128
+ pp$3.parseTemplateElement = function() {
2129
+ var elem = this.startNode()
2130
+ elem.value = {
2131
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
2132
+ cooked: this.value
2133
+ }
2134
+ this.next()
2135
+ elem.tail = this.type === tt.backQuote
2136
+ return this.finishNode(elem, "TemplateElement")
2137
+ }
2138
+
2139
+ pp$3.parseTemplate = function() {
2140
+ var this$1 = this;
2141
+
2142
+ var node = this.startNode()
2143
+ this.next()
2144
+ node.expressions = []
2145
+ var curElt = this.parseTemplateElement()
2146
+ node.quasis = [curElt]
2147
+ while (!curElt.tail) {
2148
+ this$1.expect(tt.dollarBraceL)
2149
+ node.expressions.push(this$1.parseExpression())
2150
+ this$1.expect(tt.braceR)
2151
+ node.quasis.push(curElt = this$1.parseTemplateElement())
2152
+ }
2153
+ this.next()
2154
+ return this.finishNode(node, "TemplateLiteral")
2155
+ }
2156
+
2157
+ // Parse an object literal or binding pattern.
2158
+
2159
+ pp$3.parseObj = function(isPattern, refDestructuringErrors) {
2160
+ var this$1 = this;
2161
+
2162
+ var node = this.startNode(), first = true, propHash = {}
2163
+ node.properties = []
2164
+ this.next()
2165
+ while (!this.eat(tt.braceR)) {
2166
+ if (!first) {
2167
+ this$1.expect(tt.comma)
2168
+ if (this$1.afterTrailingComma(tt.braceR)) break
2169
+ } else first = false
2170
+
2171
+ var prop = this$1.startNode(), isGenerator, isAsync, startPos, startLoc
2172
+ if (this$1.options.ecmaVersion >= 6) {
2173
+ prop.method = false
2174
+ prop.shorthand = false
2175
+ if (isPattern || refDestructuringErrors) {
2176
+ startPos = this$1.start
2177
+ startLoc = this$1.startLoc
2178
+ }
2179
+ if (!isPattern)
2180
+ isGenerator = this$1.eat(tt.star)
2181
+ }
2182
+ this$1.parsePropertyName(prop)
2183
+ if (!isPattern && this$1.options.ecmaVersion >= 8 && !isGenerator && !prop.computed &&
2184
+ prop.key.type === "Identifier" && prop.key.name === "async" && this$1.type !== tt.parenL &&
2185
+ this$1.type !== tt.colon && !this$1.canInsertSemicolon()) {
2186
+ isAsync = true
2187
+ this$1.parsePropertyName(prop, refDestructuringErrors)
2188
+ } else {
2189
+ isAsync = false
2190
+ }
2191
+ this$1.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors)
2192
+ this$1.checkPropClash(prop, propHash)
2193
+ node.properties.push(this$1.finishNode(prop, "Property"))
2194
+ }
2195
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
2196
+ }
2197
+
2198
+ pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) {
2199
+ if ((isGenerator || isAsync) && this.type === tt.colon)
2200
+ this.unexpected()
2201
+
2202
+ if (this.eat(tt.colon)) {
2203
+ prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
2204
+ prop.kind = "init"
2205
+ } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
2206
+ if (isPattern) this.unexpected()
2207
+ prop.kind = "init"
2208
+ prop.method = true
2209
+ prop.value = this.parseMethod(isGenerator, isAsync)
2210
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
2211
+ (prop.key.name === "get" || prop.key.name === "set") &&
2212
+ (this.type != tt.comma && this.type != tt.braceR)) {
2213
+ if (isGenerator || isAsync || isPattern) this.unexpected()
2214
+ prop.kind = prop.key.name
2215
+ this.parsePropertyName(prop)
2216
+ prop.value = this.parseMethod(false)
2217
+ var paramCount = prop.kind === "get" ? 0 : 1
2218
+ if (prop.value.params.length !== paramCount) {
2219
+ var start = prop.value.start
2220
+ if (prop.kind === "get")
2221
+ this.raiseRecoverable(start, "getter should have no params")
2222
+ else
2223
+ this.raiseRecoverable(start, "setter should have exactly one param")
2224
+ } else {
2225
+ if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
2226
+ this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
2227
+ }
2228
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
2229
+ if (this.keywords.test(prop.key.name) ||
2230
+ (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) ||
2231
+ (this.inGenerator && prop.key.name == "yield") ||
2232
+ (this.inAsync && prop.key.name == "await"))
2233
+ this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property")
2234
+ prop.kind = "init"
2235
+ if (isPattern) {
2236
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
2237
+ } else if (this.type === tt.eq && refDestructuringErrors) {
2238
+ if (refDestructuringErrors.shorthandAssign < 0)
2239
+ refDestructuringErrors.shorthandAssign = this.start
2240
+ prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
2241
+ } else {
2242
+ prop.value = prop.key
2243
+ }
2244
+ prop.shorthand = true
2245
+ } else this.unexpected()
2246
+ }
2247
+
2248
+ pp$3.parsePropertyName = function(prop) {
2249
+ if (this.options.ecmaVersion >= 6) {
2250
+ if (this.eat(tt.bracketL)) {
2251
+ prop.computed = true
2252
+ prop.key = this.parseMaybeAssign()
2253
+ this.expect(tt.bracketR)
2254
+ return prop.key
2255
+ } else {
2256
+ prop.computed = false
2257
+ }
2258
+ }
2259
+ return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true)
2260
+ }
2261
+
2262
+ // Initialize empty function node.
2263
+
2264
+ pp$3.initFunction = function(node) {
2265
+ node.id = null
2266
+ if (this.options.ecmaVersion >= 6) {
2267
+ node.generator = false
2268
+ node.expression = false
2269
+ }
2270
+ if (this.options.ecmaVersion >= 8)
2271
+ node.async = false
2272
+ }
2273
+
2274
+ // Parse object or class method.
2275
+
2276
+ pp$3.parseMethod = function(isGenerator, isAsync) {
2277
+ var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync,
2278
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
2279
+
2280
+ this.initFunction(node)
2281
+ if (this.options.ecmaVersion >= 6)
2282
+ node.generator = isGenerator
2283
+ if (this.options.ecmaVersion >= 8)
2284
+ node.async = !!isAsync
2285
+
2286
+ this.inGenerator = node.generator
2287
+ this.inAsync = node.async
2288
+ this.yieldPos = 0
2289
+ this.awaitPos = 0
2290
+ this.inFunction = true
2291
+
2292
+ this.expect(tt.parenL)
2293
+ node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
2294
+ this.checkYieldAwaitInDefaultParams()
2295
+ this.parseFunctionBody(node, false)
2296
+
2297
+ this.inGenerator = oldInGen
2298
+ this.inAsync = oldInAsync
2299
+ this.yieldPos = oldYieldPos
2300
+ this.awaitPos = oldAwaitPos
2301
+ this.inFunction = oldInFunc
2302
+ return this.finishNode(node, "FunctionExpression")
2303
+ }
2304
+
2305
+ // Parse arrow function expression with given parameters.
2306
+
2307
+ pp$3.parseArrowExpression = function(node, params, isAsync) {
2308
+ var oldInGen = this.inGenerator, oldInAsync = this.inAsync,
2309
+ oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction
2310
+
2311
+ this.initFunction(node)
2312
+ if (this.options.ecmaVersion >= 8)
2313
+ node.async = !!isAsync
2314
+
2315
+ this.inGenerator = false
2316
+ this.inAsync = node.async
2317
+ this.yieldPos = 0
2318
+ this.awaitPos = 0
2319
+ this.inFunction = true
2320
+
2321
+ node.params = this.toAssignableList(params, true)
2322
+ this.parseFunctionBody(node, true)
2323
+
2324
+ this.inGenerator = oldInGen
2325
+ this.inAsync = oldInAsync
2326
+ this.yieldPos = oldYieldPos
2327
+ this.awaitPos = oldAwaitPos
2328
+ this.inFunction = oldInFunc
2329
+ return this.finishNode(node, "ArrowFunctionExpression")
2330
+ }
2331
+
2332
+ // Parse function body and check parameters.
2333
+
2334
+ pp$3.parseFunctionBody = function(node, isArrowFunction) {
2335
+ var isExpression = isArrowFunction && this.type !== tt.braceL
2336
+ var oldStrict = this.strict, useStrict = false
2337
+
2338
+ if (isExpression) {
2339
+ node.body = this.parseMaybeAssign()
2340
+ node.expression = true
2341
+ } else {
2342
+ var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params)
2343
+ if (!oldStrict || nonSimple) {
2344
+ useStrict = this.strictDirective(this.end)
2345
+ // If this is a strict mode function, verify that argument names
2346
+ // are not repeated, and it does not try to bind the words `eval`
2347
+ // or `arguments`.
2348
+ if (useStrict && nonSimple)
2349
+ this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list")
2350
+ }
2351
+ // Start a new scope with regard to labels and the `inFunction`
2352
+ // flag (restore them to their old value afterwards).
2353
+ var oldLabels = this.labels
2354
+ this.labels = []
2355
+ if (useStrict) this.strict = true
2356
+ node.body = this.parseBlock(true)
2357
+ node.expression = false
2358
+ this.labels = oldLabels
2359
+ }
2360
+
2361
+ if (oldStrict || useStrict) {
2362
+ this.strict = true
2363
+ if (node.id)
2364
+ this.checkLVal(node.id, true)
2365
+ this.checkParams(node)
2366
+ this.strict = oldStrict
2367
+ } else if (isArrowFunction || !this.isSimpleParamList(node.params)) {
2368
+ this.checkParams(node)
2369
+ }
2370
+ }
2371
+
2372
+ pp$3.isSimpleParamList = function(params) {
2373
+ for (var i = 0; i < params.length; i++)
2374
+ if (params[i].type !== "Identifier") return false
2375
+ return true
2376
+ }
2377
+
2378
+ // Checks function params for various disallowed patterns such as using "eval"
2379
+ // or "arguments" and duplicate parameters.
2380
+
2381
+ pp$3.checkParams = function(node) {
2382
+ var this$1 = this;
2383
+
2384
+ var nameHash = {}
2385
+ for (var i = 0; i < node.params.length; i++) this$1.checkLVal(node.params[i], true, nameHash)
2386
+ }
2387
+
2388
+ // Parses a comma-separated list of expressions, and returns them as
2389
+ // an array. `close` is the token type that ends the list, and
2390
+ // `allowEmpty` can be turned on to allow subsequent commas with
2391
+ // nothing in between them to be parsed as `null` (which is needed
2392
+ // for array literals).
2393
+
2394
+ pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
2395
+ var this$1 = this;
2396
+
2397
+ var elts = [], first = true
2398
+ while (!this.eat(close)) {
2399
+ if (!first) {
2400
+ this$1.expect(tt.comma)
2401
+ if (allowTrailingComma && this$1.afterTrailingComma(close)) break
2402
+ } else first = false
2403
+
2404
+ var elt
2405
+ if (allowEmpty && this$1.type === tt.comma)
2406
+ elt = null
2407
+ else if (this$1.type === tt.ellipsis) {
2408
+ elt = this$1.parseSpread(refDestructuringErrors)
2409
+ if (refDestructuringErrors && this$1.type === tt.comma && refDestructuringErrors.trailingComma < 0)
2410
+ refDestructuringErrors.trailingComma = this$1.start
2411
+ } else {
2412
+ elt = this$1.parseMaybeAssign(false, refDestructuringErrors)
2413
+ }
2414
+ elts.push(elt)
2415
+ }
2416
+ return elts
2417
+ }
2418
+
2419
+ // Parse the next token as an identifier. If `liberal` is true (used
2420
+ // when parsing properties), it will also convert keywords into
2421
+ // identifiers.
2422
+
2423
+ pp$3.parseIdent = function(liberal) {
2424
+ var node = this.startNode()
2425
+ if (liberal && this.options.allowReserved == "never") liberal = false
2426
+ if (this.type === tt.name) {
2427
+ if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) &&
2428
+ (this.options.ecmaVersion >= 6 ||
2429
+ this.input.slice(this.start, this.end).indexOf("\\") == -1))
2430
+ this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved")
2431
+ if (this.inGenerator && this.value === "yield")
2432
+ this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator")
2433
+ if (this.inAsync && this.value === "await")
2434
+ this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function")
2435
+ node.name = this.value
2436
+ } else if (liberal && this.type.keyword) {
2437
+ node.name = this.type.keyword
2438
+ } else {
2439
+ this.unexpected()
2440
+ }
2441
+ this.next()
2442
+ return this.finishNode(node, "Identifier")
2443
+ }
2444
+
2445
+ // Parses yield expression inside generator.
2446
+
2447
+ pp$3.parseYield = function() {
2448
+ if (!this.yieldPos) this.yieldPos = this.start
2449
+
2450
+ var node = this.startNode()
2451
+ this.next()
2452
+ if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
2453
+ node.delegate = false
2454
+ node.argument = null
2455
+ } else {
2456
+ node.delegate = this.eat(tt.star)
2457
+ node.argument = this.parseMaybeAssign()
2458
+ }
2459
+ return this.finishNode(node, "YieldExpression")
2460
+ }
2461
+
2462
+ pp$3.parseAwait = function() {
2463
+ if (!this.awaitPos) this.awaitPos = this.start
2464
+
2465
+ var node = this.startNode()
2466
+ this.next()
2467
+ node.argument = this.parseMaybeUnary(null, true)
2468
+ return this.finishNode(node, "AwaitExpression")
2469
+ }
2470
+
2471
+ var pp$4 = Parser.prototype
2472
+
2473
+ // This function is used to raise exceptions on parse errors. It
2474
+ // takes an offset integer (into the current `input`) to indicate
2475
+ // the location of the error, attaches the position to the end
2476
+ // of the error message, and then raises a `SyntaxError` with that
2477
+ // message.
2478
+
2479
+ pp$4.raise = function(pos, message) {
2480
+ var loc = getLineInfo(this.input, pos)
2481
+ message += " (" + loc.line + ":" + loc.column + ")"
2482
+ var err = new SyntaxError(message)
2483
+ err.pos = pos; err.loc = loc; err.raisedAt = this.pos
2484
+ throw err
2485
+ }
2486
+
2487
+ pp$4.raiseRecoverable = pp$4.raise
2488
+
2489
+ pp$4.curPosition = function() {
2490
+ if (this.options.locations) {
2491
+ return new Position(this.curLine, this.pos - this.lineStart)
2492
+ }
2493
+ }
2494
+
2495
+ var Node = function Node(parser, pos, loc) {
2496
+ this.type = ""
2497
+ this.start = pos
2498
+ this.end = 0
2499
+ if (parser.options.locations)
2500
+ this.loc = new SourceLocation(parser, loc)
2501
+ if (parser.options.directSourceFile)
2502
+ this.sourceFile = parser.options.directSourceFile
2503
+ if (parser.options.ranges)
2504
+ this.range = [pos, 0]
2505
+ };
2506
+
2507
+ // Start an AST node, attaching a start offset.
2508
+
2509
+ var pp$5 = Parser.prototype
2510
+
2511
+ pp$5.startNode = function() {
2512
+ return new Node(this, this.start, this.startLoc)
2513
+ }
2514
+
2515
+ pp$5.startNodeAt = function(pos, loc) {
2516
+ return new Node(this, pos, loc)
2517
+ }
2518
+
2519
+ // Finish an AST node, adding `type` and `end` properties.
2520
+
2521
+ function finishNodeAt(node, type, pos, loc) {
2522
+ node.type = type
2523
+ node.end = pos
2524
+ if (this.options.locations)
2525
+ node.loc.end = loc
2526
+ if (this.options.ranges)
2527
+ node.range[1] = pos
2528
+ return node
2529
+ }
2530
+
2531
+ pp$5.finishNode = function(node, type) {
2532
+ return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
2533
+ }
2534
+
2535
+ // Finish node at given position
2536
+
2537
+ pp$5.finishNodeAt = function(node, type, pos, loc) {
2538
+ return finishNodeAt.call(this, node, type, pos, loc)
2539
+ }
2540
+
2541
+ // The algorithm used to determine whether a regexp can appear at a
2542
+ // given point in the program is loosely based on sweet.js' approach.
2543
+ // See https://github.com/mozilla/sweet.js/wiki/design
2544
+
2545
+ var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
2546
+ this.token = token
2547
+ this.isExpr = !!isExpr
2548
+ this.preserveSpace = !!preserveSpace
2549
+ this.override = override
2550
+ };
2551
+
2552
+ var types = {
2553
+ b_stat: new TokContext("{", false),
2554
+ b_expr: new TokContext("{", true),
2555
+ b_tmpl: new TokContext("${", true),
2556
+ p_stat: new TokContext("(", false),
2557
+ p_expr: new TokContext("(", true),
2558
+ q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }),
2559
+ f_expr: new TokContext("function", true)
2560
+ }
2561
+
2562
+ var pp$6 = Parser.prototype
2563
+
2564
+ pp$6.initialContext = function() {
2565
+ return [types.b_stat]
2566
+ }
2567
+
2568
+ pp$6.braceIsBlock = function(prevType) {
2569
+ if (prevType === tt.colon) {
2570
+ var parent = this.curContext()
2571
+ if (parent === types.b_stat || parent === types.b_expr)
2572
+ return !parent.isExpr
2573
+ }
2574
+ if (prevType === tt._return)
2575
+ return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
2576
+ if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR)
2577
+ return true
2578
+ if (prevType == tt.braceL)
2579
+ return this.curContext() === types.b_stat
2580
+ return !this.exprAllowed
2581
+ }
2582
+
2583
+ pp$6.updateContext = function(prevType) {
2584
+ var update, type = this.type
2585
+ if (type.keyword && prevType == tt.dot)
2586
+ this.exprAllowed = false
2587
+ else if (update = type.updateContext)
2588
+ update.call(this, prevType)
2589
+ else
2590
+ this.exprAllowed = type.beforeExpr
2591
+ }
2592
+
2593
+ // Token-specific context update code
2594
+
2595
+ tt.parenR.updateContext = tt.braceR.updateContext = function() {
2596
+ if (this.context.length == 1) {
2597
+ this.exprAllowed = true
2598
+ return
2599
+ }
2600
+ var out = this.context.pop()
2601
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
2602
+ this.context.pop()
2603
+ this.exprAllowed = false
2604
+ } else if (out === types.b_tmpl) {
2605
+ this.exprAllowed = true
2606
+ } else {
2607
+ this.exprAllowed = !out.isExpr
2608
+ }
2609
+ }
2610
+
2611
+ tt.braceL.updateContext = function(prevType) {
2612
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
2613
+ this.exprAllowed = true
2614
+ }
2615
+
2616
+ tt.dollarBraceL.updateContext = function() {
2617
+ this.context.push(types.b_tmpl)
2618
+ this.exprAllowed = true
2619
+ }
2620
+
2621
+ tt.parenL.updateContext = function(prevType) {
2622
+ var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
2623
+ this.context.push(statementParens ? types.p_stat : types.p_expr)
2624
+ this.exprAllowed = true
2625
+ }
2626
+
2627
+ tt.incDec.updateContext = function() {
2628
+ // tokExprAllowed stays unchanged
2629
+ }
2630
+
2631
+ tt._function.updateContext = function(prevType) {
2632
+ if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else &&
2633
+ !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat))
2634
+ this.context.push(types.f_expr)
2635
+ this.exprAllowed = false
2636
+ }
2637
+
2638
+ tt.backQuote.updateContext = function() {
2639
+ if (this.curContext() === types.q_tmpl)
2640
+ this.context.pop()
2641
+ else
2642
+ this.context.push(types.q_tmpl)
2643
+ this.exprAllowed = false
2644
+ }
2645
+
2646
+ // Object type used to represent tokens. Note that normally, tokens
2647
+ // simply exist as properties on the parser object. This is only
2648
+ // used for the onToken callback and the external tokenizer.
2649
+
2650
+ var Token = function Token(p) {
2651
+ this.type = p.type
2652
+ this.value = p.value
2653
+ this.start = p.start
2654
+ this.end = p.end
2655
+ if (p.options.locations)
2656
+ this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
2657
+ if (p.options.ranges)
2658
+ this.range = [p.start, p.end]
2659
+ };
2660
+
2661
+ // ## Tokenizer
2662
+
2663
+ var pp$7 = Parser.prototype
2664
+
2665
+ // Are we running under Rhino?
2666
+ var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]"
2667
+
2668
+ // Move to the next token
2669
+
2670
+ pp$7.next = function() {
2671
+ if (this.options.onToken)
2672
+ this.options.onToken(new Token(this))
2673
+
2674
+ this.lastTokEnd = this.end
2675
+ this.lastTokStart = this.start
2676
+ this.lastTokEndLoc = this.endLoc
2677
+ this.lastTokStartLoc = this.startLoc
2678
+ this.nextToken()
2679
+ }
2680
+
2681
+ pp$7.getToken = function() {
2682
+ this.next()
2683
+ return new Token(this)
2684
+ }
2685
+
2686
+ // If we're in an ES6 environment, make parsers iterable
2687
+ if (typeof Symbol !== "undefined")
2688
+ pp$7[Symbol.iterator] = function () {
2689
+ var self = this
2690
+ return {next: function () {
2691
+ var token = self.getToken()
2692
+ return {
2693
+ done: token.type === tt.eof,
2694
+ value: token
2695
+ }
2696
+ }}
2697
+ }
2698
+
2699
+ // Toggle strict mode. Re-reads the next number or string to please
2700
+ // pedantic tests (`"use strict"; 010;` should fail).
2701
+
2702
+ pp$7.curContext = function() {
2703
+ return this.context[this.context.length - 1]
2704
+ }
2705
+
2706
+ // Read a single token, updating the parser object's token-related
2707
+ // properties.
2708
+
2709
+ pp$7.nextToken = function() {
2710
+ var curContext = this.curContext()
2711
+ if (!curContext || !curContext.preserveSpace) this.skipSpace()
2712
+
2713
+ this.start = this.pos
2714
+ if (this.options.locations) this.startLoc = this.curPosition()
2715
+ if (this.pos >= this.input.length) return this.finishToken(tt.eof)
2716
+
2717
+ if (curContext.override) return curContext.override(this)
2718
+ else this.readToken(this.fullCharCodeAtPos())
2719
+ }
2720
+
2721
+ pp$7.readToken = function(code) {
2722
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
2723
+ // identifiers, so '\' also dispatches to that.
2724
+ if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
2725
+ return this.readWord()
2726
+
2727
+ return this.getTokenFromCode(code)
2728
+ }
2729
+
2730
+ pp$7.fullCharCodeAtPos = function() {
2731
+ var code = this.input.charCodeAt(this.pos)
2732
+ if (code <= 0xd7ff || code >= 0xe000) return code
2733
+ var next = this.input.charCodeAt(this.pos + 1)
2734
+ return (code << 10) + next - 0x35fdc00
2735
+ }
2736
+
2737
+ pp$7.skipBlockComment = function() {
2738
+ var this$1 = this;
2739
+
2740
+ var startLoc = this.options.onComment && this.curPosition()
2741
+ var start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
2742
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
2743
+ this.pos = end + 2
2744
+ if (this.options.locations) {
2745
+ lineBreakG.lastIndex = start
2746
+ var match
2747
+ while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
2748
+ ++this$1.curLine
2749
+ this$1.lineStart = match.index + match[0].length
2750
+ }
2751
+ }
2752
+ if (this.options.onComment)
2753
+ this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
2754
+ startLoc, this.curPosition())
2755
+ }
2756
+
2757
+ pp$7.skipLineComment = function(startSkip) {
2758
+ var this$1 = this;
2759
+
2760
+ var start = this.pos
2761
+ var startLoc = this.options.onComment && this.curPosition()
2762
+ var ch = this.input.charCodeAt(this.pos+=startSkip)
2763
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
2764
+ ++this$1.pos
2765
+ ch = this$1.input.charCodeAt(this$1.pos)
2766
+ }
2767
+ if (this.options.onComment)
2768
+ this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
2769
+ startLoc, this.curPosition())
2770
+ }
2771
+
2772
+ // Called at the start of the parse and after every token. Skips
2773
+ // whitespace and comments, and.
2774
+
2775
+ pp$7.skipSpace = function() {
2776
+ var this$1 = this;
2777
+
2778
+ loop: while (this.pos < this.input.length) {
2779
+ var ch = this$1.input.charCodeAt(this$1.pos)
2780
+ switch (ch) {
2781
+ case 32: case 160: // ' '
2782
+ ++this$1.pos
2783
+ break
2784
+ case 13:
2785
+ if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
2786
+ ++this$1.pos
2787
+ }
2788
+ case 10: case 8232: case 8233:
2789
+ ++this$1.pos
2790
+ if (this$1.options.locations) {
2791
+ ++this$1.curLine
2792
+ this$1.lineStart = this$1.pos
2793
+ }
2794
+ break
2795
+ case 47: // '/'
2796
+ switch (this$1.input.charCodeAt(this$1.pos + 1)) {
2797
+ case 42: // '*'
2798
+ this$1.skipBlockComment()
2799
+ break
2800
+ case 47:
2801
+ this$1.skipLineComment(2)
2802
+ break
2803
+ default:
2804
+ break loop
2805
+ }
2806
+ break
2807
+ default:
2808
+ if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
2809
+ ++this$1.pos
2810
+ } else {
2811
+ break loop
2812
+ }
2813
+ }
2814
+ }
2815
+ }
2816
+
2817
+ // Called at the end of every token. Sets `end`, `val`, and
2818
+ // maintains `context` and `exprAllowed`, and skips the space after
2819
+ // the token, so that the next one's `start` will point at the
2820
+ // right position.
2821
+
2822
+ pp$7.finishToken = function(type, val) {
2823
+ this.end = this.pos
2824
+ if (this.options.locations) this.endLoc = this.curPosition()
2825
+ var prevType = this.type
2826
+ this.type = type
2827
+ this.value = val
2828
+
2829
+ this.updateContext(prevType)
2830
+ }
2831
+
2832
+ // ### Token reading
2833
+
2834
+ // This is the function that is called to fetch the next token. It
2835
+ // is somewhat obscure, because it works in character codes rather
2836
+ // than characters, and because operator parsing has been inlined
2837
+ // into it.
2838
+ //
2839
+ // All in the name of speed.
2840
+ //
2841
+ pp$7.readToken_dot = function() {
2842
+ var next = this.input.charCodeAt(this.pos + 1)
2843
+ if (next >= 48 && next <= 57) return this.readNumber(true)
2844
+ var next2 = this.input.charCodeAt(this.pos + 2)
2845
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
2846
+ this.pos += 3
2847
+ return this.finishToken(tt.ellipsis)
2848
+ } else {
2849
+ ++this.pos
2850
+ return this.finishToken(tt.dot)
2851
+ }
2852
+ }
2853
+
2854
+ pp$7.readToken_slash = function() { // '/'
2855
+ var next = this.input.charCodeAt(this.pos + 1)
2856
+ if (this.exprAllowed) {++this.pos; return this.readRegexp()}
2857
+ if (next === 61) return this.finishOp(tt.assign, 2)
2858
+ return this.finishOp(tt.slash, 1)
2859
+ }
2860
+
2861
+ pp$7.readToken_mult_modulo_exp = function(code) { // '%*'
2862
+ var next = this.input.charCodeAt(this.pos + 1)
2863
+ var size = 1
2864
+ var tokentype = code === 42 ? tt.star : tt.modulo
2865
+
2866
+ // exponentiation operator ** and **=
2867
+ if (this.options.ecmaVersion >= 7 && next === 42) {
2868
+ ++size
2869
+ tokentype = tt.starstar
2870
+ next = this.input.charCodeAt(this.pos + 2)
2871
+ }
2872
+
2873
+ if (next === 61) return this.finishOp(tt.assign, size + 1)
2874
+ return this.finishOp(tokentype, size)
2875
+ }
2876
+
2877
+ pp$7.readToken_pipe_amp = function(code) { // '|&'
2878
+ var next = this.input.charCodeAt(this.pos + 1)
2879
+ if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
2880
+ if (next === 61) return this.finishOp(tt.assign, 2)
2881
+ return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
2882
+ }
2883
+
2884
+ pp$7.readToken_caret = function() { // '^'
2885
+ var next = this.input.charCodeAt(this.pos + 1)
2886
+ if (next === 61) return this.finishOp(tt.assign, 2)
2887
+ return this.finishOp(tt.bitwiseXOR, 1)
2888
+ }
2889
+
2890
+ pp$7.readToken_plus_min = function(code) { // '+-'
2891
+ var next = this.input.charCodeAt(this.pos + 1)
2892
+ if (next === code) {
2893
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
2894
+ lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
2895
+ // A `-->` line comment
2896
+ this.skipLineComment(3)
2897
+ this.skipSpace()
2898
+ return this.nextToken()
2899
+ }
2900
+ return this.finishOp(tt.incDec, 2)
2901
+ }
2902
+ if (next === 61) return this.finishOp(tt.assign, 2)
2903
+ return this.finishOp(tt.plusMin, 1)
2904
+ }
2905
+
2906
+ pp$7.readToken_lt_gt = function(code) { // '<>'
2907
+ var next = this.input.charCodeAt(this.pos + 1)
2908
+ var size = 1
2909
+ if (next === code) {
2910
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
2911
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
2912
+ return this.finishOp(tt.bitShift, size)
2913
+ }
2914
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
2915
+ this.input.charCodeAt(this.pos + 3) == 45) {
2916
+ if (this.inModule) this.unexpected()
2917
+ // `<!--`, an XML-style comment that should be interpreted as a line comment
2918
+ this.skipLineComment(4)
2919
+ this.skipSpace()
2920
+ return this.nextToken()
2921
+ }
2922
+ if (next === 61) size = 2
2923
+ return this.finishOp(tt.relational, size)
2924
+ }
2925
+
2926
+ pp$7.readToken_eq_excl = function(code) { // '=!'
2927
+ var next = this.input.charCodeAt(this.pos + 1)
2928
+ if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
2929
+ if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
2930
+ this.pos += 2
2931
+ return this.finishToken(tt.arrow)
2932
+ }
2933
+ return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
2934
+ }
2935
+
2936
+ pp$7.getTokenFromCode = function(code) {
2937
+ switch (code) {
2938
+ // The interpretation of a dot depends on whether it is followed
2939
+ // by a digit or another two dots.
2940
+ case 46: // '.'
2941
+ return this.readToken_dot()
2942
+
2943
+ // Punctuation tokens.
2944
+ case 40: ++this.pos; return this.finishToken(tt.parenL)
2945
+ case 41: ++this.pos; return this.finishToken(tt.parenR)
2946
+ case 59: ++this.pos; return this.finishToken(tt.semi)
2947
+ case 44: ++this.pos; return this.finishToken(tt.comma)
2948
+ case 91: ++this.pos; return this.finishToken(tt.bracketL)
2949
+ case 93: ++this.pos; return this.finishToken(tt.bracketR)
2950
+ case 123: ++this.pos; return this.finishToken(tt.braceL)
2951
+ case 125: ++this.pos; return this.finishToken(tt.braceR)
2952
+ case 58: ++this.pos; return this.finishToken(tt.colon)
2953
+ case 63: ++this.pos; return this.finishToken(tt.question)
2954
+
2955
+ case 96: // '`'
2956
+ if (this.options.ecmaVersion < 6) break
2957
+ ++this.pos
2958
+ return this.finishToken(tt.backQuote)
2959
+
2960
+ case 48: // '0'
2961
+ var next = this.input.charCodeAt(this.pos + 1)
2962
+ if (next === 120 || next === 88) return this.readRadixNumber(16) // '0x', '0X' - hex number
2963
+ if (this.options.ecmaVersion >= 6) {
2964
+ if (next === 111 || next === 79) return this.readRadixNumber(8) // '0o', '0O' - octal number
2965
+ if (next === 98 || next === 66) return this.readRadixNumber(2) // '0b', '0B' - binary number
2966
+ }
2967
+ // Anything else beginning with a digit is an integer, octal
2968
+ // number, or float.
2969
+ case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
2970
+ return this.readNumber(false)
2971
+
2972
+ // Quotes produce strings.
2973
+ case 34: case 39: // '"', "'"
2974
+ return this.readString(code)
2975
+
2976
+ // Operators are parsed inline in tiny state machines. '=' (61) is
2977
+ // often referred to. `finishOp` simply skips the amount of
2978
+ // characters it is given as second argument, and returns a token
2979
+ // of the type given by its first argument.
2980
+
2981
+ case 47: // '/'
2982
+ return this.readToken_slash()
2983
+
2984
+ case 37: case 42: // '%*'
2985
+ return this.readToken_mult_modulo_exp(code)
2986
+
2987
+ case 124: case 38: // '|&'
2988
+ return this.readToken_pipe_amp(code)
2989
+
2990
+ case 94: // '^'
2991
+ return this.readToken_caret()
2992
+
2993
+ case 43: case 45: // '+-'
2994
+ return this.readToken_plus_min(code)
2995
+
2996
+ case 60: case 62: // '<>'
2997
+ return this.readToken_lt_gt(code)
2998
+
2999
+ case 61: case 33: // '=!'
3000
+ return this.readToken_eq_excl(code)
3001
+
3002
+ case 126: // '~'
3003
+ return this.finishOp(tt.prefix, 1)
3004
+ }
3005
+
3006
+ this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
3007
+ }
3008
+
3009
+ pp$7.finishOp = function(type, size) {
3010
+ var str = this.input.slice(this.pos, this.pos + size)
3011
+ this.pos += size
3012
+ return this.finishToken(type, str)
3013
+ }
3014
+
3015
+ // Parse a regular expression. Some context-awareness is necessary,
3016
+ // since a '/' inside a '[]' set does not end the expression.
3017
+
3018
+ function tryCreateRegexp(src, flags, throwErrorAt, parser) {
3019
+ try {
3020
+ return new RegExp(src, flags)
3021
+ } catch (e) {
3022
+ if (throwErrorAt !== undefined) {
3023
+ if (e instanceof SyntaxError) parser.raise(throwErrorAt, "Error parsing regular expression: " + e.message)
3024
+ throw e
3025
+ }
3026
+ }
3027
+ }
3028
+
3029
+ var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u")
3030
+
3031
+ pp$7.readRegexp = function() {
3032
+ var this$1 = this;
3033
+
3034
+ var escaped, inClass, start = this.pos
3035
+ for (;;) {
3036
+ if (this$1.pos >= this$1.input.length) this$1.raise(start, "Unterminated regular expression")
3037
+ var ch = this$1.input.charAt(this$1.pos)
3038
+ if (lineBreak.test(ch)) this$1.raise(start, "Unterminated regular expression")
3039
+ if (!escaped) {
3040
+ if (ch === "[") inClass = true
3041
+ else if (ch === "]" && inClass) inClass = false
3042
+ else if (ch === "/" && !inClass) break
3043
+ escaped = ch === "\\"
3044
+ } else escaped = false
3045
+ ++this$1.pos
3046
+ }
3047
+ var content = this.input.slice(start, this.pos)
3048
+ ++this.pos
3049
+ // Need to use `readWord1` because '\uXXXX' sequences are allowed
3050
+ // here (don't ask).
3051
+ var mods = this.readWord1()
3052
+ var tmp = content, tmpFlags = ""
3053
+ if (mods) {
3054
+ var validFlags = /^[gim]*$/
3055
+ if (this.options.ecmaVersion >= 6) validFlags = /^[gimuy]*$/
3056
+ if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
3057
+ if (mods.indexOf("u") >= 0) {
3058
+ if (regexpUnicodeSupport) {
3059
+ tmpFlags = "u"
3060
+ } else {
3061
+ // Replace each astral symbol and every Unicode escape sequence that
3062
+ // possibly represents an astral symbol or a paired surrogate with a
3063
+ // single ASCII symbol to avoid throwing on regular expressions that
3064
+ // are only valid in combination with the `/u` flag.
3065
+ // Note: replacing with the ASCII symbol `x` might cause false
3066
+ // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
3067
+ // perfectly valid pattern that is equivalent to `[a-b]`, but it would
3068
+ // be replaced by `[x-b]` which throws an error.
3069
+ tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (_match, code, offset) {
3070
+ code = Number("0x" + code)
3071
+ if (code > 0x10FFFF) this$1.raise(start + offset + 3, "Code point out of bounds")
3072
+ return "x"
3073
+ })
3074
+ tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
3075
+ tmpFlags = tmpFlags.replace("u", "")
3076
+ }
3077
+ }
3078
+ }
3079
+ // Detect invalid regular expressions.
3080
+ var value = null
3081
+ // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
3082
+ // so don't do detection if we are running under Rhino
3083
+ if (!isRhino) {
3084
+ tryCreateRegexp(tmp, tmpFlags, start, this)
3085
+ // Get a regular expression object for this pattern-flag pair, or `null` in
3086
+ // case the current environment doesn't support the flags it uses.
3087
+ value = tryCreateRegexp(content, mods)
3088
+ }
3089
+ return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
3090
+ }
3091
+
3092
+ // Read an integer in the given radix. Return null if zero digits
3093
+ // were read, the integer value otherwise. When `len` is given, this
3094
+ // will return `null` unless the integer has exactly `len` digits.
3095
+
3096
+ pp$7.readInt = function(radix, len) {
3097
+ var this$1 = this;
3098
+
3099
+ var start = this.pos, total = 0
3100
+ for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
3101
+ var code = this$1.input.charCodeAt(this$1.pos), val
3102
+ if (code >= 97) val = code - 97 + 10 // a
3103
+ else if (code >= 65) val = code - 65 + 10 // A
3104
+ else if (code >= 48 && code <= 57) val = code - 48 // 0-9
3105
+ else val = Infinity
3106
+ if (val >= radix) break
3107
+ ++this$1.pos
3108
+ total = total * radix + val
3109
+ }
3110
+ if (this.pos === start || len != null && this.pos - start !== len) return null
3111
+
3112
+ return total
3113
+ }
3114
+
3115
+ pp$7.readRadixNumber = function(radix) {
3116
+ this.pos += 2 // 0x
3117
+ var val = this.readInt(radix)
3118
+ if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
3119
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
3120
+ return this.finishToken(tt.num, val)
3121
+ }
3122
+
3123
+ // Read an integer, octal integer, or floating-point number.
3124
+
3125
+ pp$7.readNumber = function(startsWithDot) {
3126
+ var start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
3127
+ if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
3128
+ if (octal && this.pos == start + 1) octal = false
3129
+ var next = this.input.charCodeAt(this.pos)
3130
+ if (next === 46 && !octal) { // '.'
3131
+ ++this.pos
3132
+ this.readInt(10)
3133
+ isFloat = true
3134
+ next = this.input.charCodeAt(this.pos)
3135
+ }
3136
+ if ((next === 69 || next === 101) && !octal) { // 'eE'
3137
+ next = this.input.charCodeAt(++this.pos)
3138
+ if (next === 43 || next === 45) ++this.pos // '+-'
3139
+ if (this.readInt(10) === null) this.raise(start, "Invalid number")
3140
+ isFloat = true
3141
+ }
3142
+ if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
3143
+
3144
+ var str = this.input.slice(start, this.pos), val
3145
+ if (isFloat) val = parseFloat(str)
3146
+ else if (!octal || str.length === 1) val = parseInt(str, 10)
3147
+ else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
3148
+ else val = parseInt(str, 8)
3149
+ return this.finishToken(tt.num, val)
3150
+ }
3151
+
3152
+ // Read a string value, interpreting backslash-escapes.
3153
+
3154
+ pp$7.readCodePoint = function() {
3155
+ var ch = this.input.charCodeAt(this.pos), code
3156
+
3157
+ if (ch === 123) {
3158
+ if (this.options.ecmaVersion < 6) this.unexpected()
3159
+ var codePos = ++this.pos
3160
+ code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
3161
+ ++this.pos
3162
+ if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds")
3163
+ } else {
3164
+ code = this.readHexChar(4)
3165
+ }
3166
+ return code
3167
+ }
3168
+
3169
+ function codePointToString(code) {
3170
+ // UTF-16 Decoding
3171
+ if (code <= 0xFFFF) return String.fromCharCode(code)
3172
+ code -= 0x10000
3173
+ return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
3174
+ }
3175
+
3176
+ pp$7.readString = function(quote) {
3177
+ var this$1 = this;
3178
+
3179
+ var out = "", chunkStart = ++this.pos
3180
+ for (;;) {
3181
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated string constant")
3182
+ var ch = this$1.input.charCodeAt(this$1.pos)
3183
+ if (ch === quote) break
3184
+ if (ch === 92) { // '\'
3185
+ out += this$1.input.slice(chunkStart, this$1.pos)
3186
+ out += this$1.readEscapedChar(false)
3187
+ chunkStart = this$1.pos
3188
+ } else {
3189
+ if (isNewLine(ch)) this$1.raise(this$1.start, "Unterminated string constant")
3190
+ ++this$1.pos
3191
+ }
3192
+ }
3193
+ out += this.input.slice(chunkStart, this.pos++)
3194
+ return this.finishToken(tt.string, out)
3195
+ }
3196
+
3197
+ // Reads template string tokens.
3198
+
3199
+ pp$7.readTmplToken = function() {
3200
+ var this$1 = this;
3201
+
3202
+ var out = "", chunkStart = this.pos
3203
+ for (;;) {
3204
+ if (this$1.pos >= this$1.input.length) this$1.raise(this$1.start, "Unterminated template")
3205
+ var ch = this$1.input.charCodeAt(this$1.pos)
3206
+ if (ch === 96 || ch === 36 && this$1.input.charCodeAt(this$1.pos + 1) === 123) { // '`', '${'
3207
+ if (this$1.pos === this$1.start && this$1.type === tt.template) {
3208
+ if (ch === 36) {
3209
+ this$1.pos += 2
3210
+ return this$1.finishToken(tt.dollarBraceL)
3211
+ } else {
3212
+ ++this$1.pos
3213
+ return this$1.finishToken(tt.backQuote)
3214
+ }
3215
+ }
3216
+ out += this$1.input.slice(chunkStart, this$1.pos)
3217
+ return this$1.finishToken(tt.template, out)
3218
+ }
3219
+ if (ch === 92) { // '\'
3220
+ out += this$1.input.slice(chunkStart, this$1.pos)
3221
+ out += this$1.readEscapedChar(true)
3222
+ chunkStart = this$1.pos
3223
+ } else if (isNewLine(ch)) {
3224
+ out += this$1.input.slice(chunkStart, this$1.pos)
3225
+ ++this$1.pos
3226
+ switch (ch) {
3227
+ case 13:
3228
+ if (this$1.input.charCodeAt(this$1.pos) === 10) ++this$1.pos
3229
+ case 10:
3230
+ out += "\n"
3231
+ break
3232
+ default:
3233
+ out += String.fromCharCode(ch)
3234
+ break
3235
+ }
3236
+ if (this$1.options.locations) {
3237
+ ++this$1.curLine
3238
+ this$1.lineStart = this$1.pos
3239
+ }
3240
+ chunkStart = this$1.pos
3241
+ } else {
3242
+ ++this$1.pos
3243
+ }
3244
+ }
3245
+ }
3246
+
3247
+ // Used to read escaped characters
3248
+
3249
+ pp$7.readEscapedChar = function(inTemplate) {
3250
+ var ch = this.input.charCodeAt(++this.pos)
3251
+ ++this.pos
3252
+ switch (ch) {
3253
+ case 110: return "\n" // 'n' -> '\n'
3254
+ case 114: return "\r" // 'r' -> '\r'
3255
+ case 120: return String.fromCharCode(this.readHexChar(2)) // 'x'
3256
+ case 117: return codePointToString(this.readCodePoint()) // 'u'
3257
+ case 116: return "\t" // 't' -> '\t'
3258
+ case 98: return "\b" // 'b' -> '\b'
3259
+ case 118: return "\u000b" // 'v' -> '\u000b'
3260
+ case 102: return "\f" // 'f' -> '\f'
3261
+ case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos // '\r\n'
3262
+ case 10: // ' \n'
3263
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
3264
+ return ""
3265
+ default:
3266
+ if (ch >= 48 && ch <= 55) {
3267
+ var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]
3268
+ var octal = parseInt(octalStr, 8)
3269
+ if (octal > 255) {
3270
+ octalStr = octalStr.slice(0, -1)
3271
+ octal = parseInt(octalStr, 8)
3272
+ }
3273
+ if (octalStr !== "0" && (this.strict || inTemplate)) {
3274
+ this.raise(this.pos - 2, "Octal literal in strict mode")
3275
+ }
3276
+ this.pos += octalStr.length - 1
3277
+ return String.fromCharCode(octal)
3278
+ }
3279
+ return String.fromCharCode(ch)
3280
+ }
3281
+ }
3282
+
3283
+ // Used to read character escape sequences ('\x', '\u', '\U').
3284
+
3285
+ pp$7.readHexChar = function(len) {
3286
+ var codePos = this.pos
3287
+ var n = this.readInt(16, len)
3288
+ if (n === null) this.raise(codePos, "Bad character escape sequence")
3289
+ return n
3290
+ }
3291
+
3292
+ // Read an identifier, and return it as a string. Sets `this.containsEsc`
3293
+ // to whether the word contained a '\u' escape.
3294
+ //
3295
+ // Incrementally adds only escaped chars, adding other chunks as-is
3296
+ // as a micro-optimization.
3297
+
3298
+ pp$7.readWord1 = function() {
3299
+ var this$1 = this;
3300
+
3301
+ this.containsEsc = false
3302
+ var word = "", first = true, chunkStart = this.pos
3303
+ var astral = this.options.ecmaVersion >= 6
3304
+ while (this.pos < this.input.length) {
3305
+ var ch = this$1.fullCharCodeAtPos()
3306
+ if (isIdentifierChar(ch, astral)) {
3307
+ this$1.pos += ch <= 0xffff ? 1 : 2
3308
+ } else if (ch === 92) { // "\"
3309
+ this$1.containsEsc = true
3310
+ word += this$1.input.slice(chunkStart, this$1.pos)
3311
+ var escStart = this$1.pos
3312
+ if (this$1.input.charCodeAt(++this$1.pos) != 117) // "u"
3313
+ this$1.raise(this$1.pos, "Expecting Unicode escape sequence \\uXXXX")
3314
+ ++this$1.pos
3315
+ var esc = this$1.readCodePoint()
3316
+ if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
3317
+ this$1.raise(escStart, "Invalid Unicode escape")
3318
+ word += codePointToString(esc)
3319
+ chunkStart = this$1.pos
3320
+ } else {
3321
+ break
3322
+ }
3323
+ first = false
3324
+ }
3325
+ return word + this.input.slice(chunkStart, this.pos)
3326
+ }
3327
+
3328
+ // Read an identifier or keyword token. Will check for reserved
3329
+ // words when necessary.
3330
+
3331
+ pp$7.readWord = function() {
3332
+ var word = this.readWord1()
3333
+ var type = tt.name
3334
+ if (this.keywords.test(word)) {
3335
+ if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword " + word)
3336
+ type = keywordTypes[word]
3337
+ }
3338
+ return this.finishToken(type, word)
3339
+ }
3340
+
3341
+ // Acorn is a tiny, fast JavaScript parser written in JavaScript.
3342
+ //
3343
+ // Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
3344
+ // various contributors and released under an MIT license.
3345
+ //
3346
+ // Git repositories for Acorn are available at
3347
+ //
3348
+ // http://marijnhaverbeke.nl/git/acorn
3349
+ // https://github.com/ternjs/acorn.git
3350
+ //
3351
+ // Please use the [github bug tracker][ghbt] to report issues.
3352
+ //
3353
+ // [ghbt]: https://github.com/ternjs/acorn/issues
3354
+ //
3355
+ // This file defines the main parser interface. The library also comes
3356
+ // with a [error-tolerant parser][dammit] and an
3357
+ // [abstract syntax tree walker][walk], defined in other files.
3358
+ //
3359
+ // [dammit]: acorn_loose.js
3360
+ // [walk]: util/walk.js
3361
+
3362
+ var version = "4.0.11"
3363
+
3364
+ // The main exported interface (under `self.acorn` when in the
3365
+ // browser) is a `parse` function that takes a code string and
3366
+ // returns an abstract syntax tree as specified by [Mozilla parser
3367
+ // API][api].
3368
+ //
3369
+ // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
3370
+
3371
+ function parse(input, options) {
3372
+ return new Parser(options, input).parse()
3373
+ }
3374
+
3375
+ // This function tries to parse a single expression at a given
3376
+ // offset in a string. Useful for parsing mixed-language formats
3377
+ // that embed JavaScript expressions.
3378
+
3379
+ function parseExpressionAt(input, pos, options) {
3380
+ var p = new Parser(options, input, pos)
3381
+ p.nextToken()
3382
+ return p.parseExpression()
3383
+ }
3384
+
3385
+ // Acorn is organized as a tokenizer and a recursive-descent parser.
3386
+ // The `tokenizer` export provides an interface to the tokenizer.
3387
+
3388
+ function tokenizer(input, options) {
3389
+ return new Parser(options, input)
3390
+ }
3391
+
3392
+ // This is a terrible kludge to support the existing, pre-ES6
3393
+ // interface where the loose parser module retroactively adds exports
3394
+ // to this module.
3395
+ function addLooseExports(parse, Parser, plugins) {
3396
+ parse_dammit = parse
3397
+ LooseParser = Parser
3398
+ pluginsLoose = plugins
3399
+ }
3400
+
3401
+ export { version, parse, parseExpressionAt, tokenizer, parse_dammit, LooseParser, pluginsLoose, addLooseExports, Parser, plugins, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tt as tokTypes, keywordTypes, TokContext, types as tokContexts, isIdentifierChar, isIdentifierStart, Token, isNewLine, lineBreak, lineBreakG };