At one point I had this implemented using try-catch unless Parenscript's compiler could prove (rather naively) that the return-from clause was always executed. I am usually way behind the official branch, and I'm not sure if my changes ever made it in, and if they did if this case is a bug. Anyway it would do something like
Hi,
I was wondering if the BLOCK/RETURN-FROM feature in PS intends
to support the following case:
(ps (defun foo ()
(flet ((bar () (return-from foo 42)))
(bar))))
=>
WARNING: Returning from unknown block FOO
"function foo() {
var bar = function () {
return 42;
};
return bar();
};"
In order to try and get around the warning, I tried this:
(ps (defun baz ()
(block foo
(flet ((bar () (return-from foo 42)))
(bar)))))
=>
WARNING: Returning from unknown block FOO
"function baz() {
var bar = function () {
return 42;
};
return bar();
};"
but that didn't seem to work. Any ideas on how to achieve lexical
return here?
- Scott
_______________________________________________
parenscript-devel mailing list
parenscript-devel@common-lisp.net
http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel