跳到主要内容

parse.js

const toAST = require("./toAST");
const tokenize = require("./tokenize");

function parse(script) {
const tokenReader = tokenize(script);
const ast = toAST(tokenReader);
return ast;
}

module.exports = parse;