Added Math expressions to the Value enum.

recursive
Goren Barak 2023-11-21 09:48:06 -05:00
parent 418955c622
commit d9bb758569
1 changed files with 6 additions and 1 deletions

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");
}
}
}
}