[parenscript-devel] How to generate comments?

Bastian Müller bastian at turbolent.com
Sun Aug 22 16:55:32 UTC 2010


On 08/22/2010 06:12 PM, Vladimir Sedach wrote:

Hi Vladmimir,

> Are you making a library? If so, are you looking to document
> particular functions, or insert inline comments in arbitrary places?
> If it's the functions, then it might make sense for me to add
> optional output of function and variable docstrings to JS comments;
> that would spare the need for a new special form and syntax for
> comments.
>
> As for arbitrary JS code, if there is a case where there is some JS
> code that you need that cannot be generated by Parenscript, it
> should be considered a bug in Parenscript.

Indeed, I'd like to create docstrings for functions and variables, so 
that Google's Closure compiler can be used to optimize and check the 
generated JavaScript Code. The annotations are documented here:

http://code.google.com/closure/compiler/docs/js-for-compiler.html

The comment special-form was the only thing I was able to add to 
parenscript. Docstrings would help a lot. On top of them, a separate 
library could provide convenience macros to generate the annotation 
comments compatible with Closure.

Cheers,
  Bastian




More information about the parenscript-devel mailing list