X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler-codegen.lisp;h=f3b05cc09f2e1c0499dd3427857d598f978d2bdd;hb=452123400b2a8123a445ccd274cc99a3fed1eea4;hp=fbb3952909c86b0d5d04228e203db8a47b45c8cc;hpb=afb6a14b45bf0734ce9b06d3c299036ad8792d40;p=jscl.git diff --git a/src/compiler-codegen.lisp b/src/compiler-codegen.lisp index fbb3952..f3b05cc 100644 --- a/src/compiler-codegen.lisp +++ b/src/compiler-codegen.lisp @@ -358,7 +358,7 @@ (destructuring-bind (&body body) (cdr form) (cond ((null body) '(empty)) - ((null (cdr body)) (car body)) + ((null (cdr body)) (js-expand-stmt (car body))) (t `(group ,@(cdr form)))))) (t form))) @@ -415,7 +415,9 @@ (js-format " else ") (js-stmt false)))) (group - (let ((in-group-p (and (consp parent) (eq (car parent) 'group)))) + (let ((in-group-p + (or (null parent) + (and (consp parent) (eq (car parent) 'group))))) (unless in-group-p (js-format "{")) (mapc #'js-stmt (cdr form)) (unless in-group-p (js-format "}"))))