| 124 | } |
| 125 | |
| 126 | bool Parser::set_specialfunction2ValuePayload(const char* function_name, func_t2ValuePayload function, std::shared_ptr<Payload> payload) { |
| 127 | DEBUG_PARSER("PARSER: set_specialfunction2ValuePayload()"); |
| 128 | |
| 129 | auto* ptr = get_variable_symbol(function_name); |
| 130 | if (!ptr) // function name not found |
| 131 | return false; |
| 132 | assert(std::get<special_function_def>(ptr->value).funsptr->argc == 2); |
| 133 | std::get<special_function_def>(ptr->value).funsptr->fnct = function; |
| 134 | std::get<special_function_def>(ptr->value).funsptr->name = function_name; |
| 135 | std::get<special_function_def>(ptr->value).payload = payload; |
| 136 | return true; |
| 137 | } |
| 138 | |
| 139 | bool Parser::set_specialfunctionVariablePayload(const char* function_name, func_tVariablePayload function, std::shared_ptr<Payload> payload) { |
| 140 | DEBUG_PARSER("PARSER: set_specialfunctionVariablePayload()"); |
nothing calls this directly
no test coverage detected