Files
babel/src/babel/generation/generators/base.js
Sebastian McKenzie 8eee5367f3 add Noop node
2015-06-07 23:34:35 +01:00

24 lines
453 B
JavaScript

export function File(node, print) {
print.plain(node.program);
}
export function Program(node, print) {
print.sequence(node.body);
}
export function BlockStatement(node, print) {
if (node.body.length === 0) {
this.push("{}");
} else {
this.push("{");
this.newline();
print.sequence(node.body, { indent: true });
if (!this.format.retainLines) this.removeLast("\n");
this.rightBrace();
}
}
export function Noop() {
}