class Regexp::Lexer

def ascend(type, token)

def ascend(type, token)
  return unless CLOSING_TOKENS.include?(token)
  case type
  when :group, :assertion
    self.nesting = nesting - 1
  when :set
    self.set_nesting = set_nesting - 1
  when :conditional
    self.conditional_nesting = conditional_nesting - 1
  else
    raise "unhandled nesting type #{type}"
  end
end