Skip to content
This repository has been archived by the owner on Jan 1, 2018. It is now read-only.

Commit

Permalink
if if/begin
Browse files Browse the repository at this point in the history
  • Loading branch information
zaoqi committed Dec 3, 2017
1 parent 0b820ee commit 30bb7de
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions js.cscm
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,23 @@
(EVAL (second xs)
(λ (xs)
(k (++ f"(..."xs")"))))))]
[(eq? f 'if)
(EVAL (first xs)
(λ (b)
(EVAL (second xs)
(λ (x)
(EVAL (third xs)
(λ (y)
(k (++ "("b"?"x":"y")"))))))))]
[(eq? f 'if/begin)
(EVAL (first xs)
(λ (b)
(++ "if("b"){"
(BEGIN (second xs) ig)
"}else{"
(BEGIN (thirs xs) ig)
"}"
(k undefined))))]
[else (EVAL f (λ (f)
(EVALxs xs (λ (xs)
(k (++ f"("(add-between xs ",")")"))))))])]))
Expand Down

0 comments on commit 30bb7de

Please sign in to comment.