Files
babel/lib/babel/generation/generators/base.js
Sebastian McKenzie 1d34d03ac8 rename to babel
2015-02-15 18:09:05 +11:00

22 lines
418 B
JavaScript

"use strict";
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();
}
};