class Regexp::Lexer

def descend(type, token)

def descend(type, token)
  if type == :group or type == :assertion
    @nesting += 1 if OPENING_TOKENS.include?(token)
  end
  if type == :set or type == :subset
    @set_nesting += 1 if token == :open
  end
  if type == :conditional
    @conditional_nesting += 1 if token == :open
  end
end