From 844cef36c70ad2dbc547b0e58a81017d8fae578a Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 4 Dec 2017 03:26:38 -0800 Subject: [PATCH] Fix print bug --- src/rukka_lang/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rukka_lang/mod.rs b/src/rukka_lang/mod.rs index 4d4a766..6f45b67 100644 --- a/src/rukka_lang/mod.rs +++ b/src/rukka_lang/mod.rs @@ -53,10 +53,10 @@ impl EvaluatorState { SymbolAtom(sym) => unimplemented!(), expr @ StringAtom(_) => expr, expr @ NumberAtom(_) => expr, - Cons(ref car, ref cdr) => { - match **car { + Cons(car, cdr) => { + match *car { SymbolAtom(ref sym) => match &sym[..] { - "quote" => unimplemented!(), + "quote" => *cdr, "eq?" => unimplemented!(), "cons" => unimplemented!(), "car" => unimplemented!(), @@ -111,7 +111,7 @@ impl Sexp { &SymbolAtom(ref sym) => format!("{}", sym), &StringAtom(ref s) => format!("\"{}\"", s), &NumberAtom(ref n) => format!("{}", n), - &Cons(ref car, ref cdr) => format!("({} . {}", car.print(), cdr.print()), + &Cons(ref car, ref cdr) => format!("({} . {})", car.print(), cdr.print()), &Nil => format!("()"), } }