From e0cc12276c995bbb6cd5da542256e327b62bb865 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(())