aboutsummaryrefslogtreecommitdiff
path: root/src/parse/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/parse.c')
-rwxr-xr-xsrc/parse/parse.c24
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;
}