mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
fixed a bug where in malfunctioned in commaed lists
This commit is contained in:
13
lib/nodes.js
13
lib/nodes.js
@@ -993,7 +993,7 @@
|
||||
delete o.top;
|
||||
return ifn.compile(o);
|
||||
}
|
||||
if (_ref2 = this.context, __indexOf.call(this.CONDITIONAL, _ref2) >= 0) {
|
||||
if ((_ref2 = this.context, __indexOf.call(this.CONDITIONAL, _ref2) >= 0)) {
|
||||
return this.compileConditional(o);
|
||||
}
|
||||
}
|
||||
@@ -1389,7 +1389,7 @@
|
||||
};
|
||||
Op.prototype.isChainable = function() {
|
||||
var _ref2;
|
||||
return _ref2 = this.operator, __indexOf.call(this.CHAINABLE, _ref2) >= 0;
|
||||
return (_ref2 = this.operator, __indexOf.call(this.CHAINABLE, _ref2) >= 0);
|
||||
};
|
||||
Op.prototype.invert = function() {
|
||||
var op;
|
||||
@@ -1486,13 +1486,8 @@
|
||||
}), {
|
||||
precompile: true
|
||||
}), sub = _ref2[0], ref = _ref2[1];
|
||||
code = utility('indexOf') + (".call(" + (this.array.compile(o)) + ", " + ref + ") ");
|
||||
code += this.negated ? '< 0' : '>= 0';
|
||||
if (sub === ref) {
|
||||
return code;
|
||||
}
|
||||
code = sub + ', ' + code;
|
||||
return this.parenthetical ? code : "(" + code + ")";
|
||||
code = utility('indexOf') + (".call(" + (this.array.compile(o)) + ", " + ref + ") ") + (this.negated ? '< 0' : '>= 0');
|
||||
return sub === ref ? code : "(" + sub + ", " + code + ")";
|
||||
};
|
||||
In.prototype.toString = function(idt) {
|
||||
return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
|
||||
|
||||
Reference in New Issue
Block a user