better whitespace for blocks and methods

This commit is contained in:
Sebastian McKenzie
2014-11-04 08:04:11 +11:00
parent 2a0efceef5
commit 500a0bdfb6
2 changed files with 9 additions and 10 deletions

View File

@@ -49,6 +49,7 @@ exports._method = function (node, print) {
}
this._params(value, print);
this.push(" ");
print(value.body);
};

View File

@@ -5,8 +5,7 @@ exports.WithStatement = function (node, print) {
this.keyword("with");
this.push("(");
print(node.object);
this.push(") ");
print(node.body);
this.printBlock(print, node.body);
};
exports.IfStatement = function (node, print) {
@@ -42,17 +41,16 @@ exports.ForStatement = function (node, print) {
print(node.update);
}
this.push(") ");
print(node.body);
this.push(")");
this.printBlock(print, node.body);
};
exports.WhileStatement = function (node, print) {
this.keyword("while");
this.push("(");
print(node.test);
this.push(") ");
print(node.body);
this.push(")");
this.printBlock(print, node.body);
};
exports.ForInStatement = function (node, print) {
@@ -61,8 +59,8 @@ exports.ForInStatement = function (node, print) {
print(node.left);
this.push(" in ");
print(node.right);
this.push(") ");
print(node.body);
this.push(")");
this.printBlock(print, node.body);
};
exports.ForOfStatement = function (node, print) {
@@ -72,7 +70,7 @@ exports.ForOfStatement = function (node, print) {
this.push(" of ");
print(node.right);
this.push(")");
print(node.body);
this.printBlock(print, node.body);
};
exports.DoWhileStatement = function (node, print) {