28 lines
469 B
C++
28 lines
469 B
C++
|
#ifndef jk_LOADER_HPP
|
||
|
#define jk_LOADER_HPP
|
||
|
|
||
|
#include "commons.hpp"
|
||
|
#include "VM.hpp"
|
||
|
#include "SymTable.hpp"
|
||
|
#include "Function.hpp"
|
||
|
|
||
|
namespace jk
|
||
|
{
|
||
|
class Loader
|
||
|
{
|
||
|
public:
|
||
|
explicit Loader(std::shared_ptr<VM> vm,
|
||
|
std::shared_ptr<SymTable> sym);
|
||
|
virtual ~Loader();
|
||
|
|
||
|
void load();
|
||
|
void declare(std::string const& name, foreign_t body);
|
||
|
|
||
|
private:
|
||
|
std::shared_ptr<VM> m_vm;
|
||
|
std::shared_ptr<SymTable> m_sym;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|