xo-interpreter: add Primitive object, to expose builtin functions
This commit is contained in:
parent
4488117ac3
commit
2526dcc9b1
23 changed files with 277 additions and 135 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "Schematika.hpp"
|
||||
#include "VirtualSchematikaMachine.hpp"
|
||||
#include "BuiltinPrimitives.hpp"
|
||||
#include "GlobalEnv.hpp"
|
||||
#include "xo/reader/reader.hpp"
|
||||
#include <replxx.hxx>
|
||||
|
|
@ -69,7 +70,9 @@ namespace xo {
|
|||
{
|
||||
up<IAlloc> mm = GC::make(cfg.gc_config_);
|
||||
rp<GlobalSymtab> symtab = GlobalSymtab::make_empty();
|
||||
gp<Env> env = GlobalEnv::make_empty(mm.get(), symtab);
|
||||
gp<GlobalEnv> env = GlobalEnv::make_empty(mm.get(), symtab);
|
||||
|
||||
BuiltinPrimitives::install(mm.get(), env);
|
||||
|
||||
return std::make_unique<Impl>(cfg, std::move(mm), env);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue