AST node creation and destruction prototypes.
void free_ast(t_ast *node)
Recursively free an entire AST tree.
static void free_args(char **args)
Free a string array and its entries.
t_ast_data data
cmd, redir or binary data
t_node_type type
To determine which union member to pick.
struct s_ast * left
left child (before pipe)
struct s_ast * right
right child (after pipe)
char ** args
NULL terminated args array.
int heredoc_fd
Heredoc pipe fd (-1 if not used)
char * file
Target filename or delimiter.
struct s_ast * cmd
Command subtree.