19 lines
432 B
Rust
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,
|
|
}
|