def op_assign(lhs, op_t, rhs)
case lhs.type
when :gvasgn, :ivasgn, :lvasgn, :cvasgn, :casgn, :send, :csend
operator = value(op_t)[0..-1].to_sym
source_map = lhs.loc.
with_operator(loc(op_t)).
with_expression(join_exprs(lhs, rhs))
case operator
when '&&''&&'
n(:and_asgn, [ lhs, rhs ], source_map)
when '||''||'
n(:or_asgn, [ lhs, rhs ], source_map)
else
n(:op_asgn, [ lhs, operator, rhs ], source_map)
end
when :back_ref, :nth_ref
diagnostic :error, :backref_assignment, nil, lhs.loc.expression
end
end