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 \'"<