aboutsummaryrefslogtreecommitdiff
path: root/src/include/tree.h
diff options
context:
space:
mode:
authorc+12023-05-30 07:43:00 -0400
committerc+12023-05-30 07:43:00 -0400
commit81406518603f07f65d51c694e56143edc05d7df5 (patch)
treea9e27f348a43d11a6f0df66463f9cb153938251f /src/include/tree.h
parent5e273897bde728e84a7f34d552258ece7e4a4b33 (diff)
AST stuff
Diffstat (limited to 'src/include/tree.h')
-rw-r--r--src/include/tree.h17
1 files changed, 11 insertions, 6 deletions
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);