adjut check syntax so that it pays attention only
to syntax-original? identifiers
It used to pay attention to non-original identifiers if they
were in the disappeared-use or disappeared-binding
properties, but now that the 'syntax' macro is fixed
(commit f28e8a0
) it can ignore all non-original identifiers
This commit is contained in:
parent
d34490d990
commit
23aa31fc6f
|
@ -407,7 +407,7 @@
|
||||||
(loop (cdr prop))]
|
(loop (cdr prop))]
|
||||||
[(identifier? prop)
|
[(identifier? prop)
|
||||||
(add-origins prop disappaeared-uses)
|
(add-origins prop disappaeared-uses)
|
||||||
(add-id binders prop #:add-if-not-original? #T)])))))
|
(add-id binders prop)])))))
|
||||||
|
|
||||||
;; add-disappeared-uses : syntax id-set -> void
|
;; add-disappeared-uses : syntax id-set -> void
|
||||||
(define (add-disappeared-uses stx id-set)
|
(define (add-disappeared-uses stx id-set)
|
||||||
|
@ -419,7 +419,7 @@
|
||||||
(loop (car prop))
|
(loop (car prop))
|
||||||
(loop (cdr prop))]
|
(loop (cdr prop))]
|
||||||
[(identifier? prop)
|
[(identifier? prop)
|
||||||
(add-id id-set prop #:add-if-not-original? #t)])))))
|
(add-id id-set prop)])))))
|
||||||
|
|
||||||
;; add-require-spec : hash-table[sexp[require-spec] -o> (listof syntax)]
|
;; add-require-spec : hash-table[sexp[require-spec] -o> (listof syntax)]
|
||||||
;; -> sexp[require-spec]
|
;; -> sexp[require-spec]
|
||||||
|
@ -1183,9 +1183,8 @@
|
||||||
(free-identifier-mapping-put! mapping id new))))
|
(free-identifier-mapping-put! mapping id new))))
|
||||||
|
|
||||||
;; add-id : id-set identifier -> void
|
;; add-id : id-set identifier -> void
|
||||||
(define (add-id mapping id #:add-if-not-original? [add-if-not-original? #f])
|
(define (add-id mapping id)
|
||||||
(when (or add-if-not-original?
|
(when (syntax-original? id)
|
||||||
(syntax-original? id))
|
|
||||||
(let* ([old (free-identifier-mapping-get mapping id (λ () '()))]
|
(let* ([old (free-identifier-mapping-get mapping id (λ () '()))]
|
||||||
[new (cons id old)])
|
[new (cons id old)])
|
||||||
(free-identifier-mapping-put! mapping id new))))
|
(free-identifier-mapping-put! mapping id new))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user