10 lines
234 B
JavaScript
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?");
|
|
}
|
|
};
|