diff --git a/lib/Minilisp.pm b/lib/Minilisp.pm index dbd3b3c..50515b8 100644 --- a/lib/Minilisp.pm +++ b/lib/Minilisp.pm @@ -21,7 +21,11 @@ sub tokenize { while ($str) { - if ($str =~ s/^\(//) + if ($str =~ s/^;.*\n//) + { + # Comment. do nothing + } + elsif ($str =~ s/^\(//) { push @tokens, { type => LPAREN }; }