Allow using constant as size argument to data.fill

This commit is contained in:
mebibytedraco 2024-02-22 13:25:03 -05:00
parent bedf8d54c4
commit 8ccc3c0503

View File

@ -692,6 +692,8 @@ fn parse_data(pair: pest::iterators::Pair<Rule>) -> AstNode {
let ast = parse_operand(pair.into_inner().nth(1).unwrap(), false); let ast = parse_operand(pair.into_inner().nth(1).unwrap(), false);
if let AstNode::Immediate32(word) = ast { if let AstNode::Immediate32(word) = ast {
word word
} else if let AstNode::Constant {name: _, address} = ast {
address
} else { } else {
unreachable!() unreachable!()
} }
@ -1504,4 +1506,4 @@ fn optimize_node(node: AstNode, enabled: &mut bool) -> AstNode {
} else { } else {
node node
} }
} }