blob: 351c9e8a1ac8beef7fe9fc4f309a36008fc05c12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<?php
use Mnml\Lexer\Lexer;
use Mnml\Parser\Parser;
$import = function (string $library) {
$input = file_get_contents(dirname(__FILE__) . "/" . $library);
$lexer = new Lexer($input);
$tokens = $lexer->lex();
$parser = new Parser($tokens);
$nodes = $parser->parse();
};
$print = function (string $string) {
echo $string;
};
return compact("import", "print");
|