use toasty_core::stmt::{self, Expr};
pub(super) fn fold_expr_is_null(expr: &mut stmt::ExprIsNull) -> Option<Expr> {
match &mut *expr.expr {
stmt::Expr::Value(value) => Some(value.is_null().into()),
stmt::Expr::Cast(expr_cast) => {
*expr.expr = expr_cast.expr.take();
None
}
_ => None,
}
}