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:50:15 by tomoron #+# #+# */
/* Updated: 2024/04/24 15:00:00 by tomoron ### ########.fr */
/* Updated: 2024/04/25 13:15:19 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,12 +20,14 @@ int check_parens_syntax(t_cmd *cmd, t_cmd *last, t_env *env)
if (last && is_cmd_type(last))
{
ft_putstr_fd("minishell: syntax error\n", 2);
g_return_code = 2;
return (0);
}
parsed_cmd = parsing_bonus(cmd->value);
if (!parsed_cmd)
{
ft_putstr_fd("minishell: syntax error\n", 2);
g_return_code = 2;
return (0);
}
tmp = check_cmds_syntax(parsed_cmd, env);
@ -110,6 +112,9 @@ int check_str_syntax(char *cmd)
cmd++;
}
if (in_quote || in_dquote || parenthesis)
{
g_return_code = 2;
ft_putstr_fd("minishell: syntax error\n", 2);
}
return (!(in_quote || in_dquote || parenthesis));
}