chunk: add printing of OP_NOT

This commit is contained in:
Luna 2019-06-02 00:03:54 -03:00
parent c5d704a34f
commit 39e28f01ac

View file

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