diff --git a/src/parser/parser_get_commands.c b/src/parser/parser_get_commands.c index d417835..74c21ff 100644 --- a/src/parser/parser_get_commands.c +++ b/src/parser/parser_get_commands.c @@ -6,7 +6,7 @@ /* By: qmennen +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/11 14:06:02 by qmennen #+# #+# */ -/* Updated: 2025/02/18 20:31:54 by qmennen ### ########.fr */ +/* Updated: 2025/02/18 20:36:01 by qmennen ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,9 +29,9 @@ t_list *parser_get_commands(t_minishell *minishell) command = parser_command_new(ft_strdup(token->value)); command->args = parser_get_arguments(current, minishell); ft_lstadd_back(&command_list, ft_lstnew(command)); - while (current && ((t_token *)current->content)->type == T_WORD) + while (current && ((t_token *)current->content)->type < 3) current = current->next; - if (current && ((t_token *)current->content)->type != T_WORD) + if (current && ((t_token *)current->content)->type >= 3) current = current->next; } // ft_lstiter(command_list, print_commands);