From 81406518603f07f65d51c694e56143edc05d7df5 Mon Sep 17 00:00:00 2001 From: c+1 Date: Tue, 30 May 2023 07:43:00 -0400 Subject: AST stuff --- src/include/tree.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/include/tree.h') diff --git a/src/include/tree.h b/src/include/tree.h index cf02ee9..284a823 100644 --- a/src/include/tree.h +++ b/src/include/tree.h @@ -10,6 +10,7 @@ typedef struct PRIM_STRUC { enum { STR, INT, + UNKWN, //ARR, //FLOAT, //STRUCT, @@ -18,14 +19,18 @@ typedef struct PRIM_STRUC { union prim_union { struct str_struc { - unsigned int len; + unsigned int* len; char* val; - }; + } prim_str; struct int_struc { - int val; - }; - } with_value; + int* val; + } prim_int; + + struct unkwn_struc { + void* val; + } prim_unkwn; + } val; } prim_t; typedef struct TREE_STRUC { @@ -58,7 +63,7 @@ typedef struct TREE_STRUC { prim_t** args; } call; - } of_type; + } oftype; } tree_t; prim_t* prim_init(int type); -- cgit v1.2.3