This commit is contained in:
gazhonsepaskwa
2025-02-14 10:13:23 +01:00
parent b43ff8fc26
commit 93b69e815f
7 changed files with 170 additions and 107 deletions

View File

@@ -31,3 +31,23 @@ int unexpected_token(t_node *node)
return (1);
return (0);
}
int is_redir(t_node *cpy)
{
if (cpy->pressision == RED_L
|| cpy->pressision == RED_R
|| cpy->pressision == HEREDOC
|| cpy->pressision == D_RED_R)
return (1);
return (0);
}
int is_basic_word(t_node *cpy)
{
if (is_aop_operator(cpy)
|| is_redir(cpy)
|| !ft_strncmp(cpy->val, ")", 1)
|| !ft_strncmp(cpy->val, "(", 1))
return (0);
return (1);
}