aboutsummaryrefslogtreecommitdiff
path: root/compiler.d
diff options
context:
space:
mode:
authormryouse2023-05-25 00:30:03 +0000
committermryouse2023-05-25 00:30:03 +0000
commitc08e9c793b138da5b373d6cb66a2eb599ea77397 (patch)
tree1399d36653163831c44212a3f22743c1ad840e88 /compiler.d
parentdf34325463c28f11eb2ce46f83da0c29bafe1a5e (diff)
make debug toggle-able
Diffstat (limited to 'compiler.d')
-rw-r--r--compiler.d4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler.d b/compiler.d
index 119414c..3b684d4 100644
--- a/compiler.d
+++ b/compiler.d
@@ -716,7 +716,9 @@ class Compiler {
Function finish() {
this.func.chunk.writeOp(OpCode.OP_RETURN, current.line);
- disassembleChunk(this.func.chunk, to!string(func));
+ if (DEBUG) {
+ disassembleChunk(this.func.chunk, to!string(func));
+ }
return this.func;
}