summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/ast.h b/ast.h
index 3b59d2b..7b2a35e 100644
--- a/ast.h
+++ b/ast.h
@@ -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;