fn is_terminal(rules: &[Rule], name: &str) -> Option<String> {
    for rule in rules {
        if rule.head == name {
            return Some(String::from(&rule.tokens));
        }
    }

    return None;
}
/// Function returns the tokens of the rule if theres a rule
/// that matches the name, if not it returns none
Function returns the tokens of the rule if theres a rule
that matches the name, if not it returns none
Function returns the tokens of the rule if theres a rule that matches the name if not it returns none
fn is_terminal(rules: &[Rule], name: &str) -> Option<String> {
    for rule in rules {
        if rule.head == name {
            return Some(String::from(&rule.tokens));
        }
    }
    return None;
}
fn is_terminal ( rules : & [ Rule ] , name : & str ) -> Option < String > { for rule in rules { if rule . head == name { return Some ( String :: from ( & rule . tokens ) ) ; } } return None ; }
Function returns the tokens of the rule if theres a rule
that matches the name, if not it returns none
Function returns the tokens of the rule if theres a rule that matches the name if not it returns none
rules
&[Rule]
name
&str
rules
&[Rule]
name
&str