glhf pour les conflits

This commit is contained in:
2024-04-25 13:50:19 +02:00
parent 7f85951e43
commit fe095d4b1f
10 changed files with 31 additions and 21 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/24 14:54:53 by tomoron #+# #+# */
/* Updated: 2024/04/24 18:57:48 by marde-vr ### ########.fr */
/* Updated: 2024/04/25 13:15:00 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -17,6 +17,7 @@ void print_syntax_error_bonus(t_cmd *cmd)
if (cmd->cmd_type == CMD || cmd->cmd_type == PAREN)
return ;
ft_printf_fd(2, "minishell : syntax error near unexpected token `");
g_return_code = 2;
if (cmd->cmd_type == AND)
ft_printf_fd(2, "&&");
if (cmd->cmd_type == OR)
@ -34,6 +35,7 @@ int check_tokens_syntax(t_cmd *cmd, t_cmd *last, t_env *env)
if (last && is_cmd_type(last))
{
g_return_code = 2;
ft_putstr_fd("minishell : syntax error\n", 2);
return (0);
}