mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-14 00:08:47 +02:00
「✨」 feat: Did a lot of things, don't know what but it work
This commit is contained in:
@ -6,11 +6,12 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/21 11:59:34 by adjoly #+# #+# */
|
||||
/* Updated: 2024/06/21 12:40:56 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/06/30 16:11:23 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parsing.h"
|
||||
#include "error_msg.h"
|
||||
#include "tokenizer.h"
|
||||
|
||||
size_t count_quote(char *readline, t_quote type)
|
||||
@ -29,20 +30,15 @@ size_t count_quote(char *readline, t_quote type)
|
||||
return (count);
|
||||
}
|
||||
|
||||
void check_quote(char *readline)
|
||||
bool check_quote(char *readline)
|
||||
{
|
||||
size_t count;
|
||||
|
||||
count = count_quote(readline, DOUBLE);
|
||||
if (count % 2)
|
||||
{
|
||||
ft_putendl_fd("double quote error", STDERR_FILENO);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
return (send_error_parsing("double quote not closed"));
|
||||
count = count_quote(readline, SINGLE);
|
||||
if (count % 2)
|
||||
{
|
||||
ft_putendl_fd("single quote error", STDERR_FILENO);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
return (send_error_parsing("single quote not closed"));
|
||||
return (false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user