| 97 | } |
| 98 | |
| 99 | bool Parser::set_specialfunctionPayload(const char* function_name, func_tPayload function, std::weak_ptr<Payload> payload) { |
| 100 | DEBUG_PARSER("PARSER: set_SpecialFunction0()"); |
| 101 | |
| 102 | auto* ptr = get_variable_symbol(function_name); |
| 103 | if (!ptr) // function name not found |
| 104 | return false; |
| 105 | |
| 106 | assert(std::get<special_function_def>(ptr->value).funsptr->argc == 0); |
| 107 | std::get<special_function_def>(ptr->value).funsptr->fnct = function; |
| 108 | std::get<special_function_def>(ptr->value).funsptr->name = function_name; |
| 109 | std::get<special_function_def>(ptr->value).payload = payload; |
| 110 | return true; |
| 111 | } |
| 112 | |
| 113 | bool Parser::set_specialfunctionValuePayload(const char* function_name, func_tValuePayload function, std::shared_ptr<Payload> payload) { |
| 114 | DEBUG_PARSER("PARSER: set_specialfunctionValuePayload()"); |
nothing calls this directly
no test coverage detected