def _parse_decl_specs(self, outer: str, typed: bool=True) -> ASTDeclSpecs:
    if outer:
        if (outer not in ('type', 'member', 'function', 'templateParam')):
            raise Exception(('Internal error, unknown outer "%s".' % outer))
    '\n        storage-class-specifier function-specifier "constexpr"\n        "volatile" "const" trailing-type-specifier\n\n        storage-class-specifier ->\n              "static" (only for member_object and function_object)\n            | "register"\n\n        function-specifier -> "inline" | "virtual" | "explicit" (only for\n        function_object)\n\n        "constexpr" (only for member_object and function_object)\n        '
    leftSpecs = self._parse_decl_specs_simple(outer, typed)
    rightSpecs = None
    if typed:
        trailing = self._parse_trailing_type_spec()
        rightSpecs = self._parse_decl_specs_simple(outer, typed)
    else:
        trailing = None
    return ASTDeclSpecs(outer, leftSpecs, rightSpecs, trailing)
def _parse_decl_specs(self, outer: str, typed: bool=True) -> ASTDeclSpecs:
    if outer:
        if (outer not in ('type', 'member', 'function', 'templateParam')):
            raise Exception(('Internal error, unknown outer "%s".' % outer))
    '\n        storage-class-specifier function-specifier "constexpr"\n        "volatile" "const" trailing-type-specifier\n\n        storage-class-specifier ->\n              "static" (only for member_object and function_object)\n            | "register"\n\n        function-specifier -> "inline" | "virtual" | "explicit" (only for\n        function_object)\n\n        "constexpr" (only for member_object and function_object)\n        '
    leftSpecs = self._parse_decl_specs_simple(outer, typed)
    rightSpecs = None
    if typed:
        trailing = self._parse_trailing_type_spec()
        rightSpecs = self._parse_decl_specs_simple(outer, typed)
    else:
        trailing = None
    return ASTDeclSpecs(outer, leftSpecs, rightSpecs, trailing)