fn peek_operator(&self, operator: &str) -> bool {
        for (i, c) in operator.char_indices() {
            if let Some(TokenTree::Punct(punct)) = self.tokens.get(i) {
                if punct.as_char() != c {
                    return false;
                }
                if i + 1 < operator.len() && punct.spacing() != Spacing::Joint {
                    return false;
                }
            } else {
                return false;
            }
        }
        true
    }
/// Check if the input starts with the operator.
Check if the input starts with the operator.
Check if the input starts with the operator .
fn peek_operator(&self, operator: &str) -> bool {
        for (i, c) in operator.char_indices() {
            if let Some(TokenTree::Punct(punct)) = self.tokens.get(i) {
                if punct.as_char() != c {
                    return false;
                }
                if i + 1 < operator.len() && punct.spacing() != Spacing::Joint {
                    return false;
                }
            } else {
                return false;
            }
        }
        true
    }
fn peek_operator ( & self , operator : & str ) -> bool { for ( i , c ) in operator . char_indices ( ) { if let Some ( TokenTree :: Punct ( punct ) ) = self . tokens . get ( i ) { if punct . as_char ( ) != c { return false ; } if i + 1 < operator . len ( ) && punct . spacing ( ) != Spacing :: Joint { return false ; } } else { return false ; } } true }
Check if the input starts with the operator.
Check if the input starts with the operator .
&self
operator
&str