Expand top-level program as if it was a lambda body, to allow begin splicing

This commit is contained in:
Justin Ethier 2016-02-05 22:52:50 -05:00
parent f5cd5d0fdf
commit 6e870cd6d3

View file

@ -113,7 +113,12 @@
(macro:load-env! *defined-macros* (create-environment '() '()))
;; Expand macros
(set! input-program (expand input-program (macro:get-env)))
(set! input-program
((if program?
expand-lambda-body
expand)
input-program
(macro:get-env)))
(trace:info "---------------- after macro expansion:")
(trace:info input-program) ;pretty-print