fox32asm: Ensure consts are always Immediate32
This commit is contained in:
parent
9fb445f688
commit
74b080994a
|
@ -462,6 +462,7 @@ fn build_ast_from_expression(pair: pest::iterators::Pair<Rule>) -> AstNode {
|
|||
}
|
||||
|
||||
fn parse_constant(pairs: pest::iterators::Pairs<Rule>) -> AstNode {
|
||||
*CURRENT_SIZE.lock().unwrap() = Size::Word;
|
||||
let mut pairs = pairs;
|
||||
let constant_name = pairs.next().unwrap().into_inner().next().unwrap().as_str();
|
||||
let operand_pair = pairs.next().unwrap();
|
||||
|
@ -1125,4 +1126,4 @@ fn node_to_immediate_values(node: &AstNode, instruction: &AssembledInstruction)
|
|||
|
||||
_ => panic!("Attempting to parse a non-instruction AST node as an instruction: {:#?}", node),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user