Added Math expressions to the Value enum.

This commit is contained in:
Goren Barak 2023-11-21 09:48:06 -05:00
parent 418955c622
commit d9bb758569

View file

@ -74,6 +74,7 @@ pub enum Value<'a> {
Var(VarReference<'a>),
Param(ParamReference),
Number(u64),
Math(Math),
}
impl<'a> Value<'a> {
@ -97,7 +98,11 @@ impl<'a> Value<'a> {
Value::Var(e) => {
return format!("[{}]", e.name.to_string());
}
},
Value::Math(e) => {
return String::from("rax");
}
}
}
}