Evaluate binding declarations

This commit is contained in:
greg 2018-02-26 18:18:42 -08:00
parent d69970a806
commit e0cc12276c

View File

@ -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")) _ => return Err(format!("Declaration evaluation not yet implemented"))
} }
Ok(()) Ok(())