madlisp/bootstrap.php

23 lines
451 B
PHP
Raw Normal View History

2020-05-28 04:55:58 +00:00
<?php
require('vendor/autoload.php');
function ml_get_env(): MadLisp\Env
{
$env = new MadLisp\Env();
$core = new MadLisp\Lib\Core();
$core->register($env);
return $env;
}
2020-05-28 10:10:00 +00:00
function ml_get_lisp(): MadLisp\Lisp
{
$tokenizer = new MadLisp\Tokenizer();
$reader = new MadLisp\Reader();
$eval = new MadLisp\Evaller();
$printer = new MadLisp\Printer();
return new MadLisp\Lisp($tokenizer, $reader, $eval, $printer);
}