better whitespace for blocks and methods
This commit is contained in:
@@ -49,6 +49,7 @@ exports._method = function (node, print) {
|
||||
}
|
||||
|
||||
this._params(value, print);
|
||||
this.push(" ");
|
||||
print(value.body);
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user