21 for (
const char *
name: names) {
26 template <
typename... Ts>
29 template<
typename... TObjs>
31 _swallow(uscript::Compiler::Register<TObjs>...);
34 template<
typename... TObjs>
37 template<
typename T,
typename... TObjs>
40 AddAll<TObjs...>(vm, names..., objs...);
44 template<
typename... TObjs>
51 return std::move(chunk);
54 template<
typename... TObjs>
60 return [chunk, vm, names...](
const TObjs *... data)
mutable {
62 AddAll<TObjs...>(vm, names..., data...);
const char *& JustACharRef
void SetChunk(const Chunk *_chunk)
Chunk compileChunk(const char *source)
std::function< uscript::Value(const TObjs *...)> compile(JustAChar< TObjs >...names, const char *source)
void SetAll(VM &vm, std::initializer_list< const char * > names)
static const std::vector< std::string > names
void AddGlobal(const char *name, const TObj *object)
static bool Compile(const char *source, Chunk *chunk)