pub fn parse_open_paren(
        p: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        // Special case: empty tuple.
        if let (K!['('], K![')']) = (p.nth(0)?, p.nth(1)?) {
            return Ok(Self::Tuple(Box::new(ast::ExprTuple::parse_with_meta(
                p, attributes,
            )?)));
        }

        let open = p.parse::<T!['(']>()?;
        let expr = p.parse::<Self>()?;

        if p.peek::<T![')']>()? {
            return Ok(Self::Group(Box::new(ast::ExprGroup {
                attributes,
                open,
                expr,
                close: p.parse()?,
            })));
        }

        Ok(Self::Tuple(Box::new(
            ast::ExprTuple::parse_from_first_expr(p, attributes, open, expr)?,
        )))
    }
/// Parsing something that opens with a parenthesis.
Parsing something that opens with a parenthesis.
Parsing something that opens with a parenthesis .
pub fn parse_open_paren(
        p: &mut Parser<'_>,
        attributes: Vec<ast::Attribute>,
    ) -> Result<Self, ParseError> {
        // Special case: empty tuple.
        if let (K!['('], K![')']) = (p.nth(0)?, p.nth(1)?) {
            return Ok(Self::Tuple(Box::new(ast::ExprTuple::parse_with_meta(
                p, attributes,
            )?)));
        }
        let open = p.parse::<T!['(']>()?;
        let expr = p.parse::<Self>()?;
        if p.peek::<T![')']>()? {
            return Ok(Self::Group(Box::new(ast::ExprGroup {
                attributes,
                open,
                expr,
                close: p.parse()?,
            })));
        }
        Ok(Self::Tuple(Box::new(
            ast::ExprTuple::parse_from_first_expr(p, attributes, open, expr)?,
        )))
    }
pub fn parse_open_paren ( p : & mut Parser < ' _ > , attributes : Vec < ast :: Attribute > , ) -> Result < Self , ParseError > { // Special case: empty tuple. if let ( K ! [ '(' ] , K ! [ ')' ] ) = ( p . nth ( 0 ) ? , p . nth ( 1 ) ? ) { return Ok ( Self :: Tuple ( Box :: new ( ast :: ExprTuple :: parse_with_meta ( p , attributes , ) ? ) ) ) ; } let open = p . parse :: < T ! [ '(' ] > ( ) ? ; let expr = p . parse :: < Self > ( ) ? ; if p . peek :: < T ! [ ')' ] > ( ) ? { return Ok ( Self :: Group ( Box :: new ( ast :: ExprGroup { attributes , open , expr , close : p . parse ( ) ? , } ) ) ) ; } Ok ( Self :: Tuple ( Box :: new ( ast :: ExprTuple :: parse_from_first_expr ( p , attributes , open , expr ) ? , ) ) ) }
Parsing something that opens with a parenthesis.
Parsing something that opens with a parenthesis .
p
&mut Parser<'_>
attributes
Vec<ast::Attribute>
p
&mut Parser<'_>
attributes
Vec<ast::Attribute>