fn expect_bin_op(&mut self, op: BinOp) -> ParseResult<()> {
        for op2 in BinOp::values() {
            if op2 != op && op2.as_str().starts_with(op.as_str()) {
                if self.is_bin_op(op2) {
                    expected!(self, BinOp(op));
                }
            }
        }
        for c in op.as_str().chars() {
            if !self.is_punctuation(c) {
                expected!(self, BinOp(op));
            }
            self.bump_raw();
        }
        if let Some(token) = self.cur {
            if token.is_whitespace() {
                self.bump();
            }
        }
        Ok(())
    }
/// Consumes a number of tokens if they match the
/// given binary operator, otherwise it returns an error.
Consumes a number of tokens if they match the
given binary operator, otherwise it returns an error.
Consumes a number of tokens if they match the given binary operator otherwise it returns an error .
fn expect_bin_op(&mut self, op: BinOp) -> ParseResult<()> {
        for op2 in BinOp::values() {
            if op2 != op && op2.as_str().starts_with(op.as_str()) {
                if self.is_bin_op(op2) {
                    expected!(self, BinOp(op));
                }
            }
        }
        for c in op.as_str().chars() {
            if !self.is_punctuation(c) {
                expected!(self, BinOp(op));
            }
            self.bump_raw();
        }
        if let Some(token) = self.cur {
            if token.is_whitespace() {
                self.bump();
            }
        }
        Ok(())
    }
fn expect_bin_op ( & mut self , op : BinOp ) -> ParseResult < ( ) > { for op2 in BinOp :: values ( ) { if op2 != op && op2 . as_str ( ) . starts_with ( op . as_str ( ) ) { if self . is_bin_op ( op2 ) { expected ! ( self BinOp ( op ) ) ; } } } for c in op . as_str ( ) . chars ( ) { if ! self . is_punctuation ( c ) { expected ! ( self BinOp ( op ) ) ; } self . bump_raw ( ) ; } if let Some ( token ) = self . cur { if token . is_whitespace ( ) { self . bump ( ) ; } } Ok ( ( ) ) }
Consumes a number of tokens if they match the
given binary operator, otherwise it returns an error.
Consumes a number of tokens if they match the given binary operator otherwise it returns an error .
&mut self
op
BinOp
&mut self
op
BinOp