def _parse_class(self) -> ASTClass:
    name = self._parse_nested_name()
    self.skip_ws()
    final = self.skip_word_and_ws('final')
    bases = []
    self.skip_ws()
    if self.skip_string(':'):
        while 1:
            self.skip_ws()
            visibility = None
            virtual = False
            pack = False
            if self.skip_word_and_ws('virtual'):
                virtual = True
            if self.match(_visibility_re):
                visibility = self.matched_text
                self.skip_ws()
            if ((not virtual) and self.skip_word_and_ws('virtual')):
                virtual = True
            baseName = self._parse_nested_name()
            self.skip_ws()
            pack = self.skip_string('...')
            bases.append(ASTBaseClass(baseName, visibility, virtual, pack))
            self.skip_ws()
            if self.skip_string(','):
                continue
            else:
                break
    return ASTClass(name, final, bases)
def _parse_class(self) -> ASTClass:
    name = self._parse_nested_name()
    self.skip_ws()
    final = self.skip_word_and_ws('final')
    bases = []
    self.skip_ws()
    if self.skip_string(':'):
        while 1:
            self.skip_ws()
            visibility = None
            virtual = False
            pack = False
            if self.skip_word_and_ws('virtual'):
                virtual = True
            if self.match(_visibility_re):
                visibility = self.matched_text
                self.skip_ws()
            if ((not virtual) and self.skip_word_and_ws('virtual')):
                virtual = True
            baseName = self._parse_nested_name()
            self.skip_ws()
            pack = self.skip_string('...')
            bases.append(ASTBaseClass(baseName, visibility, virtual, pack))
            self.skip_ws()
            if self.skip_string(','):
                continue
            else:
                break
    return ASTClass(name, final, bases)