aboutsummaryrefslogtreecommitdiff
path: root/src/parse/parse.c
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-16 12:37:32 +0200
committernass1pro <nass1pro@gmail.com>2020-06-16 12:37:32 +0200
commit179898160d7a6c3d0c6032c78c8731a23631c2aa (patch)
treef9bde3910d20c146020c5e18b34cffa46123ee57 /src/parse/parse.c
parent0caba7df480e87c4e27e15a498505474bd13c06f (diff)
downloadminishell-179898160d7a6c3d0c6032c78c8731a23631c2aa.tar.gz
minishell-179898160d7a6c3d0c6032c78c8731a23631c2aa.tar.bz2
minishell-179898160d7a6c3d0c6032c78c8731a23631c2aa.zip
Test main.c
Diffstat (limited to 'src/parse/parse.c')
-rwxr-xr-xsrc/parse/parse.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c
index 867325b..36e603a 100755
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -47,17 +47,19 @@ t_ret *parse(t_ftlst *input)
}
}
}
- while(ret->ast->cmd_argv != NULL)
- {
- printf("[%s]\n", ((t_token *)ret->ast->cmd_argv->data)->content);
- ret->ast->cmd_argv = ret->ast->cmd_argv->next;
- }
- while(ret->ast->redirs != NULL)
- {
- printf("[%s]\n", ((t_token *)ret->ast->redirs->data)->content);
- ret->ast->redirs = ret->ast->redirs->next;
- }
- ast_destroy(ret->ast);
- ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy);
+ // printf("===========cmd=============\n");
+ // while(ret->ast->cmd_argv != NULL)
+ // {
+ // printf("[%s]\n", ((t_token *)ret->ast->cmd_argv->data)->content);
+ // ret->ast->cmd_argv = ret->ast->cmd_argv->next;
+ // }
+ // printf("=========redir============\n");
+ // while(ret->ast->redirs != NULL)
+ // {
+ // printf("[%s]\n", ((t_token *)ret->ast->redirs->data)->content);
+ // ret->ast->redirs = ret->ast->redirs->next;
+ // }
+ //ast_destroy(ret->ast);
+ //ft_lstdestroy(&ret->rest, (void (*)(void*))token_destroy);
return first;
}