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