wrap_block_expr

Function wrap_block_expr 

Source
fn wrap_block_expr(cx: &ExtCtxt<'_>, expr: Box<Expr>) -> Box<Expr>
Expand description

Wraps a block expression in parentheses to ensure valid AST in macro expansion output.

If the given expression is a block, it is wrapped in parentheses; otherwise, it is returned unchanged.