diff --git a/lib/nodes.js b/lib/nodes.js index 4196f4b2..faa2c4f6 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -1386,25 +1386,10 @@ return "(" + (first) + ") && (" + (shared) + " " + (this.operator) + " " + (second) + ")"; }; OpNode.prototype.compileAssignment = function(o) { - var _ref2, first, firstVar, left, rite, second; + var _ref2, left, rite; _ref2 = this.first.cacheReference(o), left = _ref2[0], rite = _ref2[1]; rite = new AssignNode(rite, this.second); return new OpNode(this.operator.slice(0, -1), left, rite).compile(o); - _ref2 = this.first.compileReference(o, { - precompile: true, - assignment: true - }), first = _ref2[0], firstVar = _ref2[1]; - second = this.second.compile(o); - if (this.second instanceof OpNode) { - second = ("(" + (second) + ")"); - } - if (first.match(IDENTIFIER)) { - o.scope.find(first); - } - if (this.operator === '?=') { - return ("" + (first) + " = " + (ExistenceNode.compileTest(o, literal(firstVar))[0]) + " ? " + (firstVar) + " : " + (second)); - } - return "" + (first) + " " + (this.operator.substr(0, 2)) + " (" + (firstVar) + " = " + (second) + ")"; }; OpNode.prototype.compileExistence = function(o) { var fst, ref; diff --git a/src/nodes.coffee b/src/nodes.coffee index d29a0b56..c8294e2f 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -1225,13 +1225,6 @@ exports.OpNode = class OpNode extends BaseNode [left, rite] = @first.cacheReference o rite = new AssignNode rite, @second return new OpNode(@operator.slice(0, -1), left, rite).compile o - - [first, firstVar] = @first.compileReference o, precompile: yes, assignment: yes - second = @second.compile o - second = "(#{second})" if @second instanceof OpNode - o.scope.find(first) if first.match(IDENTIFIER) - return "#{first} = #{ ExistenceNode.compileTest(o, literal(firstVar))[0] } ? #{firstVar} : #{second}" if @operator is '?=' - "#{first} #{ @operator.substr(0, 2) } (#{firstVar} = #{second})" compileExistence: (o) -> if @first.isComplex()