From: DDD on
Hi,

Is there a good tool to extract comments from a js file and produce a
document?

Thanks in advance.
From: Evertjan. on
DDD wrote on 12 mei 2010 in comp.lang.javascript:

> Is there a good tool to extract comments from a js file and produce a
> document?

Define what you mean by "comment", like:
1 anything between /* and */
2 anything on a line from //

Write a short Javascript script using linear parsing and/or regex.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Stefan Weiss on
On 12/05/10 03:37, DDD wrote:
> Is there a good tool to extract comments from a js file and produce a
> document?

If you're talking about JavaDoc-style comments, take a look at JsDoc
Toolkit:
http://code.google.com/p/jsdoc-toolkit/


--
stefan
From: Thomas 'PointedEars' Lahn on
Stefan Weiss wrote:

> DDD wrote:
>> Is there a good tool to extract comments from a js file and produce a
>> document?
>
> If you're talking about JavaDoc-style comments, take a look at JsDoc
> Toolkit:
> http://code.google.com/p/jsdoc-toolkit/

The only problem with it is that its authors still do not seem to understand
that they are not producing documentation for a class-based programming
language but for a prototype-based programming language; not for a different
kind of Java code, but for several ECMAScript implementations. As a result,
you find classes and fields where you should find object types (defined by
constructors) and properties.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(a)news.demon.co.uk>