diff --git a/balloon/abstract_syntax_tree.cpp b/balloon/abstract_syntax_tree.cpp index f58acec..8fd2dd6 100644 --- a/balloon/abstract_syntax_tree.cpp +++ b/balloon/abstract_syntax_tree.cpp @@ -428,7 +428,10 @@ bool abstract_syntax_tree::condition_check() return false; } if(type==__null_node) // this is set for "for(;;)" + { + --recursion_depth; return true; + } bool ret=false; var temp=calculation(); if(temp.get_type()==__var_number) @@ -464,6 +467,7 @@ var abstract_syntax_tree::call_identifier() { std::cout<<">>[Runtime-error] line "<