jass 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (503) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +47 -0
  3. data/README.md +45 -0
  4. data/lib/jass.rb +55 -0
  5. data/lib/jass/base.rb +141 -0
  6. data/lib/jass/bundle_processor.rb +28 -0
  7. data/lib/jass/compiler.rb +112 -0
  8. data/lib/jass/dependency.rb +14 -0
  9. data/lib/jass/errors.rb +29 -0
  10. data/lib/jass/es6_processor.rb +17 -0
  11. data/lib/jass/function.rb +13 -0
  12. data/lib/jass/global_directive_processor.rb +12 -0
  13. data/lib/jass/plugin.rb +13 -0
  14. data/lib/jass/railtie.rb +12 -0
  15. data/lib/jass/version.rb +3 -0
  16. data/vendor/node_modules/@types/acorn/index.d.ts +256 -0
  17. data/vendor/node_modules/@types/acorn/package.json +29 -0
  18. data/vendor/node_modules/@types/estree/index.d.ts +546 -0
  19. data/vendor/node_modules/@types/estree/package.json +22 -0
  20. data/vendor/node_modules/acorn-dynamic-import/lib/index.js +17 -0
  21. data/vendor/node_modules/acorn-dynamic-import/lib/inject.js +72 -0
  22. data/vendor/node_modules/acorn-dynamic-import/lib/walk.js +22 -0
  23. data/vendor/node_modules/acorn-dynamic-import/package.json +45 -0
  24. data/vendor/node_modules/acorn-dynamic-import/src/index.js +4 -0
  25. data/vendor/node_modules/acorn-dynamic-import/src/inject.js +52 -0
  26. data/vendor/node_modules/acorn-dynamic-import/src/walk.js +12 -0
  27. data/vendor/node_modules/acorn-es7-plugin/acorn-es7-plugin.js +17 -0
  28. data/vendor/node_modules/acorn-es7-plugin/acorn-v3.js +333 -0
  29. data/vendor/node_modules/acorn-es7-plugin/acorn-v4.js +194 -0
  30. data/vendor/node_modules/acorn-es7-plugin/package.json +29 -0
  31. data/vendor/node_modules/acorn-jsx/index.js +3 -0
  32. data/vendor/node_modules/acorn-jsx/inject.js +449 -0
  33. data/vendor/node_modules/acorn-jsx/package.json +28 -0
  34. data/vendor/node_modules/acorn-jsx/xhtml.js +255 -0
  35. data/vendor/node_modules/acorn/bin/_acorn.js +69 -0
  36. data/vendor/node_modules/acorn/bin/acorn +4 -0
  37. data/vendor/node_modules/acorn/bin/run_test262.js +22 -0
  38. data/vendor/node_modules/acorn/bin/test262.whitelist +409 -0
  39. data/vendor/node_modules/acorn/dist/acorn.es.js +5305 -0
  40. data/vendor/node_modules/acorn/dist/acorn.js +5336 -0
  41. data/vendor/node_modules/acorn/dist/acorn_loose.es.js +1412 -0
  42. data/vendor/node_modules/acorn/dist/acorn_loose.js +1422 -0
  43. data/vendor/node_modules/acorn/dist/walk.es.js +419 -0
  44. data/vendor/node_modules/acorn/dist/walk.js +439 -0
  45. data/vendor/node_modules/acorn/package.json +56 -0
  46. data/vendor/node_modules/ansi-styles/index.js +165 -0
  47. data/vendor/node_modules/ansi-styles/package.json +56 -0
  48. data/vendor/node_modules/arr-diff/index.js +58 -0
  49. data/vendor/node_modules/arr-diff/package.json +49 -0
  50. data/vendor/node_modules/arr-flatten/index.js +22 -0
  51. data/vendor/node_modules/arr-flatten/package.json +76 -0
  52. data/vendor/node_modules/array-unique/index.js +28 -0
  53. data/vendor/node_modules/array-unique/package.json +37 -0
  54. data/vendor/node_modules/braces/index.js +399 -0
  55. data/vendor/node_modules/braces/package.json +83 -0
  56. data/vendor/node_modules/buble/bin/buble +24 -0
  57. data/vendor/node_modules/buble/bin/handleError.js +58 -0
  58. data/vendor/node_modules/buble/bin/runBuble.js +150 -0
  59. data/vendor/node_modules/buble/bin/showHelp.js +16 -0
  60. data/vendor/node_modules/buble/dist/buble-browser-deps.umd.js +14857 -0
  61. data/vendor/node_modules/buble/dist/buble-browser.cjs.js +9941 -0
  62. data/vendor/node_modules/buble/dist/buble-browser.es.js +9933 -0
  63. data/vendor/node_modules/buble/dist/buble.cjs.js +9433 -0
  64. data/vendor/node_modules/buble/dist/buble.es.js +9425 -0
  65. data/vendor/node_modules/buble/package.json +74 -0
  66. data/vendor/node_modules/buble/register.js +90 -0
  67. data/vendor/node_modules/buble/src/index.js +98 -0
  68. data/vendor/node_modules/buble/src/program/BlockStatement.js +373 -0
  69. data/vendor/node_modules/buble/src/program/Node.js +112 -0
  70. data/vendor/node_modules/buble/src/program/Program.js +74 -0
  71. data/vendor/node_modules/buble/src/program/Scope.js +116 -0
  72. data/vendor/node_modules/buble/src/program/extractNames.js +35 -0
  73. data/vendor/node_modules/buble/src/program/keys.js +4 -0
  74. data/vendor/node_modules/buble/src/program/types/ArrayExpression.js +70 -0
  75. data/vendor/node_modules/buble/src/program/types/ArrowFunctionExpression.js +52 -0
  76. data/vendor/node_modules/buble/src/program/types/AssignmentExpression.js +185 -0
  77. data/vendor/node_modules/buble/src/program/types/BinaryExpression.js +12 -0
  78. data/vendor/node_modules/buble/src/program/types/BreakStatement.js +26 -0
  79. data/vendor/node_modules/buble/src/program/types/CallExpression.js +104 -0
  80. data/vendor/node_modules/buble/src/program/types/ClassBody.js +237 -0
  81. data/vendor/node_modules/buble/src/program/types/ClassDeclaration.js +79 -0
  82. data/vendor/node_modules/buble/src/program/types/ClassExpression.js +51 -0
  83. data/vendor/node_modules/buble/src/program/types/ContinueStatement.js +17 -0
  84. data/vendor/node_modules/buble/src/program/types/ExportDefaultDeclaration.js +10 -0
  85. data/vendor/node_modules/buble/src/program/types/ExportNamedDeclaration.js +10 -0
  86. data/vendor/node_modules/buble/src/program/types/ForInStatement.js +76 -0
  87. data/vendor/node_modules/buble/src/program/types/ForOfStatement.js +89 -0
  88. data/vendor/node_modules/buble/src/program/types/ForStatement.js +54 -0
  89. data/vendor/node_modules/buble/src/program/types/FunctionDeclaration.js +25 -0
  90. data/vendor/node_modules/buble/src/program/types/FunctionExpression.js +74 -0
  91. data/vendor/node_modules/buble/src/program/types/Identifier.js +54 -0
  92. data/vendor/node_modules/buble/src/program/types/IfStatement.js +29 -0
  93. data/vendor/node_modules/buble/src/program/types/ImportDeclaration.js +10 -0
  94. data/vendor/node_modules/buble/src/program/types/ImportDefaultSpecifier.js +8 -0
  95. data/vendor/node_modules/buble/src/program/types/ImportSpecifier.js +8 -0
  96. data/vendor/node_modules/buble/src/program/types/JSXAttribute.js +20 -0
  97. data/vendor/node_modules/buble/src/program/types/JSXClosingElement.js +27 -0
  98. data/vendor/node_modules/buble/src/program/types/JSXClosingFragment.js +22 -0
  99. data/vendor/node_modules/buble/src/program/types/JSXElement.js +57 -0
  100. data/vendor/node_modules/buble/src/program/types/JSXExpressionContainer.js +10 -0
  101. data/vendor/node_modules/buble/src/program/types/JSXFragment.js +4 -0
  102. data/vendor/node_modules/buble/src/program/types/JSXOpeningElement.js +93 -0
  103. data/vendor/node_modules/buble/src/program/types/JSXOpeningFragment.js +7 -0
  104. data/vendor/node_modules/buble/src/program/types/JSXSpreadAttribute.js +10 -0
  105. data/vendor/node_modules/buble/src/program/types/Literal.js +43 -0
  106. data/vendor/node_modules/buble/src/program/types/MemberExpression.js +13 -0
  107. data/vendor/node_modules/buble/src/program/types/NewExpression.js +55 -0
  108. data/vendor/node_modules/buble/src/program/types/ObjectExpression.js +250 -0
  109. data/vendor/node_modules/buble/src/program/types/Property.js +52 -0
  110. data/vendor/node_modules/buble/src/program/types/ReturnStatement.js +32 -0
  111. data/vendor/node_modules/buble/src/program/types/SpreadElement.js +12 -0
  112. data/vendor/node_modules/buble/src/program/types/Super.js +88 -0
  113. data/vendor/node_modules/buble/src/program/types/TaggedTemplateExpression.js +63 -0
  114. data/vendor/node_modules/buble/src/program/types/TemplateElement.js +7 -0
  115. data/vendor/node_modules/buble/src/program/types/TemplateLiteral.js +80 -0
  116. data/vendor/node_modules/buble/src/program/types/ThisExpression.js +31 -0
  117. data/vendor/node_modules/buble/src/program/types/UpdateExpression.js +32 -0
  118. data/vendor/node_modules/buble/src/program/types/VariableDeclaration.js +101 -0
  119. data/vendor/node_modules/buble/src/program/types/VariableDeclarator.js +43 -0
  120. data/vendor/node_modules/buble/src/program/types/index.js +98 -0
  121. data/vendor/node_modules/buble/src/program/types/shared/LoopStatement.js +105 -0
  122. data/vendor/node_modules/buble/src/program/types/shared/ModuleDeclaration.js +10 -0
  123. data/vendor/node_modules/buble/src/program/wrap.js +68 -0
  124. data/vendor/node_modules/buble/src/support.js +97 -0
  125. data/vendor/node_modules/buble/src/utils/CompileError.js +30 -0
  126. data/vendor/node_modules/buble/src/utils/array.js +11 -0
  127. data/vendor/node_modules/buble/src/utils/checkConst.js +8 -0
  128. data/vendor/node_modules/buble/src/utils/deindent.js +30 -0
  129. data/vendor/node_modules/buble/src/utils/destructure.js +377 -0
  130. data/vendor/node_modules/buble/src/utils/getSnippet.js +30 -0
  131. data/vendor/node_modules/buble/src/utils/isReference.js +41 -0
  132. data/vendor/node_modules/buble/src/utils/locate.js +20 -0
  133. data/vendor/node_modules/buble/src/utils/patterns.js +1 -0
  134. data/vendor/node_modules/buble/src/utils/removeTrailingComma.js +13 -0
  135. data/vendor/node_modules/buble/src/utils/reserved.js +6 -0
  136. data/vendor/node_modules/buble/src/utils/spread.js +70 -0
  137. data/vendor/node_modules/builtin-modules/builtin-modules.json +39 -0
  138. data/vendor/node_modules/builtin-modules/index.js +10 -0
  139. data/vendor/node_modules/builtin-modules/package.json +40 -0
  140. data/vendor/node_modules/builtin-modules/static.js +2 -0
  141. data/vendor/node_modules/chalk/index.js +228 -0
  142. data/vendor/node_modules/chalk/package.json +66 -0
  143. data/vendor/node_modules/chalk/templates.js +128 -0
  144. data/vendor/node_modules/chalk/types/index.d.ts +97 -0
  145. data/vendor/node_modules/color-convert/conversions.js +861 -0
  146. data/vendor/node_modules/color-convert/index.js +78 -0
  147. data/vendor/node_modules/color-convert/package.json +46 -0
  148. data/vendor/node_modules/color-convert/route.js +97 -0
  149. data/vendor/node_modules/color-name/index.js +152 -0
  150. data/vendor/node_modules/color-name/package.json +25 -0
  151. data/vendor/node_modules/color-name/test.js +7 -0
  152. data/vendor/node_modules/date-time/index.js +33 -0
  153. data/vendor/node_modules/date-time/package.json +39 -0
  154. data/vendor/node_modules/escape-string-regexp/index.js +11 -0
  155. data/vendor/node_modules/escape-string-regexp/package.json +41 -0
  156. data/vendor/node_modules/estree-walker/dist/estree-walker.es.js +57 -0
  157. data/vendor/node_modules/estree-walker/dist/estree-walker.umd.js +68 -0
  158. data/vendor/node_modules/estree-walker/package.json +34 -0
  159. data/vendor/node_modules/estree-walker/src/estree-walker.js +51 -0
  160. data/vendor/node_modules/expand-brackets/index.js +163 -0
  161. data/vendor/node_modules/expand-brackets/package.json +62 -0
  162. data/vendor/node_modules/expand-range/index.js +43 -0
  163. data/vendor/node_modules/expand-range/package.json +73 -0
  164. data/vendor/node_modules/extglob/index.js +178 -0
  165. data/vendor/node_modules/extglob/package.json +60 -0
  166. data/vendor/node_modules/filename-regex/index.js +10 -0
  167. data/vendor/node_modules/filename-regex/package.json +50 -0
  168. data/vendor/node_modules/fill-range/index.js +408 -0
  169. data/vendor/node_modules/fill-range/package.json +61 -0
  170. data/vendor/node_modules/for-in/index.js +16 -0
  171. data/vendor/node_modules/for-in/package.json +68 -0
  172. data/vendor/node_modules/for-own/index.js +19 -0
  173. data/vendor/node_modules/for-own/package.json +70 -0
  174. data/vendor/node_modules/glob-base/index.js +51 -0
  175. data/vendor/node_modules/glob-base/package.json +52 -0
  176. data/vendor/node_modules/glob-parent/index.js +10 -0
  177. data/vendor/node_modules/glob-parent/package.json +35 -0
  178. data/vendor/node_modules/glob-parent/test.js +28 -0
  179. data/vendor/node_modules/has-flag/index.js +8 -0
  180. data/vendor/node_modules/has-flag/package.json +44 -0
  181. data/vendor/node_modules/irregular-plurals/irregular-plurals.json +146 -0
  182. data/vendor/node_modules/irregular-plurals/package.json +39 -0
  183. data/vendor/node_modules/is-buffer/index.js +21 -0
  184. data/vendor/node_modules/is-buffer/package.json +51 -0
  185. data/vendor/node_modules/is-dotfile/index.js +14 -0
  186. data/vendor/node_modules/is-dotfile/package.json +69 -0
  187. data/vendor/node_modules/is-equal-shallow/index.js +27 -0
  188. data/vendor/node_modules/is-equal-shallow/package.json +54 -0
  189. data/vendor/node_modules/is-extendable/index.js +13 -0
  190. data/vendor/node_modules/is-extendable/package.json +51 -0
  191. data/vendor/node_modules/is-extglob/index.js +11 -0
  192. data/vendor/node_modules/is-extglob/package.json +48 -0
  193. data/vendor/node_modules/is-glob/index.js +14 -0
  194. data/vendor/node_modules/is-glob/package.json +60 -0
  195. data/vendor/node_modules/is-module/index.js +11 -0
  196. data/vendor/node_modules/is-module/package.json +20 -0
  197. data/vendor/node_modules/is-number/index.js +19 -0
  198. data/vendor/node_modules/is-number/package.json +59 -0
  199. data/vendor/node_modules/is-posix-bracket/index.js +10 -0
  200. data/vendor/node_modules/is-posix-bracket/package.json +64 -0
  201. data/vendor/node_modules/is-primitive/index.js +13 -0
  202. data/vendor/node_modules/is-primitive/package.json +46 -0
  203. data/vendor/node_modules/is-reference/dist/is-reference.es.js +26 -0
  204. data/vendor/node_modules/is-reference/dist/is-reference.js +34 -0
  205. data/vendor/node_modules/is-reference/dist/types/index.d.ts +2 -0
  206. data/vendor/node_modules/is-reference/package.json +47 -0
  207. data/vendor/node_modules/isarray/index.js +5 -0
  208. data/vendor/node_modules/isarray/package.json +45 -0
  209. data/vendor/node_modules/isarray/test.js +20 -0
  210. data/vendor/node_modules/isobject/index.js +14 -0
  211. data/vendor/node_modules/isobject/package.json +67 -0
  212. data/vendor/node_modules/kind-of/index.js +116 -0
  213. data/vendor/node_modules/kind-of/package.json +90 -0
  214. data/vendor/node_modules/locate-character/dist/locate-character.es.js +43 -0
  215. data/vendor/node_modules/locate-character/dist/locate-character.umd.js +54 -0
  216. data/vendor/node_modules/locate-character/dist/types/index.d.ts +17 -0
  217. data/vendor/node_modules/locate-character/package.json +41 -0
  218. data/vendor/node_modules/magic-string/dist/magic-string.cjs.js +1300 -0
  219. data/vendor/node_modules/magic-string/dist/magic-string.es.js +1296 -0
  220. data/vendor/node_modules/magic-string/dist/magic-string.umd.js +1352 -0
  221. data/vendor/node_modules/magic-string/index.d.ts +83 -0
  222. data/vendor/node_modules/magic-string/node_modules/vlq/dist/vlq.js +91 -0
  223. data/vendor/node_modules/magic-string/node_modules/vlq/package.json +27 -0
  224. data/vendor/node_modules/magic-string/node_modules/vlq/src/vlq.js +78 -0
  225. data/vendor/node_modules/magic-string/package.json +55 -0
  226. data/vendor/node_modules/micromatch/index.js +431 -0
  227. data/vendor/node_modules/micromatch/lib/chars.js +67 -0
  228. data/vendor/node_modules/micromatch/lib/expand.js +304 -0
  229. data/vendor/node_modules/micromatch/lib/glob.js +193 -0
  230. data/vendor/node_modules/micromatch/lib/utils.js +149 -0
  231. data/vendor/node_modules/micromatch/package.json +114 -0
  232. data/vendor/node_modules/minimist/index.js +236 -0
  233. data/vendor/node_modules/minimist/package.json +45 -0
  234. data/vendor/node_modules/nodent-compiler/compiler.js +171 -0
  235. data/vendor/node_modules/nodent-compiler/lib/arboriculture.js +2694 -0
  236. data/vendor/node_modules/nodent-compiler/lib/output.js +934 -0
  237. data/vendor/node_modules/nodent-compiler/lib/parser.js +291 -0
  238. data/vendor/node_modules/nodent-compiler/package.json +37 -0
  239. data/vendor/node_modules/normalize-path/index.js +19 -0
  240. data/vendor/node_modules/normalize-path/package.json +78 -0
  241. data/vendor/node_modules/object.omit/index.js +40 -0
  242. data/vendor/node_modules/object.omit/package.json +67 -0
  243. data/vendor/node_modules/os-homedir/index.js +24 -0
  244. data/vendor/node_modules/os-homedir/package.json +41 -0
  245. data/vendor/node_modules/parse-glob/index.js +156 -0
  246. data/vendor/node_modules/parse-glob/package.json +62 -0
  247. data/vendor/node_modules/parse-ms/index.js +16 -0
  248. data/vendor/node_modules/parse-ms/package.json +34 -0
  249. data/vendor/node_modules/path-parse/index.js +93 -0
  250. data/vendor/node_modules/path-parse/index.min.js +1 -0
  251. data/vendor/node_modules/path-parse/package.json +33 -0
  252. data/vendor/node_modules/path-parse/test.js +77 -0
  253. data/vendor/node_modules/path-parse/test.min.js +1 -0
  254. data/vendor/node_modules/plur/index.js +20 -0
  255. data/vendor/node_modules/plur/package.json +42 -0
  256. data/vendor/node_modules/preserve/index.js +54 -0
  257. data/vendor/node_modules/preserve/package.json +48 -0
  258. data/vendor/node_modules/preserve/test.js +48 -0
  259. data/vendor/node_modules/pretty-ms/index.js +48 -0
  260. data/vendor/node_modules/pretty-ms/package.json +48 -0
  261. data/vendor/node_modules/randomatic/index.js +82 -0
  262. data/vendor/node_modules/randomatic/node_modules/is-number/index.js +22 -0
  263. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/index.js +116 -0
  264. data/vendor/node_modules/randomatic/node_modules/is-number/node_modules/kind-of/package.json +90 -0
  265. data/vendor/node_modules/randomatic/node_modules/is-number/package.json +83 -0
  266. data/vendor/node_modules/randomatic/node_modules/kind-of/index.js +119 -0
  267. data/vendor/node_modules/randomatic/node_modules/kind-of/package.json +90 -0
  268. data/vendor/node_modules/randomatic/package.json +78 -0
  269. data/vendor/node_modules/regex-cache/index.js +68 -0
  270. data/vendor/node_modules/regex-cache/package.json +64 -0
  271. data/vendor/node_modules/remove-trailing-separator/index.js +17 -0
  272. data/vendor/node_modules/remove-trailing-separator/package.json +37 -0
  273. data/vendor/node_modules/repeat-element/index.js +18 -0
  274. data/vendor/node_modules/repeat-element/package.json +44 -0
  275. data/vendor/node_modules/repeat-string/index.js +70 -0
  276. data/vendor/node_modules/repeat-string/package.json +77 -0
  277. data/vendor/node_modules/require-relative/index.js +33 -0
  278. data/vendor/node_modules/require-relative/package.json +22 -0
  279. data/vendor/node_modules/resolve/index.js +8 -0
  280. data/vendor/node_modules/resolve/lib/async.js +203 -0
  281. data/vendor/node_modules/resolve/lib/caller.js +8 -0
  282. data/vendor/node_modules/resolve/lib/core.js +53 -0
  283. data/vendor/node_modules/resolve/lib/core.json +69 -0
  284. data/vendor/node_modules/resolve/lib/node-modules-paths.js +45 -0
  285. data/vendor/node_modules/resolve/lib/sync.js +93 -0
  286. data/vendor/node_modules/resolve/package.json +40 -0
  287. data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.cjs.js +804 -0
  288. data/vendor/node_modules/rollup-plugin-commonjs/dist/rollup-plugin-commonjs.es.js +800 -0
  289. data/vendor/node_modules/rollup-plugin-commonjs/package.json +52 -0
  290. data/vendor/node_modules/rollup-plugin-commonjs/src/ast-utils.js +104 -0
  291. data/vendor/node_modules/rollup-plugin-commonjs/src/defaultResolver.js +39 -0
  292. data/vendor/node_modules/rollup-plugin-commonjs/src/helpers.js +19 -0
  293. data/vendor/node_modules/rollup-plugin-commonjs/src/index.js +198 -0
  294. data/vendor/node_modules/rollup-plugin-commonjs/src/transform.js +431 -0
  295. data/vendor/node_modules/rollup-plugin-commonjs/src/utils.js +13 -0
  296. data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js +218 -0
  297. data/vendor/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.es.js +214 -0
  298. data/vendor/node_modules/rollup-plugin-node-resolve/package.json +51 -0
  299. data/vendor/node_modules/rollup-plugin-node-resolve/src/empty.js +1 -0
  300. data/vendor/node_modules/rollup-plugin-node-resolve/src/index.js +205 -0
  301. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.cjs.js +223 -0
  302. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es.js +214 -0
  303. data/vendor/node_modules/rollup-pluginutils/dist/pluginutils.es6.js +217 -0
  304. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es.js +55 -0
  305. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.es6.js +59 -0
  306. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/dist/estree-walker.umd.js +65 -0
  307. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/package.json +33 -0
  308. data/vendor/node_modules/rollup-pluginutils/node_modules/estree-walker/src/estree-walker.js +49 -0
  309. data/vendor/node_modules/rollup-pluginutils/package.json +40 -0
  310. data/vendor/node_modules/rollup-pluginutils/src/addExtension.js +6 -0
  311. data/vendor/node_modules/rollup-pluginutils/src/attachScopes.js +147 -0
  312. data/vendor/node_modules/rollup-pluginutils/src/createFilter.js +33 -0
  313. data/vendor/node_modules/rollup-pluginutils/src/index.js +4 -0
  314. data/vendor/node_modules/rollup-pluginutils/src/makeLegalIdentifier.js +15 -0
  315. data/vendor/node_modules/rollup-pluginutils/src/utils/ensureArray.js +5 -0
  316. data/vendor/node_modules/rollup/bin/rollup +4085 -0
  317. data/vendor/node_modules/rollup/dist/rollup.browser.js +19829 -0
  318. data/vendor/node_modules/rollup/dist/rollup.es.js +23586 -0
  319. data/vendor/node_modules/rollup/dist/rollup.js +23597 -0
  320. data/vendor/node_modules/rollup/dist/typings/Chunk.d.ts +85 -0
  321. data/vendor/node_modules/rollup/dist/typings/ExternalModule.d.ts +30 -0
  322. data/vendor/node_modules/rollup/dist/typings/Graph.d.ts +47 -0
  323. data/vendor/node_modules/rollup/dist/typings/Module.d.ts +130 -0
  324. data/vendor/node_modules/rollup/dist/typings/ast/CallOptions.d.ts +20 -0
  325. data/vendor/node_modules/rollup/dist/typings/ast/Entity.d.ts +16 -0
  326. data/vendor/node_modules/rollup/dist/typings/ast/ExecutionPathOptions.d.ts +57 -0
  327. data/vendor/node_modules/rollup/dist/typings/ast/clone.d.ts +1 -0
  328. data/vendor/node_modules/rollup/dist/typings/ast/enhance.d.ts +3 -0
  329. data/vendor/node_modules/rollup/dist/typings/ast/keys.d.ts +4 -0
  330. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrayExpression.d.ts +14 -0
  331. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrayPattern.d.ts +14 -0
  332. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ArrowFunctionExpression.d.ts +25 -0
  333. data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentExpression.d.ts +13 -0
  334. data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentPattern.d.ts +16 -0
  335. data/vendor/node_modules/rollup/dist/typings/ast/nodes/AssignmentProperty.d.ts +10 -0
  336. data/vendor/node_modules/rollup/dist/typings/ast/nodes/AwaitExpression.d.ts +8 -0
  337. data/vendor/node_modules/rollup/dist/typings/ast/nodes/BinaryExpression.d.ts +13 -0
  338. data/vendor/node_modules/rollup/dist/typings/ast/nodes/BlockStatement.d.ts +19 -0
  339. data/vendor/node_modules/rollup/dist/typings/ast/nodes/BreakStatement.d.ts +9 -0
  340. data/vendor/node_modules/rollup/dist/typings/ast/nodes/CallExpression.d.ts +22 -0
  341. data/vendor/node_modules/rollup/dist/typings/ast/nodes/CatchClause.d.ts +14 -0
  342. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassBody.d.ts +13 -0
  343. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassDeclaration.d.ts +14 -0
  344. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ClassExpression.d.ts +10 -0
  345. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ConditionalExpression.d.ts +28 -0
  346. data/vendor/node_modules/rollup/dist/typings/ast/nodes/DoWhileStatement.d.ts +9 -0
  347. data/vendor/node_modules/rollup/dist/typings/ast/nodes/EmptyStatement.d.ts +8 -0
  348. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportAllDeclaration.d.ts +12 -0
  349. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportDefaultDeclaration.d.ts +21 -0
  350. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportNamedDeclaration.d.ts +21 -0
  351. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExportSpecifier.d.ts +8 -0
  352. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ExpressionStatement.d.ts +10 -0
  353. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForInStatement.d.ts +20 -0
  354. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForOfStatement.d.ts +21 -0
  355. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ForStatement.d.ts +19 -0
  356. data/vendor/node_modules/rollup/dist/typings/ast/nodes/FunctionDeclaration.d.ts +9 -0
  357. data/vendor/node_modules/rollup/dist/typings/ast/nodes/FunctionExpression.d.ts +6 -0
  358. data/vendor/node_modules/rollup/dist/typings/ast/nodes/Identifier.d.ts +29 -0
  359. data/vendor/node_modules/rollup/dist/typings/ast/nodes/IfStatement.d.ts +17 -0
  360. data/vendor/node_modules/rollup/dist/typings/ast/nodes/Import.d.ts +14 -0
  361. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportDeclaration.d.ts +17 -0
  362. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportDefaultSpecifier.d.ts +7 -0
  363. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportNamespaceSpecifier.d.ts +7 -0
  364. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ImportSpecifier.d.ts +8 -0
  365. data/vendor/node_modules/rollup/dist/typings/ast/nodes/LabeledStatement.d.ts +10 -0
  366. data/vendor/node_modules/rollup/dist/typings/ast/nodes/Literal.d.ts +22 -0
  367. data/vendor/node_modules/rollup/dist/typings/ast/nodes/LogicalExpression.d.ts +23 -0
  368. data/vendor/node_modules/rollup/dist/typings/ast/nodes/MemberExpression.d.ts +34 -0
  369. data/vendor/node_modules/rollup/dist/typings/ast/nodes/MethodDefinition.d.ts +16 -0
  370. data/vendor/node_modules/rollup/dist/typings/ast/nodes/NewExpression.d.ts +14 -0
  371. data/vendor/node_modules/rollup/dist/typings/ast/nodes/NodeType.d.ts +64 -0
  372. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ObjectExpression.d.ts +22 -0
  373. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ObjectPattern.d.ts +15 -0
  374. data/vendor/node_modules/rollup/dist/typings/ast/nodes/Program.d.ts +9 -0
  375. data/vendor/node_modules/rollup/dist/typings/ast/nodes/Property.d.ts +30 -0
  376. data/vendor/node_modules/rollup/dist/typings/ast/nodes/RestElement.d.ts +14 -0
  377. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ReturnStatement.d.ts +9 -0
  378. data/vendor/node_modules/rollup/dist/typings/ast/nodes/SequenceExpression.d.ts +13 -0
  379. data/vendor/node_modules/rollup/dist/typings/ast/nodes/SpreadElement.d.ts +6 -0
  380. data/vendor/node_modules/rollup/dist/typings/ast/nodes/SwitchCase.d.ts +11 -0
  381. data/vendor/node_modules/rollup/dist/typings/ast/nodes/SwitchStatement.d.ts +12 -0
  382. data/vendor/node_modules/rollup/dist/typings/ast/nodes/TaggedTemplateExpression.d.ts +13 -0
  383. data/vendor/node_modules/rollup/dist/typings/ast/nodes/TemplateElement.d.ts +12 -0
  384. data/vendor/node_modules/rollup/dist/typings/ast/nodes/TemplateLiteral.d.ts +12 -0
  385. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ThisExpression.d.ts +17 -0
  386. data/vendor/node_modules/rollup/dist/typings/ast/nodes/ThrowStatement.d.ts +8 -0
  387. data/vendor/node_modules/rollup/dist/typings/ast/nodes/UnaryExpression.d.ts +16 -0
  388. data/vendor/node_modules/rollup/dist/typings/ast/nodes/UnknownNode.d.ts +5 -0
  389. data/vendor/node_modules/rollup/dist/typings/ast/nodes/UpdateExpression.d.ts +13 -0
  390. data/vendor/node_modules/rollup/dist/typings/ast/nodes/VariableDeclaration.d.ts +21 -0
  391. data/vendor/node_modules/rollup/dist/typings/ast/nodes/VariableDeclarator.d.ts +13 -0
  392. data/vendor/node_modules/rollup/dist/typings/ast/nodes/WhileStatement.d.ts +9 -0
  393. data/vendor/node_modules/rollup/dist/typings/ast/nodes/YieldExpression.d.ts +9 -0
  394. data/vendor/node_modules/rollup/dist/typings/ast/nodes/index.d.ts +6 -0
  395. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/ClassNode.d.ts +17 -0
  396. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Expression.d.ts +21 -0
  397. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/FunctionNode.d.ts +25 -0
  398. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Node.d.ts +133 -0
  399. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/Pattern.d.ts +4 -0
  400. data/vendor/node_modules/rollup/dist/typings/ast/nodes/shared/pureFunctions.d.ts +4 -0
  401. data/vendor/node_modules/rollup/dist/typings/ast/scopes/BlockScope.d.ts +9 -0
  402. data/vendor/node_modules/rollup/dist/typings/ast/scopes/CatchScope.d.ts +10 -0
  403. data/vendor/node_modules/rollup/dist/typings/ast/scopes/FunctionScope.d.ts +20 -0
  404. data/vendor/node_modules/rollup/dist/typings/ast/scopes/GlobalScope.d.ts +7 -0
  405. data/vendor/node_modules/rollup/dist/typings/ast/scopes/ModuleScope.d.ts +11 -0
  406. data/vendor/node_modules/rollup/dist/typings/ast/scopes/ParameterScope.d.ts +16 -0
  407. data/vendor/node_modules/rollup/dist/typings/ast/scopes/ReturnValueScope.d.ts +11 -0
  408. data/vendor/node_modules/rollup/dist/typings/ast/scopes/Scope.d.ts +42 -0
  409. data/vendor/node_modules/rollup/dist/typings/ast/utils/extractNames.d.ts +2 -0
  410. data/vendor/node_modules/rollup/dist/typings/ast/values.d.ts +31 -0
  411. data/vendor/node_modules/rollup/dist/typings/ast/variables/ArgumentsVariable.d.ts +15 -0
  412. data/vendor/node_modules/rollup/dist/typings/ast/variables/ExportDefaultVariable.d.ts +16 -0
  413. data/vendor/node_modules/rollup/dist/typings/ast/variables/ExternalVariable.d.ts +12 -0
  414. data/vendor/node_modules/rollup/dist/typings/ast/variables/GlobalVariable.d.ts +11 -0
  415. data/vendor/node_modules/rollup/dist/typings/ast/variables/LocalVariable.d.ts +21 -0
  416. data/vendor/node_modules/rollup/dist/typings/ast/variables/NamespaceVariable.d.ts +20 -0
  417. data/vendor/node_modules/rollup/dist/typings/ast/variables/ParameterVariable.d.ts +5 -0
  418. data/vendor/node_modules/rollup/dist/typings/ast/variables/ReplaceableInitializationVariable.d.ts +14 -0
  419. data/vendor/node_modules/rollup/dist/typings/ast/variables/ThisVariable.d.ts +4 -0
  420. data/vendor/node_modules/rollup/dist/typings/ast/variables/Variable.d.ts +43 -0
  421. data/vendor/node_modules/rollup/dist/typings/ast/variables/VariableReassignmentTracker.d.ts +11 -0
  422. data/vendor/node_modules/rollup/dist/typings/finalisers/amd.d.ts +11 -0
  423. data/vendor/node_modules/rollup/dist/typings/finalisers/cjs.d.ts +10 -0
  424. data/vendor/node_modules/rollup/dist/typings/finalisers/es.d.ts +9 -0
  425. data/vendor/node_modules/rollup/dist/typings/finalisers/iife.d.ts +10 -0
  426. data/vendor/node_modules/rollup/dist/typings/finalisers/index.d.ts +15 -0
  427. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/esModuleExport.d.ts +2 -0
  428. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getExportBlock.d.ts +2 -0
  429. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getGlobalNameMaker.d.ts +4 -0
  430. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/getInteropBlock.d.ts +3 -0
  431. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/sanitize.d.ts +2 -0
  432. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/setupNamespace.d.ts +2 -0
  433. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/trimEmptyImports.d.ts +2 -0
  434. data/vendor/node_modules/rollup/dist/typings/finalisers/shared/warnOnBuiltins.d.ts +2 -0
  435. data/vendor/node_modules/rollup/dist/typings/finalisers/system.d.ts +8 -0
  436. data/vendor/node_modules/rollup/dist/typings/finalisers/umd.d.ts +10 -0
  437. data/vendor/node_modules/rollup/dist/typings/node-entry.d.ts +6 -0
  438. data/vendor/node_modules/rollup/dist/typings/rollup/index.d.ts +167 -0
  439. data/vendor/node_modules/rollup/dist/typings/utils/callIfFunction.d.ts +1 -0
  440. data/vendor/node_modules/rollup/dist/typings/utils/collapseSourcemaps.d.ts +5 -0
  441. data/vendor/node_modules/rollup/dist/typings/utils/commondir.d.ts +1 -0
  442. data/vendor/node_modules/rollup/dist/typings/utils/defaults.d.ts +6 -0
  443. data/vendor/node_modules/rollup/dist/typings/utils/deprecateOptions.d.ts +6 -0
  444. data/vendor/node_modules/rollup/dist/typings/utils/ensureArray.d.ts +2 -0
  445. data/vendor/node_modules/rollup/dist/typings/utils/entryHashing.d.ts +3 -0
  446. data/vendor/node_modules/rollup/dist/typings/utils/error.d.ts +18 -0
  447. data/vendor/node_modules/rollup/dist/typings/utils/first-sync.d.ts +1 -0
  448. data/vendor/node_modules/rollup/dist/typings/utils/first.d.ts +1 -0
  449. data/vendor/node_modules/rollup/dist/typings/utils/flushTime.d.ts +5 -0
  450. data/vendor/node_modules/rollup/dist/typings/utils/fs.d.ts +3 -0
  451. data/vendor/node_modules/rollup/dist/typings/utils/getCodeFrame.d.ts +1 -0
  452. data/vendor/node_modules/rollup/dist/typings/utils/getExportMode.d.ts +3 -0
  453. data/vendor/node_modules/rollup/dist/typings/utils/getIndentString.d.ts +4 -0
  454. data/vendor/node_modules/rollup/dist/typings/utils/identifierHelpers.d.ts +3 -0
  455. data/vendor/node_modules/rollup/dist/typings/utils/mergeOptions.d.ts +19 -0
  456. data/vendor/node_modules/rollup/dist/typings/utils/object.d.ts +7 -0
  457. data/vendor/node_modules/rollup/dist/typings/utils/path.d.ts +6 -0
  458. data/vendor/node_modules/rollup/dist/typings/utils/promise.d.ts +2 -0
  459. data/vendor/node_modules/rollup/dist/typings/utils/relativeId.d.ts +1 -0
  460. data/vendor/node_modules/rollup/dist/typings/utils/renderHelpers.d.ts +26 -0
  461. data/vendor/node_modules/rollup/dist/typings/utils/sourceMappingURL.d.ts +3 -0
  462. data/vendor/node_modules/rollup/dist/typings/utils/timers.d.ts +7 -0
  463. data/vendor/node_modules/rollup/dist/typings/utils/transform.d.ts +25 -0
  464. data/vendor/node_modules/rollup/dist/typings/utils/transformBundle.d.ts +3 -0
  465. data/vendor/node_modules/rollup/dist/typings/watch/chokidar.d.ts +3 -0
  466. data/vendor/node_modules/rollup/dist/typings/watch/fileWatchers.d.ts +14 -0
  467. data/vendor/node_modules/rollup/dist/typings/watch/index.d.ts +47 -0
  468. data/vendor/node_modules/rollup/package.json +122 -0
  469. data/vendor/node_modules/rollup/typings/package.json.d.ts +3 -0
  470. data/vendor/node_modules/signal-exit/index.js +157 -0
  471. data/vendor/node_modules/signal-exit/package.json +38 -0
  472. data/vendor/node_modules/signal-exit/signals.js +53 -0
  473. data/vendor/node_modules/source-map/dist/source-map.debug.js +3091 -0
  474. data/vendor/node_modules/source-map/dist/source-map.js +3090 -0
  475. data/vendor/node_modules/source-map/dist/source-map.min.js +2 -0
  476. data/vendor/node_modules/source-map/lib/array-set.js +121 -0
  477. data/vendor/node_modules/source-map/lib/base64-vlq.js +140 -0
  478. data/vendor/node_modules/source-map/lib/base64.js +67 -0
  479. data/vendor/node_modules/source-map/lib/binary-search.js +111 -0
  480. data/vendor/node_modules/source-map/lib/mapping-list.js +79 -0
  481. data/vendor/node_modules/source-map/lib/quick-sort.js +114 -0
  482. data/vendor/node_modules/source-map/lib/source-map-consumer.js +1082 -0
  483. data/vendor/node_modules/source-map/lib/source-map-generator.js +416 -0
  484. data/vendor/node_modules/source-map/lib/source-node.js +413 -0
  485. data/vendor/node_modules/source-map/lib/util.js +417 -0
  486. data/vendor/node_modules/source-map/package.json +72 -0
  487. data/vendor/node_modules/source-map/source-map.js +8 -0
  488. data/vendor/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js +129 -0
  489. data/vendor/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js +140 -0
  490. data/vendor/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +5 -0
  491. data/vendor/node_modules/sourcemap-codec/package.json +52 -0
  492. data/vendor/node_modules/supports-color/browser.js +5 -0
  493. data/vendor/node_modules/supports-color/index.js +135 -0
  494. data/vendor/node_modules/supports-color/package.json +53 -0
  495. data/vendor/node_modules/time-zone/index.js +10 -0
  496. data/vendor/node_modules/time-zone/package.json +35 -0
  497. data/vendor/node_modules/vlq/dist/types/vlq.d.ts +2 -0
  498. data/vendor/node_modules/vlq/dist/vlq.es.js +64 -0
  499. data/vendor/node_modules/vlq/dist/vlq.js +75 -0
  500. data/vendor/node_modules/vlq/package.json +30 -0
  501. data/vendor/package.json +15 -0
  502. data/vendor/yarn.lock +453 -0
  503. metadata +641 -0
