equal
deleted
inserted
replaced
132 symbol_c *param_value, *param_name; |
132 symbol_c *param_value, *param_name; |
133 function_call_param_iterator_c fcp_iterator(fcall); |
133 function_call_param_iterator_c fcp_iterator(fcall); |
134 bool function_invocation_error = false; |
134 bool function_invocation_error = false; |
135 const char *POU_str = NULL; |
135 const char *POU_str = NULL; |
136 |
136 |
137 debug_c::print("print_datatypes_error_c::handle_function_invocation() CALLED!\n"); |
|
138 debug_c::print(fcall); |
|
139 |
|
140 |
|
141 if (generic_function_call_t::POU_FB == fcall_data.POU_type) POU_str = "FB"; |
137 if (generic_function_call_t::POU_FB == fcall_data.POU_type) POU_str = "FB"; |
142 if (generic_function_call_t::POU_function == fcall_data.POU_type) POU_str = "function"; |
138 if (generic_function_call_t::POU_function == fcall_data.POU_type) POU_str = "function"; |
143 if (NULL == POU_str) ERROR; |
139 if (NULL == POU_str) ERROR; |
144 |
140 |
145 if ((NULL != fcall_data.formal_operand_list) && (NULL != fcall_data.nonformal_operand_list)) |
141 if ((NULL != fcall_data.formal_operand_list) && (NULL != fcall_data.nonformal_operand_list)) |
206 } |
202 } |
207 } |
203 } |
208 } |
204 } |
209 } |
205 } |
210 if (NULL != fcall_data.nonformal_operand_list) { |
206 if (NULL != fcall_data.nonformal_operand_list) { |
211 debug_c::print("print_datatypes_error_c::handle_function_invocation() CALLING ---> fcall_data.nonformal_operand_list->accept(*this)!\n"); |
|
212 debug_c::print_ast(fcall_data.nonformal_operand_list); |
|
213 debug_c::print("print_datatypes_error_c::handle_function_invocation() LIST_END\n"); |
|
214 fcall_data.nonformal_operand_list->accept(*this); |
|
215 debug_c::print("print_datatypes_error_c::handle_function_invocation() RETURNED <--- fcall_data.nonformal_operand_list->accept(*this)!\n"); |
|
216 if (f_decl) |
207 if (f_decl) |
217 for (int i = 1; (param_value = fcp_iterator.next_nf()) != NULL; i++) { |
208 for (int i = 1; (param_value = fcp_iterator.next_nf()) != NULL; i++) { |
218 /* TODO: verify if it is lvalue when INOUT or OUTPUT parameters! */ |
209 /* TODO: verify if it is lvalue when INOUT or OUTPUT parameters! */ |
219 |
210 |
220 /* This handle_function_invocation() will be called to handle IL function calls, where the first parameter comes from the previous IL instruction. |
211 /* This handle_function_invocation() will be called to handle IL function calls, where the first parameter comes from the previous IL instruction. |