mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
got about as far as I think I can with operator nodes for now, without zach's optimizations
This commit is contained in:
@@ -783,9 +783,8 @@ module CoffeeScript
|
||||
def compile_assignment(o)
|
||||
first, second = @first.compile(o), @second.compile(o)
|
||||
o[:scope].find(first) if @first.unwrap.is_a?(Value)
|
||||
sym = @operator[0..1]
|
||||
return "#{first} = #{ExistenceNode.compile_test(o, @first)} ? #{first} : #{second}" if @operator == '?='
|
||||
"#{first} = #{first} #{sym} #{second}"
|
||||
"#{first} = #{first} #{@operator[0..1]} #{second}"
|
||||
end
|
||||
|
||||
def compile_existence(o)
|
||||
|
||||
Reference in New Issue
Block a user