From 54394620893f7245c7697a57d724d430d06b57d1 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Oct 2020 15:57:29 +0200 Subject: Added pipeline ast and pipeline evaluation (not working when first command is infinite) --- src/ast.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index 2bb90d9..6c1e51b 100644 --- a/src/ast.c +++ b/src/ast.c @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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); } -- cgit