+ // Conditional
+ case NODETYPE_IF:
+ ret = AST_ExecuteNode(Block, Node->If.Condition);
+ if( Object_IsTrue(ret) ) {
+ AST_ExecuteNode(Block, Node->If.True);
+ }
+ else {
+ AST_ExecuteNode(Block, Node->If.False);
+ }
+ Object_Dereference(ret);
+ break;
+
+ // Loop
+ case NODETYPE_LOOP:
+ ret = AST_ExecuteNode(Block, Node->For.Init);
+ if( Node->For.bCheckAfter ) {
+ do {
+ Object_Dereference(ret);
+ ret = AST_ExecuteNode(Block, Node->For.Code);
+ Object_Dereference(ret);
+ ret = AST_ExecuteNode(Block, Node->For.Condition);
+ } while( Object_IsTrue(ret) );
+ }
+ else {
+ Object_Dereference(ret);
+ ret = AST_ExecuteNode(Block, Node->For.Condition);
+ while( Object_IsTrue(ret) ) {
+ Object_Dereference(ret);
+ ret = AST_ExecuteNode(Block, Node->For.Code);
+ Object_Dereference(ret);
+ ret = AST_ExecuteNode(Block, Node->For.Condition);
+ }
+ Object_Dereference(ret);
+ }
+ break;
+
+ // Return