Fix parsing comment at end of file

This commit is contained in:
madmaurice 2021-04-08 23:33:09 +02:00
parent 4aaff13d91
commit 6bff33af20
2 changed files with 5 additions and 1 deletions

View file

@ -47,7 +47,7 @@ sub tokenize {
while ($str)
{
if ($str =~ s/^;.*\n//)
if ($str =~ s/^;.*(\n|$)//)
{
$debug->("Comment");
# Comment. do nothing

View file

@ -1,2 +1,6 @@
;; This is a comment
(expect "Comment does not influence code" t)
;; Another comment
(expect "Comment does not influence code pt.2" t) ;; Even after another expression
(expect "Comment does not influence code pt.3" t)
;; Last comment