diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-16 11:37:22 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-16 11:37:22 +0200 |
| commit | 9b4703d4d841366f018555d3b9d5f9377ae5dab1 (patch) | |
| tree | 6442c7ca2107b925a572500ad1bb726a28e7c204 /src/parse/parse.c | |
| parent | 46c33fbad5e4965d2d56579e0ce6a97f310b3019 (diff) | |
| download | minishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.tar.gz minishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.tar.bz2 minishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.zip | |
Update lexer/trim
Diffstat (limited to 'src/parse/parse.c')
| -rwxr-xr-x | src/parse/parse.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c index 1129696..867325b 100755 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -47,17 +47,17 @@ 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); + 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); return first; } |
