fix WithStatement missing paranthesis
This commit is contained in:
parent
5eb2462e29
commit
6963cc1e40
@ -4,6 +4,7 @@ exports.WithStatement = function (node, print) {
|
||||
this.keyword("with");
|
||||
this.push("(");
|
||||
print(node.object);
|
||||
this.push(")");
|
||||
print.block(node.body);
|
||||
};
|
||||
|
||||
@ -134,15 +135,6 @@ exports.SwitchStatement = function (node, print) {
|
||||
this.push(") {");
|
||||
print.sequence(node.cases, { indent: true });
|
||||
this.push("}");
|
||||
|
||||
//if (node.cases.length) {
|
||||
// this.newline();
|
||||
// print.sequence(node.cases, { indent: true });
|
||||
// this.newline();
|
||||
// this.rightBrace();
|
||||
//} else {
|
||||
// this.push("}");
|
||||
//}
|
||||
};
|
||||
|
||||
exports.SwitchCase = function (node, print) {
|
||||
@ -154,13 +146,8 @@ exports.SwitchCase = function (node, print) {
|
||||
this.push("default:");
|
||||
}
|
||||
|
||||
if (node.consequent.length === 1) {
|
||||
this.space();
|
||||
print(node.consequent[0]);
|
||||
} else if (node.consequent.length > 1) {
|
||||
this.newline();
|
||||
print.sequence(node.consequent, { indent: true });
|
||||
}
|
||||
this.space();
|
||||
print.sequence(node.consequent, { indent: true });
|
||||
};
|
||||
|
||||
exports.DebuggerStatement = function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user