diff options
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3,11 +3,20 @@ #include <stdlib.h> -#define PROGRAM_NODE 0 +enum NODE_TYPE { + PROGRAM_NODE, + TYPE_NODE, + ARGUMENT_NODE +}; + +typedef struct ast_node_data { + void* value; + void* type; +} ast_node_data; typedef struct ast_node { int type; - void* value; + ast_node_data* data; struct ast_node* left; struct ast_node* right; } ast_node; |