Minilisp.pm/test.pl

22 lines
261 B
Perl
Raw Normal View History

2021-04-01 22:44:06 +02:00
use lib "./lib";
use Minilisp;
use Data::Dumper;
my $term = <<EOF;
(progn
(print "Hello")
(print "World")
(print a)
1)
EOF
my $parsed = Minilisp::compile($term);
my $ctx = {
'a' => "bar",
};
print "$term\n";
print ":= " . $parsed->($ctx) . "\n";