Compile T and NIL correctly
[app-scheme79asm.git] / lib / App / Scheme79asm / Compiler.pm
index 7bb912189374cbe980a92841efab05177c7bfcbc..d9a420f1aaf03408e16c9dc9fa3ae6dc8e4c2a2e 100644 (file)
@@ -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.010402 seconds and 4 git commands to generate.