fn unbuild_rec_expr(expr: &Expression, rec_expr: &RecExpr) -> BlockOrExpression {
    match expr {
        Expression::BlockExpression { .. }
        | Expression::BlockReturn { .. }
        | Expression::BlockThrow { .. }
        | Expression::BlockReturnVoid
        | Expression::BlockConstAssignment { .. }
        | Expression::BlockIf { .. } => {
            BlockOrExpression::Block(rec_expr_to_ast_block(expr, rec_expr))
        }
        Expression::Conditional { .. }
        | Expression::Array { .. }
        | Expression::Call { .. }
        | Expression::ArrowFunctionBlock0 { .. }
        | Expression::ArrowFunctionBlock { .. }
        | Expression::ArrowFunctionExpr0 { .. }
        | Expression::ArrowFunctionExpr { .. }
        | Expression::ArrowFunctionIdentity { .. }
        | Expression::IndexAccess { .. }
        | Expression::Operator { .. }
        | Expression::Object { .. }
        | Expression::True
        | Expression::False
        | Expression::Undefined
        | Expression::Number { .. }
        | Expression::String { .. }
        | Expression::Variable { .. } => {
            BlockOrExpression::Expression(rec_expr_to_ast_expr(expr, rec_expr))
        }
        Expression::ArrowFunctionParameters { .. } => unreachable!(),
    }
}
// TODO: consider returning a `Result` here so we can fail gracefully?
// but hopefully it shouldn't fail...
consider returning a `Result` here so we can fail gracefully.
but hopefully it shouldn't fail
consider returning a ` Result ` here so we can fail gracefully . but hopefully it shouldn ' t fail
fn unbuild_rec_expr(expr: &Expression, rec_expr: &RecExpr) -> BlockOrExpression {
    match expr {
        Expression::BlockExpression { .. }
        | Expression::BlockReturn { .. }
        | Expression::BlockThrow { .. }
        | Expression::BlockReturnVoid
        | Expression::BlockConstAssignment { .. }
        | Expression::BlockIf { .. } => {
            BlockOrExpression::Block(rec_expr_to_ast_block(expr, rec_expr))
        }
        Expression::Conditional { .. }
        | Expression::Array { .. }
        | Expression::Call { .. }
        | Expression::ArrowFunctionBlock0 { .. }
        | Expression::ArrowFunctionBlock { .. }
        | Expression::ArrowFunctionExpr0 { .. }
        | Expression::ArrowFunctionExpr { .. }
        | Expression::ArrowFunctionIdentity { .. }
        | Expression::IndexAccess { .. }
        | Expression::Operator { .. }
        | Expression::Object { .. }
        | Expression::True
        | Expression::False
        | Expression::Undefined
        | Expression::Number { .. }
        | Expression::String { .. }
        | Expression::Variable { .. } => {
            BlockOrExpression::Expression(rec_expr_to_ast_expr(expr, rec_expr))
        }
        Expression::ArrowFunctionParameters { .. } => unreachable!(),
    }
}
fn unbuild_rec_expr ( expr : & Expression , rec_expr : & RecExpr ) -> BlockOrExpression { match expr { Expression :: BlockExpression { .. } | Expression :: BlockReturn { .. } | Expression :: BlockThrow { .. } | Expression :: BlockReturnVoid | Expression :: BlockConstAssignment { .. } | Expression :: BlockIf { .. } => { BlockOrExpression :: Block ( rec_expr_to_ast_block ( expr , rec_expr ) ) } Expression :: Conditional { .. } | Expression :: Array { .. } | Expression :: Call { .. } | Expression :: ArrowFunctionBlock0 { .. } | Expression :: ArrowFunctionBlock { .. } | Expression :: ArrowFunctionExpr0 { .. } | Expression :: ArrowFunctionExpr { .. } | Expression :: ArrowFunctionIdentity { .. } | Expression :: IndexAccess { .. } | Expression :: Operator { .. } | Expression :: Object { .. } | Expression :: True | Expression :: False | Expression :: Undefined | Expression :: Number { .. } | Expression :: String { .. } | Expression :: Variable { .. } => { BlockOrExpression :: Expression ( rec_expr_to_ast_expr ( expr , rec_expr ) ) } Expression :: ArrowFunctionParameters { .. } => unreachable ! ( ) , } }
TODO: consider returning a `Result` here so we can fail gracefully?
TODO : consider returning a ` Result ` here so we can fail gracefully?
expr
&Expression
rec_expr
&RecExpr
expr
&Expression
rec_expr
&RecExpr