Omit sli= when not transforming
This commit is contained in:
parent
c50e014c78
commit
4c07fc08b7
|
@ -118,6 +118,7 @@
|
||||||
(define (sli/use whole-stx)
|
(define (sli/use whole-stx)
|
||||||
;(…)ˢˡⁱ⁼ ᵘˢᵉ⁼
|
;(…)ˢˡⁱ⁼ ᵘˢᵉ⁼
|
||||||
;(…)ₛₗᵢ₌ ᵤₛₑ₌
|
;(…)ₛₗᵢ₌ ᵤₛₑ₌
|
||||||
|
(if (syntax-transforming?)
|
||||||
(let* ([stx (datum->syntax whole-stx 'to-id)]
|
(let* ([stx (datum->syntax whole-stx 'to-id)]
|
||||||
[sli (syntax-local-introduce stx)]
|
[sli (syntax-local-introduce stx)]
|
||||||
[stx-ids (extract-scope-ids stx)]
|
[stx-ids (extract-scope-ids stx)]
|
||||||
|
@ -128,11 +129,14 @@
|
||||||
[sli-binding (extract-scope-ids sli-slb)]
|
[sli-binding (extract-scope-ids sli-slb)]
|
||||||
[use (append (set-symmetric-difference stx-ids stx-binding)
|
[use (append (set-symmetric-difference stx-ids stx-binding)
|
||||||
(set-symmetric-difference sli-ids sli-binding))]
|
(set-symmetric-difference sli-ids sli-binding))]
|
||||||
[stx/sli-use (set-subtract (set-symmetric-difference stx-ids sli-ids)
|
[stx/sli-use (set-subtract (set-symmetric-difference stx-ids
|
||||||
|
sli-ids)
|
||||||
use)])
|
use)])
|
||||||
(format "ˢˡⁱ⁼~a⁺ᵘˢᵉ⁼~a~a"
|
(format "ˢˡⁱ⁼~a⁺ᵘˢᵉ⁼~a~a"
|
||||||
(string-join (map digits->superscripts (map ~a stx/sli-use)) " ")
|
(string-join (map digits->superscripts (map ~a stx/sli-use))
|
||||||
(string-join (map digits->superscripts (map ~a use)) " ")
|
" ")
|
||||||
|
(string-join (map digits->superscripts (map ~a use))
|
||||||
|
" ")
|
||||||
(if (sli-scopes)
|
(if (sli-scopes)
|
||||||
(let* ([named ((sli-scopes) (datum->syntax #f 'zero))]
|
(let* ([named ((sli-scopes) (datum->syntax #f 'zero))]
|
||||||
[named-scope-id (extract-scope-ids named)])
|
[named-scope-id (extract-scope-ids named)])
|
||||||
|
@ -140,7 +144,8 @@
|
||||||
(string-join (map digits->superscripts
|
(string-join (map digits->superscripts
|
||||||
(map ~a named-scope-id))
|
(map ~a named-scope-id))
|
||||||
" ")))
|
" ")))
|
||||||
""))))
|
"")))
|
||||||
|
""))
|
||||||
|
|
||||||
(define (+scopes stx)
|
(define (+scopes stx)
|
||||||
(format "~a~a"
|
(format "~a~a"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user