From 820e75e4caa70be9719c728187a56f225e0bc136 Mon Sep 17 00:00:00 2001 From: c+1 Date: Wed, 25 Oct 2023 13:12:31 -0400 Subject: halk. --- src/include/tree.h | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/include/tree.h') diff --git a/src/include/tree.h b/src/include/tree.h index 88287a4..a240a18 100644 --- a/src/include/tree.h +++ b/src/include/tree.h @@ -3,27 +3,30 @@ #include -typedef struct TREE_STRUC { +typedef enum { + LEAF_TYPE_INT, + LEAF_TYPE_STR, +} leaf_t; + +typedef struct ARG_T_STRUCT { + leaf_t type; + char* id; + struct ARG_T_STRUCT* nxt; +} arg_t; + +typedef struct TREE_T_STRUCT { enum TREE_TYPE { - TREE_TYPE_INT, - TREE_TYPE_STR, TREE_TYPE_DEF, TREE_TYPE_CAL, - TREE_TYPE_COND, } type; union { struct { - int val; - } tree_int_t; - - struct { - char* val; - } tree_str_t; - - struct { + leaf_t type; char* id; - } tree_def_t; + arg_t* arg; + struct TREE_T_STRUCT* val; + } tree_def; } data; } tree_t; -- cgit v1.2.3