mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
fixing #768, preserving execution order of in arguments when compiled
to an `or`.
This commit is contained in:
@@ -259,7 +259,7 @@
|
||||
};
|
||||
Literal.prototype.isStatement = function() {
|
||||
var _ref2;
|
||||
return ('break' === (_ref2 = this.value) || 'continue' === _ref2 || 'debugger' === _ref2);
|
||||
return ((_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger');
|
||||
};
|
||||
Literal.prototype.isPureStatement = Literal.prototype.isStatement;
|
||||
Literal.prototype.isComplex = NO;
|
||||
@@ -1398,14 +1398,14 @@
|
||||
};
|
||||
Op.prototype.isMutator = function() {
|
||||
var _ref2;
|
||||
return ends(this.operator, '=') && !('===' === (_ref2 = this.operator) || '!==' === _ref2);
|
||||
return ends(this.operator, '=') && !((_ref2 = this.operator) === '===' || _ref2 === '!==');
|
||||
};
|
||||
Op.prototype.isChainable = function() {
|
||||
return include(this.CHAINABLE, this.operator);
|
||||
};
|
||||
Op.prototype.invert = function() {
|
||||
var _ref2;
|
||||
if (('===' === (_ref2 = this.operator) || '!==' === _ref2)) {
|
||||
if (((_ref2 = this.operator) === '===' || _ref2 === '!==')) {
|
||||
this.operator = this.INVERSIONS[this.operator];
|
||||
return this;
|
||||
} else return this.second ? new Parens(this).invert() : Op.__super__.invert.call(this);
|
||||
@@ -1497,7 +1497,7 @@
|
||||
_result = [];
|
||||
for (i = 0, _len = (_ref2 = this.array.base.objects).length; i < _len; i++) {
|
||||
item = _ref2[i];
|
||||
_result.push("" + (item.compile(o)) + " === " + (i ? this.obj2 : this.obj1));
|
||||
_result.push("" + (i ? this.obj2 : this.obj1) + " === " + (item.compile(o)));
|
||||
}
|
||||
return _result;
|
||||
}).call(this);
|
||||
|
||||
Reference in New Issue
Block a user