From a546c1caecc3dcaf6c67fbd72b3e8f09c9210b0b Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Fri, 24 Jan 2020 00:10:32 +0800 Subject: [PATCH] bug fixed --- version2.0/nasal_parse.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/version2.0/nasal_parse.h b/version2.0/nasal_parse.h index 1345b84..a466e3d 100644 --- a/version2.0/nasal_parse.h +++ b/version2.0/nasal_parse.h @@ -321,7 +321,10 @@ void nasal_parse::main_generate() case __func: this->push_token(); root.add_children(calculation()); - need_semi_check=true; + if((root.get_children().back().get_node_type()==__equal) && root.get_children().back().get_children().back().get_node_type()==__function) + need_semi_check=false; + else + need_semi_check=true; break; case __left_curve: this->push_token(); @@ -390,6 +393,10 @@ abstract_syntax_tree nasal_parse::block_generate() case __func: this->push_token(); block_node.add_children(calculation()); + if((block_node.get_children().back().get_node_type()==__equal) && block_node.get_children().back().get_children().back().get_node_type()==__function) + need_semi_check=false; + else + need_semi_check=true; break; case __left_curve: this->push_token();