updating macroexpand, exporting ast->sexp

This commit is contained in:
Alex Shinn 2010-07-19 23:55:07 +09:00
parent 66bbcefe6a
commit 3660755f4a
2 changed files with 3 additions and 2 deletions

View file

@ -2,5 +2,5 @@
(define-module (chibi macroexpand)
(import-immutable (scheme))
(import (chibi ast))
(export macroexpand)
(export macroexpand ast->sexp)
(include "macroexpand.scm"))

View file

@ -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))))))