diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 15:57:29 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-06 15:57:29 +0200 |
| commit | 54394620893f7245c7697a57d724d430d06b57d1 (patch) | |
| tree | 8e51b671bcb2cdba4306165eaba39cc1f99f1cf4 /src/ast.c | |
| parent | 930bb63605984abeda8c887a6333109c004d3b00 (diff) | |
| download | minishell-54394620893f7245c7697a57d724d430d06b57d1.tar.gz minishell-54394620893f7245c7697a57d724d430d06b57d1.tar.bz2 minishell-54394620893f7245c7697a57d724d430d06b57d1.zip | |
Added pipeline ast and pipeline evaluation (not working when first command is infinite)
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -6,7 +6,7 @@ /* By: charles <charles@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:42 by charles #+# #+# */ -/* Updated: 2020/08/27 20:31:48 by charles ### ########.fr */ +/* Updated: 2020/10/06 09:58:35 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -57,6 +57,11 @@ void ast_destroy(t_ast *ast) ast_destroy(ast->op.right); } else if (ast->tag == AST_PARENT) + { ast_destroy(ast->parent_ast); + tok_lst_destroy(&ast->redirs, free); + } + else if (ast->tag == AST_PIPELINE) + ft_lstdestroy(&ast->pipeline, (void (*)(void*))ast_destroy); free(ast); } |
