Kazmir ain't looking too sharp tonight. How interesting. And I thought
tonight might have been rough on the other side of things. svn: r11771
This commit is contained in:
commit
d184da32ec
|
@ -5,4 +5,4 @@
|
||||||
(let* ([mod* (rd in)]
|
(let* ([mod* (rd in)]
|
||||||
[mod (if stx? (syntax->list mod*) mod*)]
|
[mod (if stx? (syntax->list mod*) mod*)]
|
||||||
[mod `(,(car mod) ,(cadr mod) ,@(cdddr mod))])
|
[mod `(,(car mod) ,(cadr mod) ,@(cdddr mod))])
|
||||||
(if stx? (datum->syntax mod* mod) mod))))
|
(if stx? (datum->syntax mod* mod mod*) mod))))
|
||||||
|
|
|
@ -74,6 +74,12 @@
|
||||||
[body (cond [(not wrapper) (body)]
|
[body (cond [(not wrapper) (body)]
|
||||||
[(procedure-arity-includes? wrapper 2) (wrapper body stx?)]
|
[(procedure-arity-includes? wrapper 2) (wrapper body stx?)]
|
||||||
[else (wrapper body)])]
|
[else (wrapper body)])]
|
||||||
|
[all-loc (vector src line col pos
|
||||||
|
(let-values ([(l c p) (port-next-location port)])
|
||||||
|
(and p (- p pos))))]
|
||||||
|
[body (if (and stx? (not (syntax? body)))
|
||||||
|
(datum->syntax #f body all-loc)
|
||||||
|
body)]
|
||||||
[p-name (object-name port)]
|
[p-name (object-name port)]
|
||||||
[name (if (path? p-name)
|
[name (if (path? p-name)
|
||||||
(let-values ([(base name dir?) (split-path p-name)])
|
(let-values ([(base name dir?) (split-path p-name)])
|
||||||
|
@ -89,7 +95,7 @@
|
||||||
v))]
|
v))]
|
||||||
[lib (if stx? (datum->syntax #f lib modpath modpath) lib)]
|
[lib (if stx? (datum->syntax #f lib modpath modpath) lib)]
|
||||||
[r `(,(tag-src 'module) ,(tag-src name) ,lib . ,body)])
|
[r `(,(tag-src 'module) ,(tag-src name) ,lib . ,body)])
|
||||||
(if stx? (datum->syntax #f r) r)))
|
(if stx? (datum->syntax #f r all-loc) r)))
|
||||||
|
|
||||||
(define (wrap lib port read modpath src line col pos)
|
(define (wrap lib port read modpath src line col pos)
|
||||||
(wrap-internal lib port read #f #f #f modpath src line col pos))
|
(wrap-internal lib port read #f #f #f modpath src line col pos))
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
#lang scheme/base
|
#lang s-exp syntax/module-reader
|
||||||
(require (prefix-in r: "../../typed-reader.ss")
|
|
||||||
(only-in syntax/module-reader wrap-read-all))
|
|
||||||
|
|
||||||
(define (*read in modpath line col pos)
|
typed-scheme/no-check
|
||||||
(wrap-read-all 'typed-scheme/no-check in r:read modpath #f line col pos))
|
|
||||||
|
|
||||||
(define (*read-syntax src in modpath line col pos)
|
#:read r:read
|
||||||
(wrap-read-all
|
#:read-syntax r:read-syntax
|
||||||
'typed-scheme/no-check in (lambda (in) (r:read-syntax src in))
|
|
||||||
modpath src line col pos))
|
|
||||||
|
|
||||||
(provide (rename-out [*read read] [*read-syntax read-syntax]))
|
(require (prefix-in r: "../typed-reader.ss"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user