about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/bytecode/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/compiler')
-rw-r--r--users/tazjin/rlox/src/bytecode/compiler/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/bytecode/compiler/mod.rs b/users/tazjin/rlox/src/bytecode/compiler/mod.rs
index 58a5c1b98a02..547c1ab18fd7 100644
--- a/users/tazjin/rlox/src/bytecode/compiler/mod.rs
+++ b/users/tazjin/rlox/src/bytecode/compiler/mod.rs
@@ -219,6 +219,10 @@ impl<T: Iterator<Item = Token>> Compiler<T> {
 
     fn end_compiler(&mut self) -> LoxResult<()> {
         self.emit_op(OpCode::OpReturn);
+
+        #[cfg(feature = "disassemble")]
+        chunk::disassemble_chunk(&self.chunk);
+
         Ok(())
     }