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

D

DDD

Hi,

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

Thanks in advance.
 
E

Evertjan.

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.
 
T

Thomas 'PointedEars' Lahn

Stefan said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top