From 8ccc3c0503f722314c9c03bfd55c73428dba4da9 Mon Sep 17 00:00:00 2001 From: mebibytedraco <139500397+mebibytedraco@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:25:03 -0500 Subject: [PATCH] Allow using constant as size argument to data.fill --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8e85925..5ac2234 100644 --- a/src/main.rs +++ b/src/main.rs @@ -692,6 +692,8 @@ fn parse_data(pair: pest::iterators::Pair) -> AstNode { let ast = parse_operand(pair.into_inner().nth(1).unwrap(), false); if let AstNode::Immediate32(word) = ast { word + } else if let AstNode::Constant {name: _, address} = ast { + address } else { unreachable!() } @@ -1504,4 +1506,4 @@ fn optimize_node(node: AstNode, enabled: &mut bool) -> AstNode { } else { node } -} \ No newline at end of file +}