aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-17 19:01:25 +0200
committernass1pro <nass1pro@gmail.com>2020-06-17 19:01:25 +0200
commitae510a886b202926b4a5502de02a938054844ad4 (patch)
treebc8d60be16b32d8bdb6f5a0234305149fc420c2d /src/ast.c
parent4a0fc35cbe98d75f64113643768b16c9b29d773f (diff)
downloadminishell-ae510a886b202926b4a5502de02a938054844ad4.tar.gz
minishell-ae510a886b202926b4a5502de02a938054844ad4.tar.bz2
minishell-ae510a886b202926b4a5502de02a938054844ad4.zip
Update line op
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c14
1 files changed, 7 insertions, 7 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* By: charles <charles@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);
}