| 966 | return d2 |
| 967 | |
| 968 | def parse_args(self, clang: CLanguage) -> dict[str, str]: |
| 969 | self.select_prototypes() |
| 970 | self.init_limited_capi() |
| 971 | |
| 972 | self.flags = "" |
| 973 | self.declarations = "" |
| 974 | self.parser_prototype = "" |
| 975 | self.parser_definition = "" |
| 976 | self.impl_prototype = None |
| 977 | self.impl_definition = IMPL_DEFINITION_PROTOTYPE |
| 978 | |
| 979 | # parser_body_fields remembers the fields passed in to the |
| 980 | # previous call to parser_body. this is used for an awful hack. |
| 981 | self.parser_body_fields: tuple[str, ...] = () |
| 982 | |
| 983 | if not self.parameters and not self.varpos and not self.var_keyword: |
| 984 | self.parse_no_args() |
| 985 | elif self.use_meth_o(): |
| 986 | self.parse_one_arg() |
| 987 | elif self.has_option_groups(): |
| 988 | self.parse_option_groups() |
| 989 | elif self.var_keyword is not None: |
| 990 | self.parse_var_keyword() |
| 991 | elif (not self.requires_defining_class |
| 992 | and self.pos_only == len(self.parameters)): |
| 993 | self.parse_pos_only() |
| 994 | else: |
| 995 | self.parse_general(clang) |
| 996 | |
| 997 | self.copy_includes() |
| 998 | if self.is_new_or_init(): |
| 999 | self.handle_new_or_init() |
| 1000 | self.process_methoddef(clang) |
| 1001 | self.finalize(clang) |
| 1002 | |
| 1003 | return self.create_template_dict() |