mrdocs::lua::Scope::loadChunk

Load a Lua chunk

Synopses

Declared in <mrdocs/Support/Lua.hpp>

Load a Lua chunk

Expected<Function>
loadChunk(
    std::string_view luaChunk,
    std::source_location loc = source_location::current());
» more...

Load a Lua chunk

Expected<Function>
loadChunk(
    std::string_view luaChunk,
    zstring chunkName,
    std::source_location loc = source_location::current());
» more...

Return Value

The function if successful, or an error.

Parameters

NameDescription
luaChunkThe Lua chunk to load.
locThe source location of the call site.
chunkNameThe name of the chunk (used in error messages).