This commit is contained in:
Nathan Lebrun
2025-01-31 13:09:35 +01:00
parent 2367f6a42d
commit 304eeb73eb
8 changed files with 94 additions and 17 deletions

View File

@@ -29,14 +29,14 @@ int last_tok_subsh(t_node *lst)
return (0);
}
skip_parentheses(t_node **lst)
void skip_parentheses(t_node **lst)
{
if (!ft_strncmp((*lst)->val, "(", 1))
{
while ((*lst)->next && ft_strncmp((*lst)->next->val, ")", 1))
{
if (!ft_strncmp((*lst)->val, "(", 1))
skip_parentheses(&lst);
skip_parentheses(&(*lst)->next);
*lst = (*lst)->next;
}
}