bel icon indicating copy to clipboard operation
bel copied to clipboard

Bug: Perl-based reader doesn't handle a comment in the middle of an empty set of parens correctly

Open masak opened this issue 1 year ago • 0 comments

This code, when stored in a file and run from the command line:

(
; comment
)

Fails with this error message:

Error: ('unboundb )

But the same code, when fed through the Bel reader on the REPL:

> (set s (append "(" (list \lf) "; comment" (list \lf) ")"))
"(
; comment
)"
> (read (list s))
nil

Works and gives the correct result nil.

masak avatar Feb 02 '24 14:02 masak