Issue #13 - Allow compilation of code with local if

This commit is contained in:
Justin Ethier 2016-12-08 13:57:19 +00:00
parent 03f30ecf56
commit 330780c44d
2 changed files with 3 additions and 3 deletions

View file

@ -125,7 +125,7 @@
(if (and val (not (member expr bv)))
(clean val bv)
expr)))
((if? expr)
((if-syntax? expr)
`(if ,(clean (if->condition expr) bv)
,(clean (if->then expr) bv)
,(if (if-else? expr)

View file

@ -529,7 +529,7 @@
,@(expand (define->exp exp) env rename-env))))
((set!? exp) `(set! ,(expand (set!->var exp) env rename-env)
,(expand (set!->exp exp) env rename-env)))
((if? exp) `(if ,(expand (if->condition exp) env rename-env)
((if-syntax? exp) `(if ,(expand (if->condition exp) env rename-env)
,(expand (if->then exp) env rename-env)
,(if (if-else? exp)
(expand (if->else exp) env rename-env)
@ -850,7 +850,7 @@
((lambda? exp)
(difference (reduce union (map search (lambda->exp exp)) '())
(lambda-formals->list exp)))
((if? exp) (union (search (if->condition exp))
((if-syntax? exp) (union (search (if->condition exp))
(union (search (if->then exp))
(search (if->else exp)))))
((define? exp) (union (list (define->var exp))