From d9bb758569aadc011aa123ac58eeba6d0c267f5c Mon Sep 17 00:00:00 2001 From: Goren Barak Date: Tue, 21 Nov 2023 09:48:06 -0500 Subject: [PATCH] Added Math expressions to the Value enum. --- src/parse/ast.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parse/ast.rs b/src/parse/ast.rs index 49c2e2e..bf20a51 100644 --- a/src/parse/ast.rs +++ b/src/parse/ast.rs @@ -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"); + } } } }