From: David Vázquez Date: Mon, 24 Jun 2013 12:16:40 +0000 (+0200) Subject: For loop X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=da5b1cbe43839248fe03d5ef6a5b8fdb44083d29;p=jscl.git For loop --- diff --git a/src/compiler-codegen.lisp b/src/compiler-codegen.lisp index 6a3abc9..27114b2 100644 --- a/src/compiler-codegen.lisp +++ b/src/compiler-codegen.lisp @@ -446,6 +446,16 @@ (js-expr condition) (js-format ")") (js-stmt `(progn ,@body)))) + (for + (destructuring-bind ((start condition step) &body body) (cdr form) + (js-format "for (") + (js-expr start) + (js-format ";") + (js-expr condition) + (js-format ";") + (js-expr step) + (js-format ")") + (js-stmt `(progn ,@body)))) (try (destructuring-bind (&rest body) (cdr form) (js-format "try")