Files
babel/lib/babel/helpers/normalize-ast.js
Sebastian McKenzie 1d34d03ac8 rename to babel
2015-02-15 18:09:05 +11:00

10 lines
234 B
JavaScript

var t = require("../types");
module.exports = function (ast, comments, tokens) {
if (ast && ast.type === "Program") {
return t.file(ast, comments || [], tokens || []);
} else {
throw new Error("Not a valid ast?");
}
};