🔨」 fix: heredoc not fucking up parsing

This commit is contained in:
2024-07-20 17:55:42 +02:00
parent 59cc4d7011
commit 0018fae334
5 changed files with 20 additions and 15 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/31 12:47:13 by adjoly #+# #+# */
/* Updated: 2024/07/13 14:08:31 by adjoly ### ########.fr */
/* Updated: 2024/07/20 17:11:41 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,7 +21,8 @@ t_list *make_lst(t_list *tmp)
cmd_list = malloc(sizeof(t_list));
get_list2(&cmd_list);
cmd_list->next = NULL;
cmd_list->content = get_redir_fd(tmp->content);
cmd_list->content = get_redir_fd(tmp->content, \
((t_token *)tmp->content)->redirection);
return (cmd_list);
}
@ -40,7 +41,8 @@ t_list *get_cmd_list(t_list *list)
tmp = tmp->next;
while (tmp)
{
ft_lstadd_back(&cmd_list, ft_lstnew(get_redir_fd(tmp->content)));
ft_lstadd_back(&cmd_list, ft_lstnew(get_redir_fd(tmp->content, \
((t_token *)tmp->content)->redirection)));
if (!ft_lstlast(cmd_list)->content)
{
ft_lstclear(&cmd_list, &free_cmd);