module Regexp::Lexer
def self.ascend(type, token)
def self.ascend(type, token) if type == :group or type == :assertion @nesting -= 1 if CLOSING_TOKENS.include?(token) end if type == :set or type == :subset @set_nesting -= 1 if token == :close end if type == :conditional @conditional_nesting -= 1 if token == :close end end