forgot to translate void

This commit is contained in:
Danny Yoo 2011-03-20 22:46:40 -04:00
parent 4949eef3c5
commit 8cd54d53f7
2 changed files with 5 additions and 0 deletions

View File

@ -318,6 +318,8 @@ EOF
(loop (cdr val)))]
[(boolean? val)
(if val "true" "false")]
[(void? val)
"null"]
[(empty? val)
(format "Primitives.null")]
[else

View File

@ -90,6 +90,9 @@
;; Assigning a cons
(test (E-single (make-AssignImmediateStatement 'val (make-Const (cons 1 2))))
"1,2")
;; Assigning a void
(test (E-single (make-AssignImmediateStatement 'val (make-Const (void))))
"null")
;; Assigning to proc means val should still be uninitialized.
(test (E-single (make-AssignImmediateStatement 'proc (make-Const "Danny")))
"undefined")