update: fixed error on pipe+redirection

This commit is contained in:
maix0 2024-10-11 22:20:06 +02:00
parent 1dfb7f7ef7
commit baa9af918f
9 changed files with 34 additions and 37 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/02 18:41:16 by maiboyer #+# #+# */
/* Updated: 2024/10/10 17:25:40 by maiboyer ### ########.fr */
/* Updated: 2024/10/11 21:33:34 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -67,8 +67,6 @@ t_error ts_apply_passes(t_vec_token ts, t_vec_token *out)
if ((g_ts_passes[i].fn)(ts, &next))
return (me_eprintf("failed on %s token pass\n", \
g_ts_passes[i].name), ERROR);
else
me_printf("Applied '%s' pass\n", g_ts_passes[i].name);
ts = next;
i++;
}
@ -94,8 +92,6 @@ t_error ts_dq_apply_passes(t_vec_token ts, t_vec_token *out)
if ((g_ts_dq_passes[i].fn)(ts, &next))
return (me_eprintf(\
"failed on '%s' dq token pass\n", g_ts_dq_passes[i].name), ERROR);
else
me_printf("Applied '%s' dq_pass\n", g_ts_dq_passes[i].name);
ts = next;
i++;
}

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/09 12:44:53 by maiboyer #+# #+# */
/* Updated: 2024/10/10 17:48:57 by maiboyer ### ########.fr */
/* Updated: 2024/10/11 15:12:36 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -34,7 +34,7 @@ static t_error _create_ast_redir(enum e_token ty, t_ast_node *out)
ret = ast_alloc(AST_HEREDOC_REDIRECTION);
ret->data.heredoc_redirection.op = AST_REDIR_HEREDOC;
}
else if (ty == TOK_DRCARRET || ty == TOK_LCARRET || ty == TOK_DRCARRET)
else if (ty == TOK_RCARRET || ty == TOK_LCARRET || ty == TOK_DRCARRET)
ret = ast_alloc(AST_FILE_REDIRECTION);
else
return (ERROR);