blob: c6667a698ec9a5fc470c384f00e33eed9fc9e92c (
plain) (
tree)
|
|
#[derive(Clone, Debug, PartialEq)]
pub enum Value {
Nil,
Bool(bool),
Number(f64),
String(String),
}
impl Value {
pub fn is_falsey(&self) -> bool {
match self {
Value::Nil => true,
Value::Bool(false) => true,
_ => false,
}
}
}
|