/// Parse the `select` expression and attach the given attributes
Parse the `select` expression and attach the given attributes
Parse the ` select ` expression and attach the given attributes
pub fn parse_with_attributes(
        p: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        let select = p.parse()?;
        let open = p.parse()?;
        let mut branches = Vec::new();
        while !p.peek::<T!['}']>()? {
            let branch = ExprSelectBranch::parse(p)?;
            let comma = p.parse::<Option<T![,]>>()?;
            let is_end = utils::is_block_end(branch.expr(), comma.as_ref());
            branches.push((branch, comma));
            if is_end {
                break;
            }
        }
        let close = p.parse()?;
        Ok(Self {
            attributes,
            select,
            open,
            branches,
            close,
        })
    }
pub fn parse_with_attributes ( p : & mut Parser < ' _ > , attributes : Vec < ast :: Attribute > , ) -> Result < Self , ParseError > { let select = p . parse ( ) ? ; let open = p . parse ( ) ? ; let mut branches = Vec :: new ( ) ; while ! p . peek :: < T ! [ '}' ] > ( ) ? { let branch = ExprSelectBranch :: parse ( p ) ? ; let comma = p . parse :: < Option < T ! [ ] > > ( ) ? ; let is_end = utils :: is_block_end ( branch . expr ( ) , comma . as_ref ( ) ) ; branches . push ( ( branch , comma ) ) ; if is_end { break ; } } let close = p . parse ( ) ? ; Ok ( Self { attributes , select , open , branches , close , } ) }
Parse the `select` expression and attach the given attributes
Parse the ` select ` expression and attach the given attributes
p
&mut Parser<'_>
attributes
Vec<ast::Attribute>