thouth it was pushed
This commit is contained in:
@@ -21,7 +21,11 @@ static int parenthesis_error(t_node *cpy)
|
|||||||
if (!ft_strncmp(cpy->val, ")", 1) && cpy->next
|
if (!ft_strncmp(cpy->val, ")", 1) && cpy->next
|
||||||
&& !ft_strncmp(cpy->next->val, "(", 1))
|
&& !ft_strncmp(cpy->next->val, "(", 1))
|
||||||
return (syntax_err_mess(cpy->next->val, 0));
|
return (syntax_err_mess(cpy->next->val, 0));
|
||||||
if (is_aop_operator(cpy) && !ft_strncmp(cpy->next->val, ")", 1))
|
if (is_aop_operator(cpy) && cpy->next
|
||||||
|
&& !ft_strncmp(cpy->next->val, ")", 1))
|
||||||
|
return (syntax_err_mess(cpy->next->val, 0));
|
||||||
|
if (cpy->next && !ft_strncmp(cpy->next->val, "(", 1)
|
||||||
|
&& !is_aop_operator(cpy))
|
||||||
return (syntax_err_mess(cpy->next->val, 0));
|
return (syntax_err_mess(cpy->next->val, 0));
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ int check_unclosed(char *c, t_node *node)
|
|||||||
count = 0;
|
count = 0;
|
||||||
while (cpy)
|
while (cpy)
|
||||||
{
|
{
|
||||||
if (!ft_strncmp(&c[0], cpy->val, 1))
|
if (!ft_strncmp(&c[0], cpy->val, 1) && count >= 0)
|
||||||
count++;
|
count++;
|
||||||
if (!ft_strncmp(&c[1], cpy->val, 1) && count != 0)
|
if (!ft_strncmp(&c[1], cpy->val, 1))
|
||||||
count--;
|
count--;
|
||||||
cpy = cpy->next;
|
cpy = cpy->next;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user