From a0f697a3059cc5173d60beaf9d3a513a0edfbda1 Mon Sep 17 00:00:00 2001 From: c+1 Date: Thu, 4 May 2023 15:10:59 -0400 Subject: HALK HALJ HALK --- src/tree.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/tree.c b/src/tree.c index 6867949..ab3a962 100644 --- a/src/tree.c +++ b/src/tree.c @@ -1,7 +1,15 @@ #include "include/tree.h" TREE_t* tree_init(int type) { + // give the tree just enough room TREE_t* tree = calloc(1, sizeof(struct TREE_STRUC)); + tree->type = type; + + tree->VAR_DEF_name = NULL; + tree->VAR_DEF_value = NULL; + tree->VAR_name = NULL; + + return tree; } -- cgit v1.2.3