def _parse_parameters_and_qualifiers(self, paramMode: str) -> ASTParametersQualifiers:
    if (paramMode == 'new'):
        return None
    self.skip_ws()
    if (not self.skip_string('(')):
        if (paramMode == 'function'):
            self.fail('Expecting "(" in parameters-and-qualifiers.')
        else:
            return None
    args = []
    self.skip_ws()
    if (not self.skip_string(')')):
        while 1:
            self.skip_ws()
            if self.skip_string('...'):
                args.append(ASTFunctionParameter(None, True))
                self.skip_ws()
                if (not self.skip_string(')')):
                    self.fail('Expected ")" after "..." in parameters-and-qualifiers.')
                break
            arg = self._parse_type_with_init(outer=None, named='single')
            args.append(ASTFunctionParameter(arg))
            self.skip_ws()
            if self.skip_string(','):
                continue
            elif self.skip_string(')'):
                break
            else:
                self.fail(('Expecting "," or ")" in parameters-and-qualifiers, got "%s".' % self.current_char))
    if ((paramMode != 'function') and False):
        return ASTParametersQualifiers(args, None, None, None, None, None, None, None)
    self.skip_ws()
    const = self.skip_word_and_ws('const')
    volatile = self.skip_word_and_ws('volatile')
    if (not const):
        const = self.skip_word_and_ws('const')
    refQual = None
    if self.skip_string('&&'):
        refQual = '&&'
    if ((not refQual) and self.skip_string('&')):
        refQual = '&'
    exceptionSpec = None
    override = None
    final = None
    initializer = None
    self.skip_ws()
    if self.skip_string('noexcept'):
        exceptionSpec = 'noexcept'
        self.skip_ws()
        if self.skip_string('('):
            self.fail('Parameterised "noexcept" not yet implemented.')
    self.skip_ws()
    override = self.skip_word_and_ws('override')
    final = self.skip_word_and_ws('final')
    if (not override):
        override = self.skip_word_and_ws('override')
    self.skip_ws()
    if self.skip_string('='):
        self.skip_ws()
        valid = ('0', 'delete', 'default')
        for w in valid:
            if self.skip_word_and_ws(w):
                initializer = w
                break
        if (not initializer):
            self.fail(('Expected "%s" in initializer-specifier.' % '" or "'.join(valid)))
    return ASTParametersQualifiers(args, volatile, const, refQual, exceptionSpec, override, final, initializer)
def _parse_parameters_and_qualifiers(self, paramMode: str) -> ASTParametersQualifiers:
    if (paramMode == 'new'):
        return None
    self.skip_ws()
    if (not self.skip_string('(')):
        if (paramMode == 'function'):
            self.fail('Expecting "(" in parameters-and-qualifiers.')
        else:
            return None
    args = []
    self.skip_ws()
    if (not self.skip_string(')')):
        while 1:
            self.skip_ws()
            if self.skip_string('...'):
                args.append(ASTFunctionParameter(None, True))
                self.skip_ws()
                if (not self.skip_string(')')):
                    self.fail('Expected ")" after "..." in parameters-and-qualifiers.')
                break
            arg = self._parse_type_with_init(outer=None, named='single')
            args.append(ASTFunctionParameter(arg))
            self.skip_ws()
            if self.skip_string(','):
                continue
            elif self.skip_string(')'):
                break
            else:
                self.fail(('Expecting "," or ")" in parameters-and-qualifiers, got "%s".' % self.current_char))
    if ((paramMode != 'function') and False):
        return ASTParametersQualifiers(args, None, None, None, None, None, None, None)
    self.skip_ws()
    const = self.skip_word_and_ws('const')
    volatile = self.skip_word_and_ws('volatile')
    if (not const):
        const = self.skip_word_and_ws('const')
    refQual = None
    if self.skip_string('&&'):
        refQual = '&&'
    if ((not refQual) and self.skip_string('&')):
        refQual = '&'
    exceptionSpec = None
    override = None
    final = None
    initializer = None
    self.skip_ws()
    if self.skip_string('noexcept'):
        exceptionSpec = 'noexcept'
        self.skip_ws()
        if self.skip_string('('):
            self.fail('Parameterised "noexcept" not yet implemented.')
    self.skip_ws()
    override = self.skip_word_and_ws('override')
    final = self.skip_word_and_ws('final')
    if (not override):
        override = self.skip_word_and_ws('override')
    self.skip_ws()
    if self.skip_string('='):
        self.skip_ws()
        valid = ('0', 'delete', 'default')
        for w in valid:
            if self.skip_word_and_ws(w):
                initializer = w
                break
        if (not initializer):
            self.fail(('Expected "%s" in initializer-specifier.' % '" or "'.join(valid)))
    return ASTParametersQualifiers(args, volatile, const, refQual, exceptionSpec, override, final, initializer)