19 lines
580 B
Plaintext
19 lines
580 B
Plaintext
;;;; Two rounds of expansion, and the body comes through both of them.
|
|
;;;;
|
|
;;;; outer expands into a call to inner, which expands again. The forms below
|
|
;;;; are written once and marshalled twice, so the second round has to find
|
|
;;;; the location the first round gave back rather than the call site it was
|
|
;;;; passing through. The note names outer, the macro that was written here,
|
|
;;;; and not inner, which nobody wrote.
|
|
(defmacro inner [& body]
|
|
`(do ~@body))
|
|
|
|
(defmacro outer [& body]
|
|
`(inner ~@body))
|
|
|
|
(defn main [] i32
|
|
(outer
|
|
(let [a 1]
|
|
(+ a nowhere)))
|
|
0)
|