diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-06-15 13:47:18 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-06-15 13:47:18 +0200 |
| commit | c64a7a8fca764c1f0fe8e4a8e28526e1de49f707 (patch) | |
| tree | 8ba0a8a2f461369a9049cda33d7c09515f94e836 /src/parse/parse.c | |
| parent | b8623ff168880845c745da62f7e9a840f0541809 (diff) | |
| download | minishell-c64a7a8fca764c1f0fe8e4a8e28526e1de49f707.tar.gz minishell-c64a7a8fca764c1f0fe8e4a8e28526e1de49f707.tar.bz2 minishell-c64a7a8fca764c1f0fe8e4a8e28526e1de49f707.zip | |
Fixing by removing debug code in parser
Diffstat (limited to 'src/parse/parse.c')
| -rwxr-xr-x | src/parse/parse.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/parse/parse.c b/src/parse/parse.c index a0d981f..87478ac 100755 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -13,7 +13,7 @@ t_ret *parse(t_ftlst *input) { t_ret *ret; - /* t_ret *first; */ + t_ret *first; enum e_token_tag tag; int i = 0; @@ -22,7 +22,7 @@ t_ret *parse(t_ftlst *input) ret->rest = input; ret->ast = NULL; ret->unexpected = NULL; - /* first = ret; */ + first = ret; while (ret->rest != NULL) { @@ -49,22 +49,23 @@ t_ret *parse(t_ftlst *input) if (ret->rest != NULL) ret->rest = ret->rest->next; } - 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) - { - if (i == 0) - { - /* printf("redir"); */ - i++; - } - /* printf("%s\n", ((t_token *)ret->ast->redirs->data)->content); */ - ret->ast->redirs = ret->ast->redirs->next; - } + + /* 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) */ + /* { */ + /* if (i == 0) */ + /* { */ + /* printf("redir"); */ + /* i++; */ + /* } */ + /* 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 NULL; + return first; } |
