void Context::AddFunction(FunctionPtr function) { StringView name = function->GetName(); if (IsNameUsed(name)) throw ILException("Cannot declare function, the name '" + static_cast<std::string>(name) + "' is already being used."); functions.emplace(name, function); }