aboutsummaryrefslogtreecommitdiffstats
path: root/clox/src/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'clox/src/value.h')
-rw-r--r--clox/src/value.h19
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