chunk: add printing of OP_NOT

This commit is contained in:
Luna 2019-06-02 00:03:54 -03:00
parent c5d704a34f
commit 39e28f01ac
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,8 @@ pub const Chunk = struct {
return try simpleInstruction(stdout, "OP_TRUE", index);
} else if (instruction == OpCode.False) {
return try simpleInstruction(stdout, "OP_FALSE", index);
} else if (instruction == OpCode.Not) {
return try simpleInstruction(stdout, "OP_NOT", index);
} else {
try stdout.print("Unknown opcode: {}\n", instruction);
return index + 1;