blob: caa4f4e2762244605c10820c92e21b296ff1def2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
(defmacro define-param-expander (keyword
(parms body : (env (gensym)) (form (gensym)))
. forms)
^(progn
(set [*param-macro* ,keyword]
(lambda (,parms ,body ,env ,form)
,*forms))
,keyword))
(defun macroexpand-params (prototype-form : env)
(tree-case prototype-form
((name params . body)
(cons name (sys:expand-param-macro params body env prototype-form)))
(else (error "~s: invalid prototype-form argument ~s" %fun% else))))
|