erase error
This commit is contained in:
parent
ecc058dd11
commit
d251474db9
3 changed files with 11 additions and 12 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/15 20:49:15 by ariard #+# #+# */
|
/* Created: 2017/02/15 20:49:15 by ariard #+# #+# */
|
||||||
/* Updated: 2017/02/23 18:04:26 by ariard ### ########.fr */
|
/* Updated: 2017/02/24 14:51:47 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/19 18:12:52 by ariard #+# #+# */
|
/* Created: 2017/02/19 18:12:52 by ariard #+# #+# */
|
||||||
/* Updated: 2017/02/20 18:18:56 by ariard ### ########.fr */
|
/* Updated: 2017/02/24 14:51:05 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -22,16 +22,15 @@ int iscondition(t_btree **ast, t_list **lst)
|
||||||
if (*ast)
|
if (*ast)
|
||||||
{
|
{
|
||||||
node = (*ast)->item;
|
node = (*ast)->item;
|
||||||
if ((node->type == TK_IF || iscondition(&(*ast)->right, lst))
|
if ((node->type == TK_CASE || node->type == TK_PAREN_OPEN)
|
||||||
&& (token->type == TK_ELIF || token->type == TK_ELSE)
|
&& node->pattern = 0 && token->type == TK_WORD)
|
||||||
&& node->nest == 0)
|
|
||||||
return (2);
|
return (2);
|
||||||
if ((node->type == TK_IF || node->type == TK_ELIF || node->type == TK_ELSE)
|
if (node->type == TK_CASE)
|
||||||
&& node->full == 0)
|
return (3);
|
||||||
return (1);
|
if (node->type == TK_PAREN_OPEN && nest == 0)
|
||||||
if ((node->type == TK_NEWLINE || node->type == TK_SEMI
|
return (3);
|
||||||
|| node->type == TK_AMP) && iscondition(&(*ast)->right, lst) == 1)
|
if (node->type == TK_PAREN_OPEN && nest > 0)
|
||||||
return (1);
|
return (0);
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/02/17 22:17:14 by ariard #+# #+# */
|
/* Created: 2017/02/17 22:17:14 by ariard #+# #+# */
|
||||||
/* Updated: 2017/02/20 19:03:04 by ariard ### ########.fr */
|
/* Updated: 2017/02/24 14:41:20 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue