parse-with-scope.js 325 B

123456789101112
  1. "use strict";
  2. const visitorKeys = require("./visitor-keys");
  3. const analyzeScope = require("./analyze-scope");
  4. const parse = require("./parse");
  5. module.exports = function(code, options) {
  6. const ast = parse(code, options);
  7. const scopeManager = analyzeScope(ast, options);
  8. return { ast, scopeManager, visitorKeys };
  9. };