diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-17 19:01:25 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-17 19:01:25 +0200 |
| commit | ae510a886b202926b4a5502de02a938054844ad4 (patch) | |
| tree | bc8d60be16b32d8bdb6f5a0234305149fc420c2d /src/ast.c | |
| parent | 4a0fc35cbe98d75f64113643768b16c9b29d773f (diff) | |
| download | minishell-ae510a886b202926b4a5502de02a938054844ad4.tar.gz minishell-ae510a886b202926b4a5502de02a938054844ad4.tar.bz2 minishell-ae510a886b202926b4a5502de02a938054844ad4.zip | |
Update line op
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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); } |
