module paths normalize to .rkt, load handler converts .rkt back to .ss if necessary
svn: r18788 original commit: bdb71498e3ed816d44c9faf830f97fbe9fdaa3f2
This commit is contained in:
parent
29e1296e08
commit
23736d15be
|
@ -76,12 +76,23 @@
|
|||
(syntax-case stx ()
|
||||
[(_ orig-stx ctx loc fn reader)
|
||||
;; Parse the file name
|
||||
(let ([c-file (resolve-path-spec (syntax fn) (syntax loc) (syntax orig-stx) #'build-path)]
|
||||
(let ([orig-c-file (resolve-path-spec (syntax fn) (syntax loc) (syntax orig-stx) #'build-path)]
|
||||
[ctx (syntax ctx)]
|
||||
[loc (syntax loc)]
|
||||
[reader (syntax reader)]
|
||||
[orig-stx (syntax orig-stx)])
|
||||
[orig-stx (syntax orig-stx)]
|
||||
[rkt->ss (lambda (p)
|
||||
(let ([b (path->bytes p)])
|
||||
(if (regexp-match? #rx#"[.]rkt$" b)
|
||||
(path-replace-suffix p #".ss")
|
||||
p)))])
|
||||
|
||||
(let ([c-file (if (file-exists? orig-c-file)
|
||||
orig-c-file
|
||||
(let ([p2 (rkt->ss orig-c-file)])
|
||||
(if (file-exists? p2)
|
||||
p2
|
||||
orig-c-file)))])
|
||||
(register-external-file c-file)
|
||||
|
||||
(let ([read-syntax (if (syntax-e reader)
|
||||
|
@ -160,7 +171,7 @@
|
|||
(datum->syntax-object
|
||||
(quote-syntax here)
|
||||
`(begin ,@lexed-content)
|
||||
orig-stx))))))]))
|
||||
orig-stx)))))))]))
|
||||
|
||||
(define (include/proc stx)
|
||||
(syntax-case stx ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user