]> iEval git - app-scheme79asm.git/blobdiff - lib/App/Scheme79asm/Compiler.pm
Compile T and NIL correctly
[app-scheme79asm.git] / lib / App / Scheme79asm / Compiler.pm
index bf03eea81f8259dd7e748047a7c9eaccc8416bc2..d9a420f1aaf03408e16c9dc9fa3ae6dc8e4c2a2e 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use parent qw/Exporter/;
 
 our @EXPORT_OK = qw/pretty_print/;
-our $VERSION = 0.004;
+our $VERSION = '0.005';
 
 use Carp qw/croak/;
 use Data::Dumper qw/Dumper/;
@@ -106,7 +106,7 @@ sub new {
        my %self = (
                symbols => ['', '', 'T'],
                nsymbols => 3,
-               symbol_map => {},
+               symbol_map => {T => 2},
        );
        bless \%self, $class;
 }
@@ -117,6 +117,9 @@ sub process_quoted {
                [LIST => 0]
        } elsif (scalarp $expr) {
                $expr = uc $expr;
+               if ($expr eq 'NIL') {
+                       return [LIST => 0]
+               }
                if (!exists $self->{symbol_map}{$expr}) {
                        $self->{symbol_map}{$expr} = $self->{nsymbols};
                        $self->{nsymbols}++;
This page took 0.01079 seconds and 4 git commands to generate.