syntax/parse: fixed bug in ~literal uncovered by litset changes

This commit is contained in:
Ryan Culpepper 2011-04-01 06:27:40 -06:00
parent 000e52d31d
commit 0bec757e5e
2 changed files with 6 additions and 5 deletions

View File

@ -844,7 +844,8 @@ A syntax class is integrable if
(let* ([chunks (parse-keyword-options/eol #'more phase-directive-table
#:no-duplicates? #t
#:context stx)]
[phase (options-select-value chunks '#:phase #:default 0)])
[phase (options-select-value chunks '#:phase
#:default #'(syntax-local-phase-level))])
;; FIXME: Duplicates phase expr!
(create-pat:literal #'lit phase phase))]
[_

View File

@ -283,10 +283,10 @@
(eq? namex namey)
(equal? phasex phasey)))]
[else
(and (eq? bx 'lexical) (eq? by 'lexical)
;; One must be lexical (can't be #f, since one must be bound)
;; lexically-bound names bound in only one phase; just compare
(free-identifier=? x y))])))
;; Module is only way to get phase-shift; if not module-bound names,
;; then only identifiers at same phase can refer to same binding.
(and (equal? phase-x phase-y)
(free-identifier=? x y phase-x))])))
;; ----