fn cmp_str(lexer: &mut Lexer, s: &str, err_msg: &'static str) -> crate::Result<()> {
    for char in s.chars() {
        if let Token {
            kind: TokenKind::Atom(tchar),
            ..
        } = lexer.next()
        {
            ensure!(char == tchar, err_msg);
        } else {
            bail!(err_msg);
        }
    }
    Ok(())
}
/// Validate a sequence of `TokenKind::Atom` matches the content of a string.
Validate a sequence of `TokenKind::Atom` matches the content of a string.
Validate a sequence of ` TokenKind :: Atom ` matches the content of a string .
fn cmp_str(lexer: &mut Lexer, s: &str, err_msg: &'static str) -> crate::Result<()> {
    for char in s.chars() {
        if let Token {
            kind: TokenKind::Atom(tchar),
            ..
        } = lexer.next()
        {
            ensure!(char == tchar, err_msg);
        } else {
            bail!(err_msg);
        }
    }
    Ok(())
}
fn cmp_str ( lexer : & mut Lexer , s : & str , err_msg : & ' static str ) -> crate :: Result < ( ) > { for char in s . chars ( ) { if let Token { kind : TokenKind :: Atom ( tchar ) , .. } = lexer . next ( ) { ensure ! ( char tchar err_msg ) ; } else { bail ! ( err_msg ) ; } } Ok ( ( ) ) }
Validate a sequence of `TokenKind::Atom` matches the content of a string.
Validate a sequence of ` TokenKind :: Atom ` matches the content of a string .
lexer
&mut Lexer
s
&str
err_msg
&'static str
lexer
&mut Lexer
s
&str
err_msg
&'static str