@@ -0,0 +1,29 @@
1
+ module Jass
2
+ class Error < StandardError; end
3
+
4
+ class JavaScriptError < Error
5
+ attr_reader :attributes
6
+
7
+ def initialize(attributes = {})
8
+ @attributes = attributes || {}
9
+ if stack = attributes['stack']
10
+ set_backtrace stack.split("\n")
11
+ end
12
+ end
13
+
14
+ def to_s
15
+ generate_message
16
+ end
17
+
18
+ private
19
+
20
+ def generate_message
21
+ message = "#{attributes['message'] || 'Unknown error'}"
22
+ if loc = attributes['loc']
23
+ message << loc.inject(' in') { |s, (key, value)| s << " #{key}: #{value}" }
24
+ end
25
+ end
26
+ end
27
+
28
+ class DependencyError < JavaScriptError; end
29
+ end
@@ -0,0 +1,17 @@
1
+ module Jass
2
+ class ES6Processor
3
+ class << self
4
+ def instance
5
+ @instance ||= new
6
+ end
7
+
8
+ def call(input)
9
+ instance.call(input)
10
+ end
11
+ end
12
+
13
+ def call(input)
14
+ { data: Compiler.compile(input[:data]) }
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ module Jass
2
+ class Function
3
+ attr_reader :name, :code
4
+
5
+ def initialize(name, code)
6
+ @name, @code = name, code
7
+ end
8
+
9
+ def to_js
10
+ "__methods__[#{name.to_json}] = (#{code});\n"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ module Jass
2
+ class GlobalDirectiveProcessor < Sprockets::DirectiveProcessor
3
+ def process_global_directive(package, variable)
4
+ @globals[package] = variable
5
+ end
6
+
7
+ def _call(input)
8
+ @globals = (input[:metadata][:globals] ||= {})
9
+ super
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ module Jass
2
+ class Plugin
3
+ attr_reader :name, :arguments, :root
4
+
5
+ def initialize(name, arguments = nil, root = nil)
6
+ @name, @arguments, @root = name, arguments, root
7
+ end
8
+
9
+ def to_js
10
+ "__plugins__.push(#{name}(#{arguments}));\n"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ require 'rails/railtie'
2
+ require 'active_support'
3
+
4
+ module Jass
5
+ class Railtie < Rails::Railtie
6
+ config.jass = ActiveSupport::OrderedOptions.new
7
+
8
+ initializer 'jass' do |app|
9
+ Jass.vendor_modules_root = Rails.root.join('vendor')
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Jass
2
+ VERSION = '0.9.1'
3
+ end
@@ -0,0 +1,256 @@
1
+ // Type definitions for Acorn 4.0
2
+ // Project: https://github.com/marijnh/acorn
3
+ // Definitions by: RReverser <https://github.com/RReverser>, e-cloud <https://github.com/e-cloud>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ export as namespace acorn;
7
+ export = acorn;
8
+ import * as ESTree from 'estree';
9
+
10
+ declare namespace acorn {
11
+ interface PlainObject {
12
+ [name: string]: any;
13
+ }
14
+
15
+ interface PluginsObject {
16
+ [name: string]: (p: Parser, config: any) => void;
17
+ }
18
+
19
+ interface Options {
20
+ ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 2015 | 2016 | 2017;
21
+ sourceType?: 'script' | 'module';
22
+ onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => void;
23
+ onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => void;
24
+ allowReserved?: boolean;
25
+ allowReturnOutsideFunction?: boolean;
26
+ allowImportExportEverywhere?: boolean;
27
+ allowHashBang?: boolean;
28
+ locations?: boolean;
29
+ onToken?: ((token: Token) => any) | Token[];
30
+ onComment?: ((
31
+ isBlock: boolean, text: string, start: number, end: number, startLoc?: ESTree.Position,
32
+ endLoc?: ESTree.Position
33
+ ) => void) | Comment[];
34
+ ranges?: boolean;
35
+ program?: ESTree.Program;
36
+ sourceFile?: string;
37
+ directSourceFile?: string;
38
+ preserveParens?: boolean;
39
+ plugins?: PlainObject;
40
+ }
41
+
42
+ class Parser {
43
+ constructor(options: Options, input: string, startPos?: number);
44
+
45
+ parse(): ESTree.Program;
46
+ }
47
+
48
+ const plugins: PluginsObject;
49
+
50
+ const defaultOptions: Options;
51
+
52
+ class Position implements ESTree.Position {
53
+ line: number;
54
+ column: number;
55
+
56
+ constructor(line: number, col: number);
57
+
58
+ offset(n: number): Position;
59
+ }
60
+
61
+ class SourceLocation implements ESTree.SourceLocation {
62
+ start: Position;
63
+ end: Position;
64
+ source?: string | null;
65
+
66
+ constructor(p: Parser, start: Position, end: Position);
67
+ }
68
+
69
+ function getLineInfo(input: string, offset: number): ESTree.Position;
70
+
71
+ class Node {
72
+ type: string;
73
+ start: number;
74
+ end: number;
75
+ loc?: ESTree.SourceLocation;
76
+ sourceFile?: string;
77
+ range?: [number, number];
78
+
79
+ constructor(parser: Parser, pos: number, loc: number);
80
+ }
81
+
82
+ interface TokeTypeConfig {
83
+ keyword: string;
84
+ beforeExpr?: boolean;
85
+ startsExpr?: boolean;
86
+ isLoop?: boolean;
87
+ isAssign?: boolean;
88
+ prefix?: boolean;
89
+ postfix?: boolean;
90
+ binop?: number;
91
+ }
92
+
93
+ class TokenType {
94
+ label: string;
95
+ keyword: string;
96
+ beforeExpr: boolean;
97
+ startsExpr: boolean;
98
+ isLoop: boolean;
99
+ isAssign: boolean;
100
+ prefix: boolean;
101
+ postfix: boolean;
102
+ binop: number;
103
+ updateContext: (prevType: TokenType) => void;
104
+
105
+ constructor(label: string, conf?: TokeTypeConfig);
106
+ }
107
+
108
+ const tokTypes: {
109
+ num: TokenType;
110
+ regexp: TokenType;
111
+ string: TokenType;
112
+ name: TokenType;
113
+ eof: TokenType;
114
+ bracketL: TokenType;
115
+ bracketR: TokenType;
116
+ braceL: TokenType;
117
+ braceR: TokenType;
118
+ parenL: TokenType;
119
+ parenR: TokenType;
120
+ comma: TokenType;
121
+ semi: TokenType;
122
+ colon: TokenType;
123
+ dot: TokenType;
124
+ question: TokenType;
125
+ arrow: TokenType;
126
+ template: TokenType;
127
+ ellipsis: TokenType;
128
+ backQuote: TokenType;
129
+ dollarBraceL: TokenType;
130
+ eq: TokenType;
131
+ assign: TokenType;
132
+ incDec: TokenType;
133
+ prefix: TokenType;
134
+ logicalOR: TokenType;
135
+ logicalAND: TokenType;
136
+ bitwiseOR: TokenType;
137
+ bitwiseXOR: TokenType;
138
+ bitwiseAND: TokenType;
139
+ equality: TokenType;
140
+ relational: TokenType;
141
+ bitShift: TokenType;
142
+ plusMin: TokenType;
143
+ modulo: TokenType;
144
+ star: TokenType;
145
+ slash: TokenType;
146
+ starstar: TokenType;
147
+ _break: TokenType;
148
+ _case: TokenType;
149
+ _catch: TokenType;
150
+ _continue: TokenType;
151
+ _debugger: TokenType;
152
+ _default: TokenType;
153
+ _do: TokenType;
154
+ _else: TokenType;
155
+ _finally: TokenType;
156
+ _for: TokenType;
157
+ _function: TokenType;
158
+ _if: TokenType;
159
+ _return: TokenType;
160
+ _switch: TokenType;
161
+ _throw: TokenType;
162
+ _try: TokenType;
163
+ _var: TokenType;
164
+ _const: TokenType;
165
+ _while: TokenType;
166
+ _with: TokenType;
167
+ _new: TokenType;
168
+ _this: TokenType;
169
+ _super: TokenType;
170
+ _class: TokenType;
171
+ _extends: TokenType;
172
+ _export: TokenType;
173
+ _import: TokenType;
174
+ _null: TokenType;
175
+ _true: TokenType;
176
+ _false: TokenType;
177
+ _in: TokenType;
178
+ _instanceof: TokenType;
179
+ _typeof: TokenType;
180
+ _void: TokenType;
181
+ _delete: TokenType;
182
+ };
183
+
184
+ class TokContext {
185
+ constructor(token: string, isExpr: boolean, preserveSpace: boolean, override: (p: Parser) => void);
186
+ }
187
+
188
+ const tokContexts: {
189
+ b_stat: TokContext;
190
+ b_expr: TokContext;
191
+ b_tmpl: TokContext;
192
+ p_stat: TokContext;
193
+ p_expr: TokContext;
194
+ q_tmpl: TokContext;
195
+ f_expr: TokContext;
196
+ };
197
+
198
+ function isIdentifierStart(code: number, astral?: boolean): boolean;
199
+
200
+ function isIdentifierChar(code: number, astral?: boolean): boolean;
201
+
202
+ interface AbstractToken {
203
+ start: number;
204
+ end: number;
205
+ loc?: SourceLocation;
206
+ range?: [number, number];
207
+ }
208
+
209
+ interface Comment extends AbstractToken {
210
+ type: string;
211
+ value: string;
212
+ }
213
+
214
+ class Token {
215
+ constructor(p: Parser);
216
+ }
217
+
218
+ interface Token extends AbstractToken {
219
+ type: TokenType;
220
+ value: any;
221
+ }
222
+
223
+ function isNewLine(code: number): boolean;
224
+
225
+ const lineBreak: RegExp;
226
+
227
+ const lineBreakG: RegExp;
228
+
229
+ const version: string;
230
+
231
+ // TODO: rename type.
232
+ type IParse = (input: string, options?: Options) => ESTree.Program;
233
+
234
+ const parse: IParse;
235
+
236
+ function parseExpressionAt(input: string, pos?: number, options?: Options): ESTree.Expression;
237
+
238
+ interface ITokenizer {
239
+ getToken(): Token;
240
+ [Symbol.iterator](): Iterator<Token>;
241
+ }
242
+
243
+ function tokenizer(input: string, options: Options): ITokenizer;
244
+
245
+ let parse_dammit: IParse | undefined;
246
+ let LooseParser: ILooseParserClass | undefined;
247
+ let pluginsLoose: PluginsObject | undefined;
248
+
249
+ interface ILooseParserClass {
250
+ new (input: string, options?: Options): ILooseParser;
251
+ }
252
+
253
+ interface ILooseParser {}
254
+
255
+ function addLooseExports(parse: IParse, parser: ILooseParserClass, plugins: PluginsObject): void;
256
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@types/acorn",
3
+ "version": "4.0.3",
4
+ "description": "TypeScript definitions for Acorn",
5
+ "license": "MIT",
6
+ "contributors": [
7
+ {
8
+ "name": "RReverser",
9
+ "url": "https://github.com/RReverser",
10
+ "githubUsername": "RReverser"
11
+ },
12
+ {
13
+ "name": "e-cloud",
14
+ "url": "https://github.com/e-cloud",
15
+ "githubUsername": "e-cloud"
16
+ }
17
+ ],
18
+ "main": "",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
22
+ },
23
+ "scripts": {},
24
+ "dependencies": {
25
+ "@types/estree": "*"
26
+ },
27
+ "typesPublisherContentHash": "0e6b6ce448ffe2e23033a5fa7511f4474885c5abbbd8d862c29b28fc9ad53a25",
28
+ "typeScriptVersion": "2.0"
29
+ }
@@ -0,0 +1,546 @@
1
+ // Type definitions for ESTree AST specification
2
+ // Project: https://github.com/estree/estree
3
+ // Definitions by: RReverser <https://github.com/RReverser>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ // This definition file follows a somewhat unusual format. ESTree allows
7
+ // runtime type checks based on the `type` parameter. In order to explain this
8
+ // to typescript we want to use discriminated union types:
9
+ // https://github.com/Microsoft/TypeScript/pull/9163
10
+ //
11
+ // For ESTree this is a bit tricky because the high level interfaces like
12
+ // Node or Function are pulling double duty. We want to pass common fields down
13
+ // to the interfaces that extend them (like Identifier or
14
+ // ArrowFunctionExpression), but you can't extend a type union or enforce
15
+ // common fields on them. So we've split the high level interfaces into two
16
+ // types, a base type which passes down inhereted fields, and a type union of
17
+ // all types which extend the base type. Only the type union is exported, and
18
+ // the union is how other types refer to the collection of inheriting types.
19
+ //
20
+ // This makes the definitions file here somewhat more difficult to maintain,
21
+ // but it has the notable advantage of making ESTree much easier to use as
22
+ // an end user.
23
+
24
+ interface BaseNodeWithoutComments {
25
+ // Every leaf interface that extends BaseNode must specify a type property.
26
+ // The type property should be a string literal. For example, Identifier
27
+ // has: `type: "Identifier"`
28
+ type: string;
29
+ loc?: SourceLocation | null;
30
+ range?: [number, number];
31
+ }
32
+
33
+ interface BaseNode extends BaseNodeWithoutComments {
34
+ leadingComments?: Array<Comment>;
35
+ trailingComments?: Array<Comment>;
36
+ }
37
+
38
+ export type Node =
39
+ Identifier | Literal | Program | Function | SwitchCase | CatchClause |
40
+ VariableDeclarator | Statement | Expression | Property |
41
+ AssignmentProperty | Super | TemplateElement | SpreadElement | Pattern |
42
+ ClassBody | Class | MethodDefinition | ModuleDeclaration | ModuleSpecifier;
43
+
44
+ export interface Comment extends BaseNodeWithoutComments {
45
+ type: "Line" | "Block";
46
+ value: string;
47
+ }
48
+
49
+ interface SourceLocation {
50
+ source?: string | null;
51
+ start: Position;
52
+ end: Position;
53
+ }
54
+
55
+ export interface Position {
56
+ /** >= 1 */
57
+ line: number;
58
+ /** >= 0 */
59
+ column: number;
60
+ }
61
+
62
+ export interface Program extends BaseNode {
63
+ type: "Program";
64
+ sourceType: "script" | "module";
65
+ body: Array<Statement | ModuleDeclaration>;
66
+ comments?: Array<Comment>;
67
+ }
68
+
69
+ interface BaseFunction extends BaseNode {
70
+ params: Array<Pattern>;
71
+ generator?: boolean;
72
+ async?: boolean;
73
+ // The body is either BlockStatement or Expression because arrow functions
74
+ // can have a body that's either. FunctionDeclarations and
75
+ // FunctionExpressions have only BlockStatement bodies.
76
+ body: BlockStatement | Expression;
77
+ }
78
+
79
+ export type Function =
80
+ FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
81
+
82
+ export type Statement =
83
+ ExpressionStatement | BlockStatement | EmptyStatement |
84
+ DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement |
85
+ BreakStatement | ContinueStatement | IfStatement | SwitchStatement |
86
+ ThrowStatement | TryStatement | WhileStatement | DoWhileStatement |
87
+ ForStatement | ForInStatement | ForOfStatement | Declaration;
88
+
89
+ interface BaseStatement extends BaseNode { }
90
+
91
+ export interface EmptyStatement extends BaseStatement {
92
+ type: "EmptyStatement";
93
+ }
94
+
95
+ export interface BlockStatement extends BaseStatement {
96
+ type: "BlockStatement";
97
+ body: Array<Statement>;
98
+ innerComments?: Array<Comment>;
99
+ }
100
+
101
+ export interface ExpressionStatement extends BaseStatement {
102
+ type: "ExpressionStatement";
103
+ expression: Expression;
104
+ }
105
+
106
+ export interface IfStatement extends BaseStatement {
107
+ type: "IfStatement";
108
+ test: Expression;
109
+ consequent: Statement;
110
+ alternate?: Statement | null;
111
+ }
112
+
113
+ export interface LabeledStatement extends BaseStatement {
114
+ type: "LabeledStatement";
115
+ label: Identifier;
116
+ body: Statement;
117
+ }
118
+
119
+ export interface BreakStatement extends BaseStatement {
120
+ type: "BreakStatement";
121
+ label?: Identifier | null;
122
+ }
123
+
124
+ export interface ContinueStatement extends BaseStatement {
125
+ type: "ContinueStatement";
126
+ label?: Identifier | null;
127
+ }
128
+
129
+ export interface WithStatement extends BaseStatement {
130
+ type: "WithStatement";
131
+ object: Expression;
132
+ body: Statement;
133
+ }
134
+
135
+ export interface SwitchStatement extends BaseStatement {
136
+ type: "SwitchStatement";
137
+ discriminant: Expression;
138
+ cases: Array<SwitchCase>;
139
+ }
140
+
141
+ export interface ReturnStatement extends BaseStatement {
142
+ type: "ReturnStatement";
143
+ argument?: Expression | null;
144
+ }
145
+
146
+ export interface ThrowStatement extends BaseStatement {
147
+ type: "ThrowStatement";
148
+ argument: Expression;
149
+ }
150
+
151
+ export interface TryStatement extends BaseStatement {
152
+ type: "TryStatement";
153
+ block: BlockStatement;
154
+ handler?: CatchClause | null;
155
+ finalizer?: BlockStatement | null;
156
+ }
157
+
158
+ export interface WhileStatement extends BaseStatement {
159
+ type: "WhileStatement";
160
+ test: Expression;
161
+ body: Statement;
162
+ }
163
+
164
+ export interface DoWhileStatement extends BaseStatement {
165
+ type: "DoWhileStatement";
166
+ body: Statement;
167
+ test: Expression;
168
+ }
169
+
170
+ export interface ForStatement extends BaseStatement {
171
+ type: "ForStatement";
172
+ init?: VariableDeclaration | Expression | null;
173
+ test?: Expression | null;
174
+ update?: Expression | null;
175
+ body: Statement;
176
+ }
177
+
178
+ interface BaseForXStatement extends BaseStatement {
179
+ left: VariableDeclaration | Pattern;
180
+ right: Expression;
181
+ body: Statement;
182
+ }
183
+
184
+ export interface ForInStatement extends BaseForXStatement {
185
+ type: "ForInStatement";
186
+ }
187
+
188
+ export interface DebuggerStatement extends BaseStatement {
189
+ type: "DebuggerStatement";
190
+ }
191
+
192
+ export type Declaration =
193
+ FunctionDeclaration | VariableDeclaration | ClassDeclaration;
194
+
195
+ interface BaseDeclaration extends BaseStatement { }
196
+
197
+ export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
198
+ type: "FunctionDeclaration";
199
+ id: Identifier;
200
+ body: BlockStatement;
201
+ }
202
+
203
+ export interface VariableDeclaration extends BaseDeclaration {
204
+ type: "VariableDeclaration";
205
+ declarations: Array<VariableDeclarator>;
206
+ kind: "var" | "let" | "const";
207
+ }
208
+
209
+ export interface VariableDeclarator extends BaseNode {
210
+ type: "VariableDeclarator";
211
+ id: Pattern;
212
+ init?: Expression | null;
213
+ }
214
+
215
+ type Expression =
216
+ ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression |
217
+ ArrowFunctionExpression | YieldExpression | Literal | UnaryExpression |
218
+ UpdateExpression | BinaryExpression | AssignmentExpression |
219
+ LogicalExpression | MemberExpression | ConditionalExpression |
220
+ CallExpression | NewExpression | SequenceExpression | TemplateLiteral |
221
+ TaggedTemplateExpression | ClassExpression | MetaProperty | Identifier |
222
+ AwaitExpression;
223
+
224
+ export interface BaseExpression extends BaseNode { }
225
+
226
+ export interface ThisExpression extends BaseExpression {
227
+ type: "ThisExpression";
228
+ }
229
+
230
+ export interface ArrayExpression extends BaseExpression {
231
+ type: "ArrayExpression";
232
+ elements: Array<Expression | SpreadElement>;
233
+ }
234
+
235
+ export interface ObjectExpression extends BaseExpression {
236
+ type: "ObjectExpression";
237
+ properties: Array<Property>;
238
+ }
239
+
240
+ export interface Property extends BaseNode {
241
+ type: "Property";
242
+ key: Expression;
243
+ value: Expression | Pattern; // Could be an AssignmentProperty
244
+ kind: "init" | "get" | "set";
245
+ method: boolean;
246
+ shorthand: boolean;
247
+ computed: boolean;
248
+ }
249
+
250
+ export interface FunctionExpression extends BaseFunction, BaseExpression {
251
+ id?: Identifier | null;
252
+ type: "FunctionExpression";
253
+ body: BlockStatement;
254
+ }
255
+
256
+ export interface SequenceExpression extends BaseExpression {
257
+ type: "SequenceExpression";
258
+ expressions: Array<Expression>;
259
+ }
260
+
261
+ export interface UnaryExpression extends BaseExpression {
262
+ type: "UnaryExpression";
263
+ operator: UnaryOperator;
264
+ prefix: true;
265
+ argument: Expression;
266
+ }
267
+
268
+ export interface BinaryExpression extends BaseExpression {
269
+ type: "BinaryExpression";
270
+ operator: BinaryOperator;
271
+ left: Expression;
272
+ right: Expression;
273
+ }
274
+
275
+ export interface AssignmentExpression extends BaseExpression {
276
+ type: "AssignmentExpression";
277
+ operator: AssignmentOperator;
278
+ left: Pattern | MemberExpression;
279
+ right: Expression;
280
+ }
281
+
282
+ export interface UpdateExpression extends BaseExpression {
283
+ type: "UpdateExpression";
284
+ operator: UpdateOperator;
285
+ argument: Expression;
286
+ prefix: boolean;
287
+ }
288
+
289
+ export interface LogicalExpression extends BaseExpression {
290
+ type: "LogicalExpression";
291
+ operator: LogicalOperator;
292
+ left: Expression;
293
+ right: Expression;
294
+ }
295
+
296
+ export interface ConditionalExpression extends BaseExpression {
297
+ type: "ConditionalExpression";
298
+ test: Expression;
299
+ alternate: Expression;
300
+ consequent: Expression;
301
+ }
302
+
303
+ interface BaseCallExpression extends BaseExpression {
304
+ callee: Expression | Super;
305
+ arguments: Array<Expression | SpreadElement>;
306
+ }
307
+ export type CallExpression = SimpleCallExpression | NewExpression;
308
+
309
+ export interface SimpleCallExpression extends BaseCallExpression {
310
+ type: "CallExpression";
311
+ }
312
+
313
+ export interface NewExpression extends BaseCallExpression {
314
+ type: "NewExpression";
315
+ }
316
+
317
+ export interface MemberExpression extends BaseExpression, BasePattern {
318
+ type: "MemberExpression";
319
+ object: Expression | Super;
320
+ property: Expression;
321
+ computed: boolean;
322
+ }
323
+
324
+ export type Pattern =
325
+ Identifier | ObjectPattern | ArrayPattern | RestElement |
326
+ AssignmentPattern | MemberExpression;
327
+
328
+ interface BasePattern extends BaseNode { }
329
+
330
+ export interface SwitchCase extends BaseNode {
331
+ type: "SwitchCase";
332
+ test?: Expression | null;
333
+ consequent: Array<Statement>;
334
+ }
335
+
336
+ export interface CatchClause extends BaseNode {
337
+ type: "CatchClause";
338
+ param: Pattern;
339
+ body: BlockStatement;
340
+ }
341
+
342
+ export interface Identifier extends BaseNode, BaseExpression, BasePattern {
343
+ type: "Identifier";
344
+ name: string;
345
+ }
346
+
347
+ export type Literal = SimpleLiteral | RegExpLiteral;
348
+
349
+ export interface SimpleLiteral extends BaseNode, BaseExpression {
350
+ type: "Literal";
351
+ value: string | boolean | number | null;
352
+ raw?: string;
353
+ }
354
+
355
+ export interface RegExpLiteral extends BaseNode, BaseExpression {
356
+ type: "Literal";
357
+ value?: RegExp | null;
358
+ regex: {
359
+ pattern: string;
360
+ flags: string;
361
+ };
362
+ raw?: string;
363
+ }
364
+
365
+ export type UnaryOperator =
366
+ "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
367
+
368
+ export type BinaryOperator =
369
+ "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" |
370
+ ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" |
371
+ "instanceof";
372
+
373
+ export type LogicalOperator = "||" | "&&";
374
+
375
+ export type AssignmentOperator =
376
+ "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" |
377
+ "|=" | "^=" | "&=";
378
+
379
+ export type UpdateOperator = "++" | "--";
380
+
381
+ export interface ForOfStatement extends BaseForXStatement {
382
+ type: "ForOfStatement";
383
+ }
384
+
385
+ export interface Super extends BaseNode {
386
+ type: "Super";
387
+ }
388
+
389
+ export interface SpreadElement extends BaseNode {
390
+ type: "SpreadElement";
391
+ argument: Expression;
392
+ }
393
+
394
+ export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
395
+ type: "ArrowFunctionExpression";
396
+ expression: boolean;
397
+ body: BlockStatement | Expression;
398
+ }
399
+
400
+ export interface YieldExpression extends BaseExpression {
401
+ type: "YieldExpression";
402
+ argument?: Expression | null;
403
+ delegate: boolean;
404
+ }
405
+
406
+ export interface TemplateLiteral extends BaseExpression {
407
+ type: "TemplateLiteral";
408
+ quasis: Array<TemplateElement>;
409
+ expressions: Array<Expression>;
410
+ }
411
+
412
+ export interface TaggedTemplateExpression extends BaseExpression {
413
+ type: "TaggedTemplateExpression";
414
+ tag: Expression;
415
+ quasi: TemplateLiteral;
416
+ }
417
+
418
+ export interface TemplateElement extends BaseNode {
419
+ type: "TemplateElement";
420
+ tail: boolean;
421
+ value: {
422
+ cooked: string;
423
+ raw: string;
424
+ };
425
+ }
426
+
427
+ export interface AssignmentProperty extends Property {
428
+ value: Pattern;
429
+ kind: "init";
430
+ method: boolean; // false
431
+ }
432
+
433
+ export interface ObjectPattern extends BasePattern {
434
+ type: "ObjectPattern";
435
+ properties: Array<AssignmentProperty>;
436
+ }
437
+
438
+ export interface ArrayPattern extends BasePattern {
439
+ type: "ArrayPattern";
440
+ elements: Array<Pattern>;
441
+ }
442
+
443
+ export interface RestElement extends BasePattern {
444
+ type: "RestElement";
445
+ argument: Pattern;
446
+ }
447
+
448
+ export interface AssignmentPattern extends BasePattern {
449
+ type: "AssignmentPattern";
450
+ left: Pattern;
451
+ right: Expression;
452
+ }
453
+
454
+ export type Class = ClassDeclaration | ClassExpression;
455
+ interface BaseClass extends BaseNode {
456
+ superClass?: Expression | null;
457
+ body: ClassBody;
458
+ }
459
+
460
+ export interface ClassBody extends BaseNode {
461
+ type: "ClassBody";
462
+ body: Array<MethodDefinition>;
463
+ }
464
+
465
+ export interface MethodDefinition extends BaseNode {
466
+ type: "MethodDefinition";
467
+ key: Expression;
468
+ value: FunctionExpression;
469
+ kind: "constructor" | "method" | "get" | "set";
470
+ computed: boolean;
471
+ static: boolean;
472
+ }
473
+
474
+ export interface ClassDeclaration extends BaseClass, BaseDeclaration {
475
+ type: "ClassDeclaration";
476
+ id: Identifier;
477
+ }
478
+
479
+ export interface ClassExpression extends BaseClass, BaseExpression {
480
+ type: "ClassExpression";
481
+ id?: Identifier | null;
482
+ }
483
+
484
+ export interface MetaProperty extends BaseExpression {
485
+ type: "MetaProperty";
486
+ meta: Identifier;
487
+ property: Identifier;
488
+ }
489
+
490
+ export type ModuleDeclaration =
491
+ ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration |
492
+ ExportAllDeclaration;
493
+ interface BaseModuleDeclaration extends BaseNode { }
494
+
495
+ export type ModuleSpecifier =
496
+ ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier |
497
+ ExportSpecifier;
498
+ interface BaseModuleSpecifier extends BaseNode {
499
+ local: Identifier;
500
+ }
501
+
502
+ export interface ImportDeclaration extends BaseModuleDeclaration {
503
+ type: "ImportDeclaration";
504
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
505
+ source: Literal;
506
+ }
507
+
508
+ export interface ImportSpecifier extends BaseModuleSpecifier {
509
+ type: "ImportSpecifier";
510
+ imported: Identifier;
511
+ }
512
+
513
+ export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
514
+ type: "ImportDefaultSpecifier";
515
+ }
516
+
517
+ export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
518
+ type: "ImportNamespaceSpecifier";
519
+ }
520
+
521
+ export interface ExportNamedDeclaration extends BaseModuleDeclaration {
522
+ type: "ExportNamedDeclaration";
523
+ declaration?: Declaration | null;
524
+ specifiers: Array<ExportSpecifier>;
525
+ source?: Literal | null;
526
+ }
527
+
528
+ export interface ExportSpecifier extends BaseModuleSpecifier {
529
+ type: "ExportSpecifier";
530
+ exported: Identifier;
531
+ }
532
+
533
+ export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
534
+ type: "ExportDefaultDeclaration";
535
+ declaration: Declaration | Expression;
536
+ }
537
+
538
+ export interface ExportAllDeclaration extends BaseModuleDeclaration {
539
+ type: "ExportAllDeclaration";
540
+ source: Literal;
541
+ }
542
+
543
+ export interface AwaitExpression extends BaseExpression {
544
+ type: "AwaitExpression";
545
+ argument: Expression;
546
+ }