diff --git a/src/assembler.rs b/src/assembler.rs index 7447bcf..74a3049 100644 --- a/src/assembler.rs +++ b/src/assembler.rs @@ -41,6 +41,11 @@ impl Assembler { self.words } + pub fn join(mut self, mut other: Assembler) -> Self { + self.words.append(&mut other.words); + self + } + pub fn lit(mut self, w: VM_Word) -> Assembler { self.words.push( AssemblyWord::inst(VM_Instruction::Lit) ); self.words.push( AssemblyWord::lit(w) );