diff options
| author | Joel Martin <github@martintribe.org> | 2014-04-21 20:08:18 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2014-04-21 20:08:18 -0500 |
| commit | 60f2b3638e2e856a984dd46fc319bc316c0d0952 (patch) | |
| tree | c44ee0f77675b01d639247addbf773a4cfd2d8d2 /perl/printer.pm | |
| parent | a5a6605877c98a37696a30d310a29f4d1fc230e9 (diff) | |
| download | mal-60f2b3638e2e856a984dd46fc319bc316c0d0952.tar.gz mal-60f2b3638e2e856a984dd46fc319bc316c0d0952.zip | |
Perl: add step5_tco
- Make all warnings fatal/exceptions.
Diffstat (limited to 'perl/printer.pm')
| -rw-r--r-- | perl/printer.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl/printer.pm b/perl/printer.pm index d5bc306..7880798 100644 --- a/perl/printer.pm +++ b/perl/printer.pm @@ -1,6 +1,6 @@ package printer; use strict; -use warnings; +use warnings FATAL => qw(all); use feature qw(switch); use Exporter 'import'; our @EXPORT_OK = qw( _pr_str ); @@ -37,6 +37,10 @@ sub _pr_str { return $$obj; } } + when(/^Function/) { + return '<fn* ' . _pr_str($obj->{params}) . + ' ' . _pr_str($obj->{ast}) . '>'; + } when(/^CODE/) { return '<builtin_fn* ' . $obj . '>'; } default { return $$obj; } } |
