From a7dae7d30b7087bcd9972792a2ee1248e081cfce Mon Sep 17 00:00:00 2001 From: nass1pro Date: Mon, 15 Jun 2020 13:00:24 +0200 Subject: ADD redir_parse draft --- src/parse/cmd_parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/parse/cmd_parse.c (limited to 'src/parse/cmd_parse.c') diff --git a/src/parse/cmd_parse.c b/src/parse/cmd_parse.c old mode 100644 new mode 100755 index 07070a1..562cea3 --- a/src/parse/cmd_parse.c +++ b/src/parse/cmd_parse.c @@ -18,12 +18,13 @@ t_ast *parse_cmd(t_ast *ast, t_ftlst *rest) new = rest->data; if (ast == NULL) { + ast = ast_new(AST_CMD); ast->cmd_argv = ft_lstnew((t_token *)rest->data); } else { - new = ft_lstnew(rest->data); + new = ft_lstnew((t_token *)rest->data); ft_lstpush_back(&ast->cmd_argv, (void *)new); } return (ast); -- cgit