diff --git a/42sh/libft b/42sh/libft index 934ff3af..b209bb1f 160000 --- a/42sh/libft +++ b/42sh/libft @@ -1 +1 @@ -Subproject commit 934ff3af934eaecf04575a0a7e7e1b76628ae53b +Subproject commit b209bb1fb718a68256253d5ab5ff69a46a90d5d6 diff --git a/42sh/src/parser/add_bang.c b/42sh/src/parser/add_bang.c index 5ec6d321..2a81934b 100644 --- a/42sh/src/parser/add_bang.c +++ b/42sh/src/parser/add_bang.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/10 14:57:45 by ariard #+# #+# */ -/* Updated: 2017/03/11 16:23:26 by ariard ### ########.fr */ +/* Updated: 2017/03/11 16:29:08 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/parser/add_number.c b/42sh/src/parser/add_number.c index 17f55286..34b096b3 100644 --- a/42sh/src/parser/add_number.c +++ b/42sh/src/parser/add_number.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/05 17:28:31 by ariard #+# #+# */ -/* Updated: 2017/03/11 15:46:06 by ariard ### ########.fr */ +/* Updated: 2017/03/11 16:45:07 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -43,6 +43,7 @@ int add_ionumber(t_btree **ast, t_list **lst) gen_node(ast); token = (*lst)->content; node = (*ast)->item; + node->cache = node->type; node->type = token->type; redir.n = ft_atoi(token->data); ft_lsteadd(&node->data.cmd.redir, ft_lstnew(&redir, sizeof(redir))); diff --git a/42sh/src/parser/add_redir.c b/42sh/src/parser/add_redir.c index bf9107c6..6db74aab 100644 --- a/42sh/src/parser/add_redir.c +++ b/42sh/src/parser/add_redir.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/02/17 16:39:05 by ariard #+# #+# */ -/* Updated: 2017/03/11 15:52:20 by ariard ### ########.fr */ +/* Updated: 2017/03/11 16:45:29 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -125,7 +125,8 @@ int add_redir_type(t_btree **ast, t_list **lst) } else add_redir_type_number(ast, lst); - node->cache = node->type; + if (!node->cache) + node->cache = node->type; node->type = REDIR; return (0); } diff --git a/42sh/src/parser/ft_parse.c b/42sh/src/parser/ft_parse.c index c7c1b67c..e305421c 100644 --- a/42sh/src/parser/ft_parse.c +++ b/42sh/src/parser/ft_parse.c @@ -6,7 +6,7 @@ /* By: ariard +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/11 16:17:38 by ariard #+# #+# */ -/* Updated: 2017/03/11 16:18:35 by ariard ### ########.fr */ +/* Updated: 2017/03/11 16:32:15 by ariard ### ########.fr */ /* */ /* ************************************************************************** */ @@ -61,7 +61,7 @@ int ft_parse(t_btree **ast, t_list **token, t_parser *parser) else ft_lst_delif(token, (*token)->content, &ft_addrcmp, &token_free); } - if (parser->state == SUCCESS) - DG("sucessful parsing"); +// if (parser->state == SUCCESS) +// DG("sucessful parsing"); return (0); } diff --git a/42sh/testmake b/42sh/testmake deleted file mode 100644 index b8ed3f2a..00000000 --- a/42sh/testmake +++ /dev/null @@ -1,65 +0,0 @@ - shell_init.c 28 interactive shell settings - token_print.c 29 13:[ls] - token_print.c 29 13:[if] - token_print.c 29 13:[ls] - token_print.c 29 13:[if ls -] - token_print.c 29 13:[if ls -then pwd -] - token_print.c 29 13:[if ls -then pwd -Elif ls -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -then pwd -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -then pwd -fi -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -then pwd -fi -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -then pwd -fi - -] - token_print.c 29 13:[if ls -then pwd -Elif ls -Then pwd -Elif ls -then pwd -fi - -]