lib/ruby_parser/bm_sexp.rb
#Raise a WrongSexpError if the nodes type does not match one of the expected
#types.
Raise a WrongSexpError if the nodes type does not match one of the expected
types.
Raise a WrongSexpError if the nodes type does not match one of the expected types .
def expect *types
    unless types.include? self.node_type
      raise WrongSexpError, "Expected #{types.join ' or '} but given #{self.inspect}", caller[1..-1]
    end
  end
def expect * types unless types . include? self . node_type raise WrongSexpError , "Expected #{types.join ' or '} but given #{self.inspect}" , caller [ 1 .. - 1 ] end end
Raise a WrongSexpError if the nodes type does not match one of the expected
types.
Raise a WrongSexpError if the nodes type does not match one of the expected types .
types
<not_specific>