pub fn commit_expr(&mut self, e: &Expr, edible: &[token::Token],
                       inedible: &[token::Token]) -> PResult<'a, ()> {
        debug!("commit_expr {:?}", e);
        if let ExprKind::Path(..) = e.node {
            // might be unit-struct construction; check for recoverableinput error.
            let expected = edible.iter()
                .cloned()
                .chain(inedible.iter().cloned())
                .collect::<Vec<_>>();
            self.check_for_erroneous_unit_struct_expecting(&expected[..]);
        }
        self.expect_one_of(edible, inedible)
    }
/// Commit to parsing a complete expression `e` expected to be
/// followed by some token from the set edible + inedible.  Recover
/// from anticipated input errors, discarding erroneous characters.
Commit to parsing a complete expression `e` expected to be
followed by some token from the set edible + inedible.  Recover
from anticipated input errors, discarding erroneous characters.
Commit to parsing a complete expression ` e ` expected to be followed by some token from the set edible + inedible . Recover from anticipated input errors discarding erroneous characters .
pub fn commit_expr(&mut self, e: &Expr, edible: &[token::Token],
                       inedible: &[token::Token]) -> PResult<'a, ()> {
        debug!("commit_expr {:?}", e);
        if let ExprKind::Path(..) = e.node {
            // might be unit-struct construction; check for recoverableinput error.
            let expected = edible.iter()
                .cloned()
                .chain(inedible.iter().cloned())
                .collect::<Vec<_>>();
            self.check_for_erroneous_unit_struct_expecting(&expected[..]);
        }
        self.expect_one_of(edible, inedible)
    }
pub fn commit_expr ( & mut self , e : & Expr , edible : & [ token :: Token ] , inedible : & [ token :: Token ] ) -> PResult < ' a , ( ) > { debug ! ( " " e ) ; if let ExprKind :: Path ( .. ) = e . node { // might be unit-struct construction; check for recoverableinput error. let expected = edible . iter ( ) . cloned ( ) . chain ( inedible . iter ( ) . cloned ( ) ) . collect :: < Vec < _ > > ( ) ; self . check_for_erroneous_unit_struct_expecting ( & expected [ .. ] ) ; } self . expect_one_of ( edible , inedible ) }
Commit to parsing a complete expression `e` expected to be
followed by some token from the set edible + inedible.
Commit to parsing a complete expression ` e ` expected to be followed by some token from the set edible + inedible .
&mut self
e
&Expr
edible
&[token::Token]
inedible
&[token::Token]
&mut self
e
&Expr
edible
&[token::Token]
inedible
&[token::Token]