Whitespace fix for unstepPart (thanks, Tesco)

This commit is contained in:
Trevor Burnham
2010-10-19 14:24:38 -04:00
parent 5005cb606f
commit 33ac70aec3
12 changed files with 6 additions and 128 deletions

View File

@@ -58,8 +58,6 @@
node = pair[i];
(pair[i] = node.compile(o));
}
}
return pair;
};
@@ -108,8 +106,6 @@
child = _ref2[_i];
_result.push(child.toString(idt + TAB));
}
return _result;
}).call(this).join('');
klass = override || this.constructor.name + (this.soakNode ? '?' : '');
@@ -130,12 +126,8 @@
return;
}
}
}
}
return _result;
};
Base.prototype.collectChildren = function() {
@@ -216,8 +208,6 @@
node = _ref2[_i];
_result.push(this.compileExpression(node, merge(o)));
}
return _result;
}).call(this).join('\n');
};
@@ -421,8 +411,6 @@
prop = props[_i];
(code += prop.compile(o));
}
return code;
};
Value.prototype.unfoldSoak = function(o) {
@@ -448,8 +436,6 @@
return ifn;
}
}
return null;
};
return Value;
@@ -556,8 +542,6 @@
}
ifn = If.unfoldSoak(o, call, 'variable');
}
return ifn;
};
Call.prototype.compileNode = function(o) {
@@ -572,16 +556,12 @@
return this.compileSplat(o);
}
}
args = (function() {
_result = [];
for (_j = 0, _len2 = (_ref4 = this.args).length; _j < _len2; _j++) {
arg = _ref4[_j];
_result.push((arg.parenthetical = true) && arg.compile(o));
}
return _result;
}).call(this).join(', ');
return this.isSuper ? this.compileSuper(args, o) : ("" + (this.prefix()) + (this.variable.compile(o)) + "(" + args + ")");
@@ -812,8 +792,6 @@
_result.push(prop);
}
}
return _result;
}).call(this);
lastNoncom = last(nonComments);
@@ -832,8 +810,6 @@
return indent + prop.compile(o) + join;
}).call(this));
}
return _result;
}).call(this);
props = props.join('');
@@ -848,8 +824,6 @@
return true;
}
}
return false;
};
return ObjectLiteral;
@@ -878,16 +852,12 @@
return this.compileSplatLiteral(o);
}
}
objects = [];
for (i = 0, _len2 = (_ref3 = this.objects).length; i < _len2; i++) {
obj = _ref3[i];
code = obj.compile(o);
objects.push(obj instanceof Comment ? ("\n" + code + "\n" + (o.indent)) : (i === this.objects.length - 1 ? code : code + ', '));
}
objects = objects.join('');
return 0 < objects.indexOf('\n') ? ("[\n" + (o.indent) + objects + "\n" + (this.tab) + "]") : ("[" + objects + "]");
};
@@ -899,8 +869,6 @@
return true;
}
}
return false;
};
return ArrayLiteral;
@@ -989,8 +957,6 @@
}
props.push(prop);
}
constructor.className = className.match(/[\w\d\$_]+$/);
if (me) {
constructor.body.unshift(new Literal("" + me + " = this"));
@@ -1116,8 +1082,6 @@
}
assigns.push(new Assign(obj, val).compile(otop));
}
if (!top) {
assigns.push(valVar);
}
@@ -1195,8 +1159,6 @@
}
}
}
o.scope.startLevel();
params = (function() {
_result = [];
@@ -1204,8 +1166,6 @@
param = params[_i];
_result.push(param.compile(o));
}
return _result;
})();
if (!(empty || this.noReturn)) {
@@ -1215,8 +1175,6 @@
param = params[_i];
(o.scope.parameter(param));
}
comm = this.comment ? this.comment.compile(o) + '\n' : '';
if (this.className) {
o.indent = this.idt(2);
@@ -1304,8 +1262,6 @@
pos = this.trailings.length - idx;
o.scope.assign(trailing.compile(o), "arguments[" + variadic + " ? " + len + " - " + pos + " : " + (this.index + idx) + "]");
}
}
return "" + name + " = " + (utility('slice')) + ".call(arguments, " + (this.index) + end + ")";
};
@@ -1335,8 +1291,6 @@
}
args[++end] = i === 0 ? code : (".concat(" + code + ")");
}
return args.join('');
};
return Splat;
@@ -1538,8 +1492,6 @@
item = _ref2[i];
_result.push("" + (i ? this.obj2 : this.obj1) + " === " + (item.compile(o)));
}
return _result;
}).call(this);
return "(" + (tests.join(' || ')) + ")";
@@ -1806,7 +1758,8 @@
varPart = ("" + idt1 + namePart + ";\n");
}
if (forPart && name === ivar) {
unstepPart = this.step ? ("\n" + name + " -= " + (this.step.compile(o)) + ";") : ("\n" + name + "--;");
unstepPart = this.step ? ("" + name + " -= " + (this.step.compile(o)) + ";") : ("" + name + "--;");
unstepPart = ("\n" + (this.tab)) + unstepPart;
}
}
if (this.object) {
@@ -1820,7 +1773,7 @@
top: true
}));
vars = range ? name : ("" + name + ", " + ivar);
return "" + resultPart + (this.tab) + "for (" + forPart + ") {" + guardPart + "\n" + varPart + body + "\n" + (this.tab) + "}\n" + unstepPart + "\n" + returnResult;
return "" + resultPart + (this.tab) + "for (" + forPart + ") {" + guardPart + "\n" + varPart + body + "\n" + (this.tab) + "}" + unstepPart + returnResult;
};
return For;
})();
@@ -1846,8 +1799,6 @@
pair = _ref2[_i];
pair[1].makeReturn();
}
if (this.otherwise) {
this.otherwise.makeReturn();
}
@@ -1869,15 +1820,11 @@
}
code += ("\n" + (this.idt(1)) + "case " + (condition.compile(o)) + ":");
}
code += ("\n" + (block.compile(o)));
if (!(last(exprs) instanceof Return)) {
code += ("\n" + idt + "break;");
}
}
if (this.otherwise) {
code += ("\n" + (this.idt(1)) + "default:\n" + (this.otherwise.compile(o)));
}