def register_parser(self, parser: Parser):
check_var(parser, var_types=Parser, var_name='<STR_LIT>')<EOL>if (not parser.supports_multifile()) and (not parser.supports_singlefile()):<EOL><INDENT>raise _InvalidParserException.create(parser)<EOL><DEDENT>res = parser.is_able_to_parse_detailed(desired_type=JOKER, desired_ext=JOKER, strict=True)<EOL>if not (res[<NUM_LIT:0>] is True and res[<NUM_LIT:1>] is None):<EOL><INDENT>raise ValueError('<STR_LIT>' + str(parser) + '<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if parser.is_generic():<EOL><INDENT>self._generic_parsers.append(parser)<EOL><DEDENT>else:<EOL><INDENT>self._specific_parsers.append(parser)<EOL><DEDENT>for ext in parser.supported_exts:<EOL><INDENT>for typ in parser.supported_types:<EOL><INDENT>insert_element_to_dict_of_list(self._strict_types_to_ext, typ, ext)<EOL>insert_element_to_dict_of_list(self._ext_to_strict_types, ext, typ)<EOL><DEDENT><DEDENT>
Utility method to register any parser. Parsers that support any type will be stored in the "generic"
list, and the others will be stored in front of the types they support
:return: