use std::rc::Rc; #[derive(Debug /*/*, debug2::Debug*/*/, PartialEq)] crate enum Tree { Leaf(Literal), Define(String, Box), Set(String, Box), If(Box<[Tree; 3]>), // Its easier to box the lambdas in the parser than the vm, as // here we see all of them exactly once Func(Rc), Branch(Vec), } #[derive(Debug /*/*, debug2::Debug*/*/, PartialEq)] crate struct Func { crate args: Vec, crate body: Vec, } #[derive(Debug /*/*, debug2::Debug*/*/, PartialEq)] crate enum Literal { Sym(String), Num(f64), Bool(bool), }