aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
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);
}