4#include <fmt/ostream.h>
16 m_value = std::vector<Value>();
59 list().emplace_back(value);
64 list().emplace_back(std::move(value));
72 return fmt::format(
"{}", number());
78 return fmt::format(
"Function @ {}", pageAddr());
85 std::string out =
"[";
86 for (
auto it = constList().begin(), it_end = constList().end(); it != it_end; ++it)
89 out +=
"\"" + it->toString(vm) +
"\"";
91 out += it->toString(vm);
99 return closure().toString(vm);
102 return fmt::format(
"{}", fmt::streamed(usertype()));
117 return reference()->toString(vm);
120 return fmt::format(
"Instruction @ {}", pageAddr());
A class to be use C++ objects in ArkScript.
The ArkScript virtual machine, executing ArkScript bytecode.
std::vector< Value > & list()
Value(*)(std::vector< Value > &, VM *) ProcType
Value() noexcept
Construct a new Value object.
void push_back(const Value &value)
Add an element to the list held by the value (if the value type is set to list)
std::string toString(VM &vm) const noexcept