wisp/src/value.rs

17 lines
369 B
Rust
Raw Normal View History

2022-07-20 17:56:00 -05:00
use crate::list::List;
use ordered_float::OrderedFloat;
/// A Wisp value
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub enum Value {
List(Box<List>),
Vector(Vec<Self>),
Symbol(String),
Keyword(String),
Function { args: Vec<Value>, body: Box<Value> },
Bool(bool),
Number(OrderedFloat<f64>),
String(String),
Nil,
}