diff options
author | Tom Willemse | 2021-07-08 02:24:24 -0700 |
---|---|---|
committer | Tom Willemse | 2021-07-08 02:25:13 -0700 |
commit | 2c007a8f94d65dc40f638b284db7e374a58b632f (patch) | |
tree | 260a1460cdb86c913e785171a85447afc03efddf /clox/src/value.h | |
parent | a779473cede81f4d3b4eed6f6b4e4184d43ffa87 (diff) | |
download | crafting-interpreters-2c007a8f94d65dc40f638b284db7e374a58b632f.tar.gz crafting-interpreters-2c007a8f94d65dc40f638b284db7e374a58b632f.zip |
Chapter 14.1-6
Diffstat (limited to 'clox/src/value.h')
-rw-r--r-- | clox/src/value.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clox/src/value.h b/clox/src/value.h new file mode 100644 index 0000000..86d4b1c --- /dev/null +++ b/clox/src/value.h @@ -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 |