Explain that `with-syntax' ~= "define pattern variable".
This commit is contained in:
parent
209aa0fb7e
commit
40518865c6
8
main.rkt
8
main.rkt
|
@ -726,9 +726,11 @@ Well that explains it. Instead, we wanted to expand to:
|
||||||
Our template is using the symbol @racket[name] but we wanted its
|
Our template is using the symbol @racket[name] but we wanted its
|
||||||
value, such as @racket[foo-bar] in this use of our macro.
|
value, such as @racket[foo-bar] in this use of our macro.
|
||||||
|
|
||||||
A solution here is @racket[with-syntax], which lets us say that
|
A solution here is @racket[with-syntax]@margin-note*{You could
|
||||||
@racket[name] is something whose value can be used in our output
|
consider @racket[with-syntax] to mean, "define pattern variables".},
|
||||||
template:
|
which lets us say that @racket[name] is something whose value can be
|
||||||
|
used in our output template. In effect, it lets us say that
|
||||||
|
@racket[name] is an additional pattern variable.
|
||||||
|
|
||||||
@i[
|
@i[
|
||||||
(define-syntax (hyphen-define/wrong1.3 stx)
|
(define-syntax (hyphen-define/wrong1.3 stx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user