unstable, syntax/parse: fix phase-of-enclosing-module
Was broken because with begin-for-syntax, offset no longer limited to 0 or 1. But now varrefs give module base phase directly.
This commit is contained in:
parent
095b5a5131
commit
350c8214f8
|
@ -85,11 +85,6 @@
|
|||
(explode-module-path-index y)
|
||||
(list y)))))
|
||||
|
||||
(define-syntax (phase-of-enclosing-module stx)
|
||||
(syntax-case stx ()
|
||||
[(poem)
|
||||
(let ([phase-within-module (syntax-local-phase-level)])
|
||||
#`(let ([phase-of-this-expression
|
||||
(variable-reference->phase (#%variable-reference))])
|
||||
(- phase-of-this-expression
|
||||
#,(if (zero? phase-within-module) 0 1))))]))
|
||||
(define-syntax-rule (phase-of-enclosing-module)
|
||||
(variable-reference->module-base-phase
|
||||
(#%variable-reference)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user