From c08e9c793b138da5b373d6cb66a2eb599ea77397 Mon Sep 17 00:00:00 2001 From: mryouse Date: Thu, 25 May 2023 00:30:03 +0000 Subject: make debug toggle-able --- compiler.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler.d') 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; } -- cgit v1.2.3