removed remnant of 341f511b
This commit is contained in:
parent
2ea549ce5f
commit
dafe6b09c5
17
lib/nodes.js
17
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;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue