fn parse_rules<'a>() -> impl Fn(&'a str) -> IResult<&'a str, Vec<Rule>> {
        move |input: &'a str| {
            let mut rules = vec![];
            let mut input = input;
            loop {
                input = match RobotsParser::parse_rule()(input) {
                    Ok((input, rule)) => {
                        rules.push(rule);
                        input
                    }
                    Err(_) => match RobotsParser::comment_line_parser()(input) {
                        Ok((input, _)) => input,
                        Err(_) => return Ok((input, rules)),
                    },
                };
            }
        }
    }
/// Parses as many rules it can find
Parses as many rules it can find
Parses as many rules it can find
fn parse_rules<'a>() -> impl Fn(&'a str) -> IResult<&'a str, Vec<Rule>> {
        move |input: &'a str| {
            let mut rules = vec![];
            let mut input = input;
            loop {
                input = match RobotsParser::parse_rule()(input) {
                    Ok((input, rule)) => {
                        rules.push(rule);
                        input
                    }
                    Err(_) => match RobotsParser::comment_line_parser()(input) {
                        Ok((input, _)) => input,
                        Err(_) => return Ok((input, rules)),
                    },
                };
            }
        }
    }
fn parse_rules < ' a > ( ) -> impl Fn ( & ' a str ) -> IResult < & ' a str , Vec < Rule > > { move | input : & ' a str | { let mut rules = vec ! [ ] ; let mut input = input ; loop { input = match RobotsParser :: parse_rule ( ) ( input ) { Ok ( ( input , rule ) ) => { rules . push ( rule ) ; input } Err ( _ ) => match RobotsParser :: comment_line_parser ( ) ( input ) { Ok ( ( input , _ ) ) => input , Err ( _ ) => return Ok ( ( input , rules ) ) , } , } ; } } }
Parses as many rules it can find
Parses as many rules it can find