Finish Chapter 14
Implements code chunks, a couple of basic opcodes, constants, and basic execution of those opcodes. Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
19
include/value.h
Normal file
19
include/value.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef clox_value_h
|
||||
#define clox_value_h
|
||||
|
||||
#include "common.h"
|
||||
|
||||
typedef double Value;
|
||||
|
||||
typedef struct {
|
||||
int capacity;
|
||||
int count;
|
||||
Value *values;
|
||||
} ValueArray;
|
||||
|
||||
void initValueArray(ValueArray *array);
|
||||
void writeValueArray(ValueArray *array, Value value);
|
||||
void freeValueArray(ValueArray *array);
|
||||
void printValue(Value value);
|
||||
|
||||
#endif /* clox_value_h */
|
||||
Reference in New Issue
Block a user