From 45559eef3041dae6ebbf30fdb687457cd47604bb Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Wed, 20 Nov 2019 23:46:17 +0800 Subject: [PATCH] Fixed a bug. --- balloon/abstract_syntax_tree.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 "<