get_match_node (RubyParser)

    # File lib/ruby_parser_extras.rb, line 279
      def get_match_node lhs, rhs # TODO: rename to new_match
        if lhs then
          case lhs[0]
          when :dregx, :dregx_once then
            return s(:match2, lhs, rhs).line(lhs.line)
          when :lit then
            return s(:match2, lhs, rhs).line(lhs.line) if Regexp === lhs.last
          end
        end

        if rhs then
          case rhs[0]
          when :dregx, :dregx_once then
            return s(:match3, rhs, lhs).line(lhs.line)
          when :lit then
            return s(:match3, rhs, lhs).line(lhs.line) if Regexp === rhs.last
          end
        end

        return s(:call, lhs, "=~""=~", s(:arglist, rhs)).line(lhs.line)
      end