Skip to content

Specify (VALUES) as a valid return from custom reader

Since reader-interception works by adding reader macros to the read table, the interface of INTERCEPT-CHAR-READER should be more in line with a reader macro function, not CL:READ. Of note is that a reader macro function should return no VALUES if there was no object to be READ next and that is expected.

So if we're at the end of a file and all that remains is comments, whitespace, and similar, INTERCEPT-CHAR-READER should return no VALUES. Before this change, it would signal END-OF-FILE, causing LOAD and COMPILE-FILE (on SBCL at least) to fail.

Signaling END-OF-FILE is still valid if the file ends in the middle of an object representation.

Merge request reports