[Bese-devel] Slight parenscript bug.

Marijn Haverbeke marijnh at gmail.com
Wed Jul 19 15:17:24 UTC 2006


It seems the following somewhat obscure parenscript expression does not
parenthize the output correctly:

(js:js* '(setf (slot-value (setf my-function (lambda () (return 22)))
"NAME") "myFunction"))

==>

myFunction = function ()
{

  return
22;

}['NAME'] = 'myFunction';

The assignment to myFunction should be parenthized (with the object index
outside the parentheses), or it will just be assigned a string instead of a
function. This is a rather weird corner case, but as you probably guessed
from the example, I'm trying to write a macro to define member functions and
automatically name them in the same statement so they show up properly in
FireBug backtraces. I'm rather intimidated by the internals of parenscript,
but I'm wondering if this would be easy to fix.



Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060719/c70ff359/attachment.html>


More information about the bese-devel mailing list