better reader implementation
svn: r6767 original commit: c6415843425e5df5fcd33379ab6a58db145bb8f3
This commit is contained in:
parent
89f5bde7ba
commit
3c72a6622a
|
@ -6,19 +6,11 @@
|
|||
(provide (rename *read read)
|
||||
(rename *read-syntax read-syntax))
|
||||
|
||||
(define (call-with-scribble-params t)
|
||||
(parameterize ([scribble:read-insert-indents #f])
|
||||
(t)))
|
||||
|
||||
(define/kw (*read #:optional [inp (current-input-port)])
|
||||
(call-with-scribble-params
|
||||
(lambda ()
|
||||
(wrap inp (scribble:read-inside inp)))))
|
||||
(wrap inp (scribble:read-inside inp)))
|
||||
|
||||
(define/kw (*read-syntax #:optional src [port (current-input-port)])
|
||||
(call-with-scribble-params
|
||||
(lambda ()
|
||||
(wrap port (scribble:read-inside-syntax src port)))))
|
||||
(wrap port (scribble:read-inside-syntax src port))))
|
||||
|
||||
(define (wrap port body)
|
||||
(let* ([p-name (object-name port)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user