aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-15 13:00:24 +0200
committernass1pro <nass1pro@gmail.com>2020-06-15 13:00:24 +0200
commita7dae7d30b7087bcd9972792a2ee1248e081cfce (patch)
tree21c567c81a542991eb27eb4056b74df8a8d8cc0e /src/ast.c
parent72ee131562574c4a6cb69800cdd81268b52ace84 (diff)
downloadminishell-a7dae7d30b7087bcd9972792a2ee1248e081cfce.tar.gz
minishell-a7dae7d30b7087bcd9972792a2ee1248e081cfce.tar.bz2
minishell-a7dae7d30b7087bcd9972792a2ee1248e081cfce.zip
ADD redir_parse draft
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ast.c b/src/ast.c
index 98ca4ac..99d1db3 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -30,9 +30,7 @@ t_ast *ast_new(enum e_ast_tag tag)
if ((ast = (t_ast*)malloc(sizeof(t_ast))) == NULL)
return (NULL);
ast->tag = tag;
- ast->in = NULL;
- ast->out = NULL;
- ast->is_append = false;
+ ast->redirs = NULL;
ast->line.left = NULL;
ast->line.right = NULL;
ast->cmd_argv = NULL;
@@ -51,8 +49,7 @@ void ast_destroy(t_ast *ast)
if (ast->tag == AST_CMD)
{
ft_lstdestroy(&ast->cmd_argv, (void (*)(void*))token_destroy);
- ft_lstdestroy(&ast->in, (void (*)(void*))token_destroy);
- ft_lstdestroy(&ast->out, (void (*)(void*))token_destroy);
+ ft_lstdestroy(&ast->redirs, (void (*)(void*))token_destroy);
}
else if (ast->tag == AST_LINE)
{