pub fn find_token(tokens: String, lookahead: String) -> Option<String> {
    for sentence in tokens.split('|') {
        for word in sentence.split(" ") {
            if word == lookahead
            {
                return Some(String::from(sentence));
            }
        }    
    }

    return None;
}
/// Fuction check with theres a branch char or '|'
/// returning part of the rule that matches lookahead
Fuction check with theres a branch char or '|'
returning part of the rule that matches lookahead
Fuction check with theres a branch char or ' | ' returning part of the rule that matches lookahead
pub fn find_token(tokens: String, lookahead: String) -> Option<String> {
    for sentence in tokens.split('|') {
        for word in sentence.split(" ") {
            if word == lookahead
            {
                return Some(String::from(sentence));
            }
        }    
    }
    return None;
}
pub fn find_token ( tokens : String , lookahead : String ) -> Option < String > { for sentence in tokens . split ( '|' ) { for word in sentence . split ( " " ) { if word == lookahead { return Some ( String :: from ( sentence ) ) ; } } } return None ; }
Fuction check with theres a branch char or '|'
returning part of the rule that matches lookahead
Fuction check with theres a branch char or ' | ' returning part of the rule that matches lookahead
tokens
String
lookahead
String
tokens
String
lookahead
String