From c86d3e6ed6058781358634df1846cbcfdb04ea59 Mon Sep 17 00:00:00 2001 From: Valk Richard Li <48872266+ValKmjolnir@users.noreply.github.com> Date: Sun, 6 Sep 2020 08:32:02 -0700 Subject: [PATCH] update --- version3.0/nasal_runtime.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/version3.0/nasal_runtime.h b/version3.0/nasal_runtime.h index f6b0fa7..057354b 100644 --- a/version3.0/nasal_runtime.h +++ b/version3.0/nasal_runtime.h @@ -985,6 +985,18 @@ int nasal_runtime::calculation(nasal_ast& node,int local_scope_addr) int calculation_type=node.get_type(); if(calculation_type==ast_number) ret_address=number_generation(node); + else if(calculation_type==ast_identifier) + { + if(local_scope_addr>=0) + ret_address=nasal_vm.gc_get(local_scope_addr).get_closure().get_value_address(node.get_str()); + if(ret_address<0) + ret_address=nasal_vm.gc_get(global_scope_address).get_closure().get_value_address(node.get_str()); + if(ret_address<0) + { + std::cout<<">> [runtime] calculation: cannot find value named \'"<