#ifndef jk_LOADER_HPP #define jk_LOADER_HPP #include "commons.hpp" #include "VM.hpp" #include "SymTable.hpp" #include "Function.hpp" #include "StaticFunction.hpp" #include "Compiler.hpp" #include "StaticPass.hpp" namespace jk { class Loader { public: explicit Loader(std::shared_ptr vm, std::shared_ptr static_pass, std::shared_ptr compiler, std::shared_ptr sym); virtual ~Loader(); std::shared_ptr compiler() const { return m_compiler; } void load(); void declare(std::string const& name, foreign_t body); void declare_static(std::string const& name, static_fun_t body); private: std::shared_ptr m_vm; std::shared_ptr m_static_pass; std::shared_ptr m_compiler; std::shared_ptr m_sym; }; } #endif