parenthesis + syntax fixes

This commit is contained in:
gazhonsepaskwa
2025-02-15 11:40:14 +01:00
parent 656067ef42
commit 25ce220cf3
7 changed files with 29 additions and 13 deletions

View File

@@ -72,8 +72,6 @@ static t_node *find_token(char *tok, t_node *lst)
t_node *get_top_token(t_node *lst, t_state *state)
{
*state = _SUBSH;
if (!ft_strncmp(lst->val, "(", 1) && last_tok_subsh(lst))
return (lst);
if (find_token("&&", lst))
{
*state = _AND;
@@ -91,6 +89,8 @@ t_node *get_top_token(t_node *lst, t_state *state)
}
else if (!ft_strncmp(lst->val, "(", 1) && last_tok_redir(lst))
return (lst);
else if (!ft_strncmp(lst->val, "(", 1) && last_tok_subsh(lst))
return (lst);
else
{
*state = UNDEF;