From 5a6d617b1f4d85b1ef17e7ab9ffc2188a4dce802 Mon Sep 17 00:00:00 2001 From: Vladimir Sedach Date: Tue, 1 Dec 2009 02:38:55 -0500 Subject: [PATCH] Fixed return of iteration special forms. --- src/special-forms.lisp | 5 +---- t/ps-tests.lisp | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/special-forms.lisp b/src/special-forms.lisp index 647b218..4156750 100644 --- a/src/special-forms.lisp +++ b/src/special-forms.lisp @@ -61,10 +61,7 @@ (and (consp exp) (member (car exp) '(throw - do - do* - dotimes - dolist + labeled-for for-in while)))) diff --git a/t/ps-tests.lisp b/t/ps-tests.lisp index 383331c..4cdfcc5 100644 --- a/t/ps-tests.lisp +++ b/t/ps-tests.lisp @@ -1456,3 +1456,10 @@ case 1: var _js1 = 10; _js2.style.left = _js1; x.offsetLeft;") + +(test-ps-js for-return + (return (dolist (arg args) (foo arg))) + "for (var arg = null, _js_idx1 = 0; _js_idx1 < args.length; _js_idx1 += 1) { + arg = args[_js_idx1]; + foo(arg); +};") -- 2.11.4.GIT