fn parse_match_expr(&mut self, attrs: ThinAttributes) -> PResult<'a, P<Expr>> {
        let match_span = self.last_span;
        let lo = self.last_span.lo;
        let discriminant = try!(self.parse_expr_res(Restrictions::RESTRICTION_NO_STRUCT_LITERAL,
                                                    None));
        if let Err(mut e) = self.commit_expr_expecting(&discriminant,
                                                       token::OpenDelim(token::Brace)) {
            if self.token == token::Token::Semi {
                e.span_note(match_span, "did you mean to remove this `match` keyword?");
            }
            return Err(e)
        }
        let attrs = attrs.append(
            try!(self.parse_inner_attributes()).into_thin_attrs());
        let mut arms: Vec<Arm> = Vec::new();
        while self.token != token::CloseDelim(token::Brace) {
            match self.parse_arm() {
                Ok(arm) => arms.push(arm),
                Err(mut e) => {
                    // Recover by skipping to the end of the block.
                    e.emit();
                    self.recover_stmt();
                    let hi = self.span.hi;
                    if self.token == token::CloseDelim(token::Brace) {
                        self.bump();
                    }
                    return Ok(self.mk_expr(lo, hi, ExprKind::Match(discriminant, arms), attrs));
                }
            }
        }
        let hi = self.span.hi;
        self.bump();
        return Ok(self.mk_expr(lo, hi, ExprKind::Match(discriminant, arms), attrs));
    }
// `match` token already eaten
`match` token already eaten
` match ` token already eaten
fn parse_match_expr(&mut self, attrs: ThinAttributes) -> PResult<'a, P<Expr>> {
        let match_span = self.last_span;
        let lo = self.last_span.lo;
        let discriminant = try!(self.parse_expr_res(Restrictions::RESTRICTION_NO_STRUCT_LITERAL,
                                                    None));
        if let Err(mut e) = self.commit_expr_expecting(&discriminant,
                                                       token::OpenDelim(token::Brace)) {
            if self.token == token::Token::Semi {
                e.span_note(match_span, "did you mean to remove this `match` keyword?");
            }
            return Err(e)
        }
        let attrs = attrs.append(
            try!(self.parse_inner_attributes()).into_thin_attrs());
        let mut arms: Vec<Arm> = Vec::new();
        while self.token != token::CloseDelim(token::Brace) {
            match self.parse_arm() {
                Ok(arm) => arms.push(arm),
                Err(mut e) => {
                    // Recover by skipping to the end of the block.
                    e.emit();
                    self.recover_stmt();
                    let hi = self.span.hi;
                    if self.token == token::CloseDelim(token::Brace) {
                        self.bump();
                    }
                    return Ok(self.mk_expr(lo, hi, ExprKind::Match(discriminant, arms), attrs));
                }
            }
        }
        let hi = self.span.hi;
        self.bump();
        return Ok(self.mk_expr(lo, hi, ExprKind::Match(discriminant, arms), attrs));
    }
fn parse_match_expr ( & mut self , attrs : ThinAttributes ) -> PResult < ' a , P < Expr > > { let match_span = self . last_span ; let lo = self . last_span . lo ; let discriminant = try ! ( self parse_expr_res ( Restrictions RESTRICTION_NO_STRUCT_LITERAL None ) ) ; if let Err ( mut e ) = self . commit_expr_expecting ( & discriminant , token :: OpenDelim ( token :: Brace ) ) { if self . token == token :: Token :: Semi { e . span_note ( match_span , " " ) ; } return Err ( e ) } let attrs = attrs . append ( try ! ( self parse_inner_attributes ( ) ) . into_thin_attrs ( ) ) ; let mut arms : Vec < Arm > = Vec :: new ( ) ; while self . token != token :: CloseDelim ( token :: Brace ) { match self . parse_arm ( ) { Ok ( arm ) => arms . push ( arm ) , Err ( mut e ) => { // Recover by skipping to the end of the block. e . emit ( ) ; self . recover_stmt ( ) ; let hi = self . span . hi ; if self . token == token :: CloseDelim ( token :: Brace ) { self . bump ( ) ; } return Ok ( self . mk_expr ( lo , hi , ExprKind :: Match ( discriminant , arms ) , attrs ) ) ; } } } let hi = self . span . hi ; self . bump ( ) ; return Ok ( self . mk_expr ( lo , hi , ExprKind :: Match ( discriminant , arms ) , attrs ) ) ; }
`match` token already eaten
` match ` token already eaten
&mut self
attrs
ThinAttributes
&mut self
attrs
ThinAttributes