#ifndef AST_H #define AST_H #include "../lists/lists.h" enum ast_type { AST_END, AST_IF, AST_CMD }; struct ast_cmd { struct list *cmd; }; struct ast_if { struct ast *condition; struct ast *then_clause; struct ast *else_clause; }; struct ast { enum ast_type type; /** * Data associated with this AST node. It can be one of the following: * - NULL (AST_END) * - struct ast_if* (AST_IF) * - struct ast_cmd* (AST_CMD) */ void *data; }; #endif /* ! AST_H */