mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
Issue #13 - Allow compilation of code with local if
This commit is contained in:
parent
03f30ecf56
commit
330780c44d
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue