def _parse_recursive( self, token_parser: TokenParser, ) -> FullDepsWithDetailsDescriptionSdv[ ModelConstructor[FilesMatcherModel]]: mb_min_depth = token_parser.consume_and_handle_optional_option3( self.DEPTH_INTEGER_PARSER.parse, file_or_dir_contents.MIN_DEPTH_OPTION.name) mb_max_depth = token_parser.consume_and_handle_optional_option3( self.DEPTH_INTEGER_PARSER.parse, file_or_dir_contents.MAX_DEPTH_OPTION.name) return dir_contents.model_constructor__recursive( mb_min_depth, mb_max_depth)
def parse_from_token_parser(self, parser: TokenParser) -> Optional[T]: return parser.consume_and_handle_optional_option3( self._argument_parser.parse_from_token_parser, self._option, )
def parse_optional_option__optional(token_parser: TokenParser) -> Optional[StringTransformerSdv]: return token_parser.consume_and_handle_optional_option3( _PARSER__ANY_LINE__SIMPLE.parse_from_token_parser, string_transformer.WITH_TRANSFORMED_CONTENTS_OPTION_NAME, )