Files
ft_minipowershell/src/parsing/check_error/run_checks.c
2024-07-18 17:18:30 +02:00

31 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* run_checks.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/18 13:30:27 by adjoly #+# #+# */
/* Updated: 2024/07/18 17:13:11 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "parsing.h"
#include "error_msg.h"
#include <stdio.h>
#include <readline/history.h>
bool run_checks(char *rl)
{
if (!*rl)
return (true);
add_history(rl);
if (check_syntax(rl))
return (true);
if (check_quote(rl))
return (true);
if (check_pipe(rl))
return (true);
return (false);
}