diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-12-06 13:34:33 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-12-06 13:34:33 +0100 |
commit | f17b517e56503600355de910ce576efab56b1287 (patch) | |
tree | 48b3a03d0383bc1347d7a85b4f6bdc55f4b55e6b /ast.h | |
parent | 5b840fd4c56d835b067e4cf9a3e4af4442717d20 (diff) |
Tried to create an AST
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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 |