diff --git a/kv/src/ast.rs b/kv/src/ast.rs index 32d1d53..9101079 100644 --- a/kv/src/ast.rs +++ b/kv/src/ast.rs @@ -111,9 +111,9 @@ impl fmt::Display for Form { pub struct Cursor { f: Rc
, c: Cont } pub enum Cont { ID, - Eval { e: Rc, nc: Box }, - Call { p: Rc, e: Rc, nc: Box }, - //MidPrim { f: fn(Rc, Rc, Cont) -> Cursor, cd: Rc, nc: Box }, + Eval { e: Rc, nc: Box }, + Call { p: Rc, e: Rc, nc: Box }, + PramEval { to_eval: u32, collected: Vec>, f: fn(Rc, Rc, Cont) -> Cursor, nc: Box }, } pub fn eval(e: Rc, f: Rc) -> Rc { @@ -162,7 +162,13 @@ pub fn eval(e: Rc, f: Rc) -> Rc { }, _ => panic!("Tried to call not a Prim/DeriComb {:?}", f), } - } + }, + Cont::PramEval { to_eval, collected, f, nc } => { + // tricky bit - if to_eval > 0 && collected.size == 0, then we haven't started yet + // and we should push an eval on the thingy + // otherwise, we're collecting, and need to push a new one + panic!("Wait this doesn't quite work we need to pass around the remaining params to eval too"); + }, } } }