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.keyword("with");
|
||||||
this.push("(");
|
this.push("(");
|
||||||
print(node.object);
|
print(node.object);
|
||||||
|
this.push(")");
|
||||||
print.block(node.body);
|
print.block(node.body);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,15 +135,6 @@ exports.SwitchStatement = function (node, print) {
|
|||||||
this.push(") {");
|
this.push(") {");
|
||||||
print.sequence(node.cases, { indent: true });
|
print.sequence(node.cases, { indent: true });
|
||||||
this.push("}");
|
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) {
|
exports.SwitchCase = function (node, print) {
|
||||||
@ -154,13 +146,8 @@ exports.SwitchCase = function (node, print) {
|
|||||||
this.push("default:");
|
this.push("default:");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.consequent.length === 1) {
|
|
||||||
this.space();
|
this.space();
|
||||||
print(node.consequent[0]);
|
|
||||||
} else if (node.consequent.length > 1) {
|
|
||||||
this.newline();
|
|
||||||
print.sequence(node.consequent, { indent: true });
|
print.sequence(node.consequent, { indent: true });
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.DebuggerStatement = function () {
|
exports.DebuggerStatement = function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user