fix: ast circular dep
This commit is contained in:
parent
3a8ab44300
commit
62e44b8101
1 changed files with 12 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef AST_H
|
#ifndef AST_H
|
||||||
#define AST_H
|
#define AST_H
|
||||||
|
|
||||||
#include "lists.h"
|
#include "../lists/lists.h"
|
||||||
|
|
||||||
enum ast_type
|
enum ast_type
|
||||||
{
|
{
|
||||||
|
|
@ -10,28 +10,30 @@ enum ast_type
|
||||||
AST_CMD
|
AST_CMD
|
||||||
};
|
};
|
||||||
|
|
||||||
union ast_node
|
struct ast_cmd
|
||||||
{
|
{
|
||||||
struct ast_if;
|
struct list *cmd;
|
||||||
struct ast_cmd;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
union ast_node;
|
||||||
|
|
||||||
struct ast
|
struct ast
|
||||||
{
|
{
|
||||||
enum ast_type type;
|
enum ast_type type;
|
||||||
union ast_node data;
|
union ast_node *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ast_if
|
struct ast_if
|
||||||
{
|
{
|
||||||
struct ast* condition;
|
struct ast *condition;
|
||||||
struct ast* then_clause;
|
struct ast *then_clause;
|
||||||
struct ast* else_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 */
|
#endif /* ! AST_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue