| 145 | |
| 146 | template <typename RetType = Value, typename ... Args> |
| 147 | RetType call(const std::string& name, Args ... args) { |
| 148 | auto it = m_internal->functions.find(name); |
| 149 | if (it == m_internal->functions.end()) |
| 150 | return Value{}; |
| 151 | auto& func = it->second; |
| 152 | func.arguments = {args...}; |
| 153 | func(); |
| 154 | return func.result; |
| 155 | } |
| 156 | |
| 157 | protected: |
| 158 | void makeGlobal(const std::string& name) { |