def process_call(exp)
receiver_node_type = exp.first.nil? ? nil : exp.first.first
receiver = process exp.shift
receiver = "(#{receiver})" if
Ruby2Ruby::ASSIGN_NODES.include? receiver_node_type
name = exp.shift
args = exp.shift rescue nil
case name
when :<=>, :==, :<, :>, :<=, :>=, :-, :+, :*, :/, :%, :<<, :>>, :** then
"(#{receiver} #{name} #{process args})"
when :[] then
receiver = "self" if receiver.nil?
"#{receiver}[#{process args}]"
when :[]= then
receiver = "self" if receiver.nil?
lhs = args.pop
"#{receiver}[#{process args}] = #{process lhs}"
when "-@""-@" then
"-#{receiver}"
when "+@""+@" then
"+#{receiver}"
else
args = process args
args = nil if args.empty?
args = "(#{args})" if args
receiver = "#{receiver}." if receiver
"#{receiver}#{name}#{args}"
end
end