wisp/src/value.rs
2022-07-21 01:08:40 +02:00

19 lines
432 B
Rust

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