fix: ast circular dep

This commit is contained in:
william.valenduc 2026-01-09 17:21:23 +00:00
parent 3a8ab44300
commit 62e44b8101

View file

@ -1,7 +1,7 @@
#ifndef AST_H
#define AST_H
#include "lists.h"
#include "../lists/lists.h"
enum ast_type
{
@ -10,16 +10,17 @@ 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
@ -29,9 +30,10 @@ struct ast_if
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 */