mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 05:27:35 +02:00
updating macroexpand, exporting ast->sexp
This commit is contained in:
parent
66bbcefe6a
commit
3660755f4a
2 changed files with 3 additions and 2 deletions
|
@ -2,5 +2,5 @@
|
|||
(define-module (chibi macroexpand)
|
||||
(import-immutable (scheme))
|
||||
(import (chibi ast))
|
||||
(export macroexpand)
|
||||
(export macroexpand ast->sexp)
|
||||
(include "macroexpand.scm"))
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
(cond
|
||||
((lambda? x)
|
||||
`(lambda ,(map (lambda (id) (get-rename id x renames)) (lambda-params x))
|
||||
,@(map (lambda (d) `(define ,(identifier->symbol (cadr d)) #f)) (lambda-defs x))
|
||||
,@(map (lambda (d) `(define ,(identifier->symbol (cadar d)) #f))
|
||||
(lambda-defs x))
|
||||
,@(if (seq? (lambda-body x))
|
||||
(map a2s (seq-ls (lambda-body x)))
|
||||
(list (a2s (lambda-body x))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue