diff --git a/src/utils/ast/ast.h b/src/utils/ast/ast.h index 5bfd8df..8e01551 100644 --- a/src/utils/ast/ast.h +++ b/src/utils/ast/ast.h @@ -1,7 +1,7 @@ #ifndef AST_H #define AST_H -#include "lists.h" +#include "../lists/lists.h" enum ast_type { @@ -10,28 +10,30 @@ enum ast_type AST_CMD }; -union ast_node +struct ast_cmd { - struct ast_if; - struct ast_cmd; + struct list *cmd; }; +union ast_node; + struct ast { enum ast_type type; - union ast_node data; + union ast_node *data; }; struct ast_if { - struct ast* condition; - struct ast* then_clause; - struct ast* else_clause; + struct ast *condition; + struct ast *then_clause; + struct ast *else_clause; }; -struct ast_cmd +union ast_node { - struct list* cmd; + struct ast_if *ast_if; + struct ast_cmd *ast_cmd; }; #endif /* ! AST_H */