aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-16 11:37:22 +0200
committernass1pro <nass1pro@gmail.com>2020-06-16 11:37:22 +0200
commit9b4703d4d841366f018555d3b9d5f9377ae5dab1 (patch)
tree6442c7ca2107b925a572500ad1bb726a28e7c204 /src/parse
parent46c33fbad5e4965d2d56579e0ce6a97f310b3019 (diff)
downloadminishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.tar.gz
minishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.tar.bz2
minishell-9b4703d4d841366f018555d3b9d5f9377ae5dab1.zip
Update lexer/trim
Diffstat (limited to 'src/parse')
-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;
}