Skip to content
Snippets Groups Projects
Commit 241381d2 authored by marruiz's avatar marruiz :space_invader:
Browse files

while e if-else

parent c8f0597f
No related branches found
No related tags found
No related merge requests found
......@@ -228,17 +228,20 @@ static void proc(ast_t *root)
break;
case IF:
if (right(root) == NULL)
if(expr(left(root)))
{
// TODO
evaluate(right(root));
}
else
{
if(left(root))
break;
case ELSE:
if(!(expr(left(root))))
{
right(root);
}
evaluate(right(root));
}
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment