diff options
| author | nass1pro <nass1pro@gmail.com> | 2020-06-16 14:40:38 +0200 |
|---|---|---|
| committer | nass1pro <nass1pro@gmail.com> | 2020-06-16 14:40:38 +0200 |
| commit | 0eb7a660c0f6eef4ae163b91791908b670dc1d5a (patch) | |
| tree | e9e4bac68710c851f702cb02acc91c9760a436de /src/main.c | |
| parent | 0fa76e9e49a70ab9acb128845b3b0b09607133a8 (diff) | |
| download | minishell-0eb7a660c0f6eef4ae163b91791908b670dc1d5a.tar.gz minishell-0eb7a660c0f6eef4ae163b91791908b670dc1d5a.tar.bz2 minishell-0eb7a660c0f6eef4ae163b91791908b670dc1d5a.zip | |
main for testing
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -43,30 +43,18 @@ int main(int argc, char **argv, char **envp) //printf("%s\n", argv[2]); t_ftlst *lex_out = lexer(ft_strdup(argv[2])); - ft_lstiter(lex_out, token_debug); - - t_ret *ret = parse(lex_out); - - 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; - } + //ft_lstiter(lex_out, token_debug); + + t_ret *parser_out = parse(lex_out); + /* printf("%p\n", parser_out->ast->cmd_argv); */ /* printf("%p\n", parser_out->ast->redirs); */ /* ft_lstiter(parser_out->ast->cmd_argv, token_debug); */ /* ft_lstiter(parser_out->ast->redirs, token_debug); */ - //int eval_out = eval_cmd(env, path, parser_out->ast); - //(void)eval_out; + int eval_out = eval_cmd(env, path, parser_out->ast); + (void)eval_out; } ft_htdestroy(path, free); |
