pub fn parse_with_attributes(
        parser: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        let match_ = parser.parse()?;
        let expr = ast::Expr::parse_without_eager_brace(parser)?;

        let open = parser.parse()?;

        let mut branches = Vec::new();

        while !parser.peek::<ast::CloseBrace>()? {
            let branch = parser.parse::<ExprMatchBranch>()?;
            let comma = parser.parse::<Option<T![,]>>()?;
            let is_end = ast::utils::is_block_end(&branch.body, comma.as_ref());
            branches.push((branch, comma));

            if is_end {
                break;
            }
        }

        let close = parser.parse()?;

        Ok(ExprMatch {
            attributes,
            match_,
            expr,
            open,
            branches,
            close,
        })
    }
/// Parse the `match` expression attaching the given attributes
Parse the `match` expression attaching the given attributes
Parse the ` match ` expression attaching the given attributes
pub fn parse_with_attributes(
        parser: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        let match_ = parser.parse()?;
        let expr = ast::Expr::parse_without_eager_brace(parser)?;
        let open = parser.parse()?;
        let mut branches = Vec::new();
        while !parser.peek::<ast::CloseBrace>()? {
            let branch = parser.parse::<ExprMatchBranch>()?;
            let comma = parser.parse::<Option<T![,]>>()?;
            let is_end = ast::utils::is_block_end(&branch.body, comma.as_ref());
            branches.push((branch, comma));
            if is_end {
                break;
            }
        }
        let close = parser.parse()?;
        Ok(ExprMatch {
            attributes,
            match_,
            expr,
            open,
            branches,
            close,
        })
    }
pub fn parse_with_attributes ( parser : & mut Parser < ' _ > , attributes : Vec < ast :: Attribute > , ) -> Result < Self , ParseError > { let match_ = parser . parse ( ) ? ; let expr = ast :: Expr :: parse_without_eager_brace ( parser ) ? ; let open = parser . parse ( ) ? ; let mut branches = Vec :: new ( ) ; while ! parser . peek :: < ast :: CloseBrace > ( ) ? { let branch = parser . parse :: < ExprMatchBranch > ( ) ? ; let comma = parser . parse :: < Option < T ! [ ] > > ( ) ? ; let is_end = ast :: utils :: is_block_end ( & branch . body , comma . as_ref ( ) ) ; branches . push ( ( branch , comma ) ) ; if is_end { break ; } } let close = parser . parse ( ) ? ; Ok ( ExprMatch { attributes , match_ , expr , open , branches , close , } ) }
Parse the `match` expression attaching the given attributes
Parse the ` match ` expression attaching the given attributes
parser
&mut Parser<'_>
attributes
Vec<ast::Attribute>
parser
&mut Parser<'_>
attributes
Vec<ast::Attribute>