# File lib/ruby_parser_extras.rb, line 858 def node_assign(lhs, rhs) # TODO: rename new_assign return nil unless lhs rhs = value_expr rhs case lhs[0] when :gasgn, :iasgn, :lasgn, :masgn, :cdecl, :cvdecl, :cvasgn then lhs << rhs when :attrasgn, :call then args = lhs.pop unless Symbol === lhs.last lhs.concat arg_add(args, rhs)[1..-1] when :const then lhs[0] = :cdecl lhs << rhs else raise "unknown lhs #{lhs.inspect}" end lhs end