minishell/src/parser/wordsplit/rule_utils.c

29 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rule_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/20 12:01:57 by khais #+# #+# */
/* Updated: 2025/02/20 12:27:45 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "rule_utils.h"
/*
** return true if we are in an unquoted operator state
*/
bool unquoted_operator(t_token_build *builder)
{
return (unquoted(builder) && builder->currently_in_operator);
}
/*
** return true if we are in an unquoted state
*/
bool unquoted(t_token_build *builder)
{
return (builder->quote == '\0');
}