aboutsummaryrefslogtreecommitdiffstats
path: root/clox/src/debug.c
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-07-29 23:56:42 -0700
committerGravatar Tom Willemse2021-07-29 23:56:42 -0700
commit9b60cf334cdb030759c54f700d5c122338c5b3a8 (patch)
treebddf5954a6519de2ccfa71b6d665ae64176000e7 /clox/src/debug.c
parent276debcb35a93fee953116694712b2d609c61c32 (diff)
downloadcrafting-interpreters-9b60cf334cdb030759c54f700d5c122338c5b3a8.tar.gz
crafting-interpreters-9b60cf334cdb030759c54f700d5c122338c5b3a8.zip
Chapter 15.3.1
Diffstat (limited to 'clox/src/debug.c')
-rw-r--r--clox/src/debug.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clox/src/debug.c b/clox/src/debug.c
index 91fe139..570bde9 100644
--- a/clox/src/debug.c
+++ b/clox/src/debug.c
@@ -36,6 +36,14 @@ int disassembleInstruction(Chunk *chunk, int offset) {
switch (instruction) {
case OP_CONSTANT:
return constantInstruction("OP_CONSTANT", chunk, offset);
+ case OP_ADD:
+ return simpleInstruction("OP_ADD", offset);
+ case OP_SUBTRACT:
+ return simpleInstruction("OP_SUBTRACT", offset);
+ case OP_MULTIPLY:
+ return simpleInstruction("OP_MULTIPLY", offset);
+ case OP_DIVIDE:
+ return simpleInstruction("OP_DIVIDE", offset);
case OP_NEGATE:
return simpleInstruction("OP_NEGATE", offset);
case OP_RETURN: