hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-19 16:20:14 +0200
committerhachem <im@hachem.wtf>2026-09-19 16:20:14 +0200
commitcd2a86435e5e413630e0ab0caa48d900e49ea275 (patch)
tree559a1bfc52a853b61fe07e0b7aa17eca977f5fd2 /eval.h
parent0a9605b6b13f2e066a69662f5802b397f8b89424 (diff)
feat: tuples baby
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index eb3fe1d..c2365cc 100644
--- a/eval.h
+++ b/eval.h
@@ -7,6 +7,9 @@
#define VARIABLES_MAX 64
+// the longest thing a single type can say when emitted
+#define TEXT_LENGTH_MAX 255
+
enum TypeKind
{
KIND_VOID,
@@ -16,13 +19,16 @@ enum TypeKind
KIND_ARRAY,
KIND_CHAR,
KIND_CHAR_CONSTANT,
+ KIND_TUPLE,
KIND_VALUE
};
+// a tuple keeps what it will say, already said, so nothing inside it can go out of scope
struct Type
{
enum TypeKind kind;
int64_t number;
+ char text[TEXT_LENGTH_MAX + 1];
};
struct Variable