babel-core
Version:
Turn ES6 code into readable vanilla ES5 with source maps
22 lines (18 loc) • 418 B
JavaScript
exports.File = function (node, print) {
print(node.program);
};
exports.Program = function (node, print) {
print.sequence(node.body);
};
exports.BlockStatement = function (node, print) {
if (node.body.length === 0) {
this.push("{}");
} else {
this.push("{");
this.newline();
print.sequence(node.body, { indent: true });
this.removeLast("\n");
this.rightBrace();
}
};
;