pub fn try_get_bool_constant(expr: &ExprImpl) -> Option<bool>
Expand description
Try to get bool constant from a ExprImpl
.
If expr
is not a ExprImpl::Literal
, or the Literal is not a boolean, this function will
return None. Otherwise it will return the boolean value.