diff --git a/src/main.rs b/src/main.rs index 4c71c86..ba03b1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -462,6 +462,7 @@ fn build_ast_from_expression(pair: pest::iterators::Pair) -> AstNode { } fn parse_constant(pairs: pest::iterators::Pairs) -> 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), }; -} \ No newline at end of file +}