summaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2022-12-06 13:34:33 +0100
committerDaniel Weipert <code@drogueronin.de>2022-12-06 13:34:33 +0100
commitf17b517e56503600355de910ce576efab56b1287 (patch)
tree48b3a03d0383bc1347d7a85b4f6bdc55f4b55e6b /ast.h
parent5b840fd4c56d835b067e4cf9a3e4af4442717d20 (diff)
Tried to create an AST
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ast.h b/ast.h
new file mode 100644
index 0000000..3b59d2b
--- /dev/null
+++ b/ast.h
@@ -0,0 +1,17 @@
+#ifndef AST_H
+#define AST_H
+
+#include <stdlib.h>
+
+#define PROGRAM_NODE 0
+
+typedef struct ast_node {
+ int type;
+ void* value;
+ struct ast_node* left;
+ struct ast_node* right;
+} ast_node;
+
+ast_node* create_program_node(ast_node* previous_node, ast_node* current_node);
+
+#endif // AST_H