From da5b1cbe43839248fe03d5ef6a5b8fdb44083d29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Mon, 24 Jun 2013 14:16:40 +0200 Subject: [PATCH] For loop --- src/compiler-codegen.lisp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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") -- 1.7.10.4