soak accesses no longer consume corresponding operators
This commit is contained in:
parent
c5f922c5db
commit
b0e34edf99
|
@ -1382,10 +1382,6 @@
|
|||
return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
|
||||
};
|
||||
Op.prototype.compileNode = function(o) {
|
||||
var node;
|
||||
if (node = Value.unfoldSoak(o, this, 'first')) {
|
||||
return node.compile(o);
|
||||
}
|
||||
if (this.isChainable() && this.first.unwrap() instanceof Op && this.first.unwrap().isChainable()) {
|
||||
return this.compileChain(o);
|
||||
}
|
||||
|
|
|
@ -1201,7 +1201,6 @@ exports.Op = class Op extends Base
|
|||
super(idt, @constructor.name + ' ' + @operator)
|
||||
|
||||
compileNode: (o) ->
|
||||
return node.compile o if node = Value.unfoldSoak o, this, 'first'
|
||||
return @compileChain(o) if @isChainable() and @first.unwrap() instanceof Op and @first.unwrap().isChainable()
|
||||
return @compileAssignment(o) if indexOf(@ASSIGNMENT, @operator) >= 0
|
||||
return @compileUnary(o) if @isUnary()
|
||||
|
|
|
@ -92,6 +92,7 @@ ok not value?.property?, 'safely checks existence on soaks'
|
|||
|
||||
|
||||
eq nothing?.value, undefined, 'safely calls values off of non-existent variables'
|
||||
eq !nothing?.value and 1, 1, 'corresponding operators work as expected'
|
||||
|
||||
|
||||
# Assign to the result of an exsitential operation with a minus.
|
||||
|
|
Loading…
Reference in New Issue