mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
removed extra parens from array/index compilations
This commit is contained in:
@@ -188,9 +188,9 @@
|
||||
};
|
||||
Expressions.prototype.makeReturn = function() {
|
||||
var end, idx;
|
||||
end = this.expressions[(idx = this.expressions.length - 1)];
|
||||
end = this.expressions[idx = this.expressions.length - 1];
|
||||
if (end instanceof Comment) {
|
||||
end = this.expressions[(idx -= 1)];
|
||||
end = this.expressions[idx -= 1];
|
||||
}
|
||||
if (end && !(end instanceof Return)) {
|
||||
this.expressions[idx] = end.makeReturn();
|
||||
@@ -646,7 +646,7 @@
|
||||
__extends(Index, Base);
|
||||
Index.prototype.children = ['index'];
|
||||
Index.prototype.compileNode = function(o) {
|
||||
return "" + (this.proto ? '.prototype' : '') + "[" + (this.index.compile(o)) + "]";
|
||||
return (this.proto ? '.prototype' : '') + ("[" + (this.index.compileBare(o)) + "]");
|
||||
};
|
||||
Index.prototype.isComplex = function() {
|
||||
return this.index.isComplex();
|
||||
@@ -849,7 +849,7 @@
|
||||
objects = [];
|
||||
for (i = 0, _len2 = (_ref3 = this.objects).length; i < _len2; i++) {
|
||||
obj = _ref3[i];
|
||||
code = obj.compile(o);
|
||||
code = obj.compileBare(o);
|
||||
objects.push(obj instanceof Comment ? "\n" + code + "\n" + (o.indent) : i === this.objects.length - 1 ? code : code + ', ');
|
||||
}
|
||||
objects = objects.join('');
|
||||
|
||||
Reference in New Issue
Block a user