12 m_scope(std::make_shared<Scope>(scope)),
23 for (
const auto id : std::ranges::views::keys(
m_scope->m_data))
33 std::string out =
"(";
34 for (std::size_t i = 0, end = m_scope->m_data.size(); i < end; ++i)
39 out +=
'.' + vm.m_state.m_symbols[m_scope->m_data[i].first] +
'=';
40 out += m_scope->m_data[i].second.toString(vm);
48 if (A.m_page_addr != B.m_page_addr)
51 return *A.m_scope == *B.m_scope;
Subtype of the value type, handling closures.
The virtual machine scope system.
The ArkScript virtual machine.
std::vector< std::string > m_symbols
The ArkScript virtual machine, executing ArkScript bytecode.
bool hasFieldEndingWith(const std::string &end, VM &vm) const
Used when generating error messages in the VM, to see if a symbol might have been wrongly fully quali...
std::string toString(VM &vm) const noexcept
Print the closure to a string.
Closure(const Scope &scope, PageAddr_t pa) noexcept
Construct a new Closure object.
std::shared_ptr< Scope > m_scope
A class to handle the VM scope more efficiently.
bool operator==(const Namespace &A, const Namespace &B)