eat extra space before closing delimiter - fix issue #1
This commit is contained in:
parent
b743a31cff
commit
afd0442a01
|
@ -69,10 +69,16 @@
|
||||||
[(ch port src line col pos)
|
[(ch port src line col pos)
|
||||||
(define (loop stxs-rev)
|
(define (loop stxs-rev)
|
||||||
(let ([next-ch (read-char port)])
|
(let ([next-ch (read-char port)])
|
||||||
(if (equal? next-ch r-paren)
|
(cond
|
||||||
(datum->syntax #f (reverse stxs-rev))
|
#| TODO - what if one of these whitespace characters is bound
|
||||||
(let ([one-stx (read-syntax/recursive src port next-ch)])
|
to something non-default in the readtable?? For now, just ignore
|
||||||
(loop (cons one-stx stxs-rev))))))
|
them. |#
|
||||||
|
[(member next-ch '(#\space #\tab #\newline #\vtab #\return))
|
||||||
|
(loop stxs-rev)]
|
||||||
|
[(equal? next-ch r-paren)
|
||||||
|
(datum->syntax #f (reverse stxs-rev))]
|
||||||
|
[else (let ([one-stx (read-syntax/recursive src port next-ch)])
|
||||||
|
(loop (cons one-stx stxs-rev)))])))
|
||||||
(loop '())]))
|
(loop '())]))
|
||||||
paren-reader)
|
paren-reader)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user