From 1064d9993af1aeceaff4de524fb3ffcc9f8f1c9f Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 26 Feb 2018 18:18:42 -0800 Subject: [PATCH] Evaluate binding declarations --- src/schala_lang/eval.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/schala_lang/eval.rs b/src/schala_lang/eval.rs index 459902d..56b3c82 100644 --- a/src/schala_lang/eval.rs +++ b/src/schala_lang/eval.rs @@ -104,6 +104,10 @@ impl<'a> State<'a> { }; } }, + Binding { name, constant, expr } => { + let val = self.eval_expr(expr)?; + self.values.insert(name.clone(), ValueEntry::Binding { val }); + }, _ => return Err(format!("Declaration evaluation not yet implemented")) } Ok(())