28 Sep 2012 08:06
Patch for line-comments
Philipp Marek <philipp <at> marek.priv.at>
2012-09-28 06:06:16 GMT
2012-09-28 06:06:16 GMT
After a short discussion on #lisp the current behaviour was seen as a bug; a
line-comment should _only_ be terminated by a newline, and not by a terminating
character as well.
Eg. for
#?rx( ...
# (a test)
hello)
the current version would return an error about "hello" being an unknown variable.
Regards,
Phil
$ diff -u read.lisp.orig read.lisp
--- read.lisp.orig 2012-09-28 07:56:57.201746774 +0200
+++ read.lisp 2012-09-28 07:57:32.989790049 +0200
<at> <at> -462,8 +462,7 <at> <at>
;; or *TERM-CHAR*
(read-while
(lambda (char)
- (and (char/= char #\Newline)
- (char/= char *term-char*))))
+ (char/= char #\Newline)))
(when (char= (peek-char*) #\Newline)
(read-char*))
(cond ((not (digit-char-p (peek-char*)
(Continue reading)
RSS Feed