syntax/location: repair after `variable-reference->module-source' fix
This commit is contained in:
parent
506b70f71f
commit
daa98b4e33
|
@ -413,9 +413,9 @@ result is @racket[#f].}
|
|||
|
||||
If @racket[varref] refers to a @tech{module-level variable}, the
|
||||
result is a path or symbol naming the module's source (which is
|
||||
typically, but not always, the same as in the resolved module path).
|
||||
If the module is a submodule, the result corresponds to the enclosing
|
||||
top-level module's source.
|
||||
typically, but not always, the same as in the @tech{resolved module
|
||||
path}). If the relevant module is a @tech{submodule}, the result
|
||||
corresponds to the enclosing top-level module's source.
|
||||
|
||||
If @racket[varref] refers to a @tech{top-level variable}, then the
|
||||
result is @racket[#f].}
|
||||
|
|
|
@ -47,8 +47,16 @@
|
|||
[quote-character-position source-location-position]
|
||||
[quote-character-span source-location-span])
|
||||
|
||||
(define (variable-reference->module-source/submod vr)
|
||||
(define src (variable-reference->module-source vr))
|
||||
(define rname (variable-reference->resolved-module-path vr))
|
||||
(define name (and rname (resolved-module-path-name rname)))
|
||||
(if (pair? name)
|
||||
(cons src (cdr name))
|
||||
src))
|
||||
|
||||
(define-syntax-rule (module-source)
|
||||
(variable-reference->module-source
|
||||
(variable-reference->module-source/submod
|
||||
(#%variable-reference)))
|
||||
|
||||
(define-for-syntax (do-quote-module stx fixup)
|
||||
|
|
Loading…
Reference in New Issue
Block a user