Skip to content

Commit 8c0aee2

Browse files
authored
Update chunk.h
1 parent f7e1ee4 commit 8c0aee2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

chunk.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@
77

88
#define MAX_CONSTANTS 65536
99

10+
typedef enum {
11+
OP_CONSTANT,
12+
OP_NIL,
13+
OP_TRUE,
14+
OP_FALSE,
15+
OP_EQUAL,
16+
OP_GREATER,
17+
OP_LESS,
18+
OP_ADD,
19+
OP_SUBTRACT,
20+
OP_MULTIPLY,
21+
OP_DIVIDE,
22+
OP_NOT,
23+
OP_NEGATE,
24+
OP_PRINT,
25+
OP_RETURN,
26+
} OpCode;
27+
1028
typedef struct {
1129
uint8_t* code;
1230
int* lines;

0 commit comments

Comments
 (0)