From ae510a886b202926b4a5502de02a938054844ad4 Mon Sep 17 00:00:00 2001 From: nass1pro Date: Wed, 17 Jun 2020 19:01:25 +0200 Subject: Update line op --- src/ast.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index 1a5f7eb..8a551ef 100644 --- a/src/ast.c +++ b/src/ast.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* ast.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: charles +#+ +:+ +#+ */ +/* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 17:05:42 by charles #+# #+# */ -/* Updated: 2020/06/15 13:01:20 by charles ### ########.fr */ +/* Updated: 2020/06/17 15:48:56 by nahaddac ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,8 +31,8 @@ t_ast *ast_new(enum e_ast_tag tag) return (NULL); ast->tag = tag; ast->redirs = NULL; - ast->line.left = NULL; - ast->line.right = NULL; + ast->op.left = NULL; + ast->op.right = NULL; ast->cmd_argv = NULL; return (ast); } @@ -52,10 +52,10 @@ void ast_destroy(t_ast *ast) ft_lstdestroy(&ast->cmd_argv, (void (*)(void*))token_destroy); ft_lstdestroy(&ast->redirs, (void (*)(void*))token_destroy); } - else if (ast->tag == AST_LINE) + else if (ast->tag == AST_OP) { - ast_destroy(ast->line.left); - ast_destroy(ast->line.right); + ast_destroy(ast->op.left); + ast_destroy(ast->op.right); } free(ast); } -- cgit