fixed a bug where in malfunctioned in commaed lists

This commit is contained in:
satyr
2010-10-21 22:13:39 +09:00
parent 880c5c8083
commit 2f7c076a50
5 changed files with 16 additions and 20 deletions

View File

@@ -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 ? '!' : ''));