Compare commits

...

1 Commits

Author SHA1 Message Date
mebibytedraco
3f885724fd Allow using constant as size argument to data.fill 2024-02-22 20:20:19 +01:00

View File

@ -695,6 +695,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!()
} }