mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +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)))
|
(if (and val (not (member expr bv)))
|
||||||
(clean val bv)
|
(clean val bv)
|
||||||
expr)))
|
expr)))
|
||||||
((if? expr)
|
((if-syntax? expr)
|
||||||
`(if ,(clean (if->condition expr) bv)
|
`(if ,(clean (if->condition expr) bv)
|
||||||
,(clean (if->then expr) bv)
|
,(clean (if->then expr) bv)
|
||||||
,(if (if-else? expr)
|
,(if (if-else? expr)
|
||||||
|
|
|
@ -529,7 +529,7 @@
|
||||||
,@(expand (define->exp exp) env rename-env))))
|
,@(expand (define->exp exp) env rename-env))))
|
||||||
((set!? exp) `(set! ,(expand (set!->var exp) env rename-env)
|
((set!? exp) `(set! ,(expand (set!->var exp) env rename-env)
|
||||||
,(expand (set!->exp 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)
|
,(expand (if->then exp) env rename-env)
|
||||||
,(if (if-else? exp)
|
,(if (if-else? exp)
|
||||||
(expand (if->else exp) env rename-env)
|
(expand (if->else exp) env rename-env)
|
||||||
|
@ -850,7 +850,7 @@
|
||||||
((lambda? exp)
|
((lambda? exp)
|
||||||
(difference (reduce union (map search (lambda->exp exp)) '())
|
(difference (reduce union (map search (lambda->exp exp)) '())
|
||||||
(lambda-formals->list 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))
|
(union (search (if->then exp))
|
||||||
(search (if->else exp)))))
|
(search (if->else exp)))))
|
||||||
((define? exp) (union (list (define->var exp))
|
((define? exp) (union (list (define->var exp))
|
||||||
|
|
Loading…
Add table
Reference in a new issue