summaryrefslogtreecommitdiff
path: root/module/language/tree-il.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-05-21 22:43:07 +0200
committerAndy Wingo <wingo@pobox.com>2009-05-21 22:43:07 +0200
commit0260421208267eb202f9c9628cdaf39b531a5129 (patch)
tree634b1a6a49dc6f7de0efc4bbd440ed763aaa18a6 /module/language/tree-il.scm
parent40b36cfbbe4676f52bd4d6b45ae1642756642907 (diff)
downloadguile-0260421208267eb202f9c9628cdaf39b531a5129.tar.gz
some work on syntax.test
* module/language/tree-il.scm (tree-il->scheme): * module/ice-9/psyntax.scm (build-conditional): Attempt to not generate (if #f #f) as the second arm of an if, but it doesn't seem to be successful. * module/ice-9/psyntax-pp.scm (syntax-rules): Regenerate. * test-suite/tests/syntax.test (exception:unexpected-syntax): Change capitalization. ("unquote-splicing"): Update test. ("begin"): Add in second arms on these ifs, to avoid the strange though harmless expansion of `if'. (matches?): New helper macro. ("lambda"): Match on lexically bound symbols, as they will be alpha-renamed.
Diffstat (limited to 'module/language/tree-il.scm')
-rw-r--r--module/language/tree-il.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/tree-il.scm b/module/language/tree-il.scm
index a89d8cfd6..a81947749 100644
--- a/module/language/tree-il.scm
+++ b/module/language/tree-il.scm
@@ -215,7 +215,9 @@
`(,(tree-il->scheme proc) ,@(map tree-il->scheme args)))
((<conditional> test then else)
- `(if ,(tree-il->scheme test) ,(tree-il->scheme then) ,(tree-il->scheme else)))
+ (if (void? else)
+ `(if ,(tree-il->scheme test) ,(tree-il->scheme then))
+ `(if ,(tree-il->scheme test) ,(tree-il->scheme then) ,(tree-il->scheme else))))
((<primitive-ref> name)
name)