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

Discussion in 'Javascript' started by DDD, May 12, 2010.

  1. DDD

    DDD Guest

    Hi,

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

    Thanks in advance.
     
    DDD, May 12, 2010
    #1
    1. Advertising

  2. DDD

    Evertjan. Guest

    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)
     
    Evertjan., May 12, 2010
    #2
    1. Advertising

  3. 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$>
     
    Thomas 'PointedEars' Lahn, May 12, 2010
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Zimmerman
    Replies:
    1
    Views:
    350
    Chris Bedford
    Aug 15, 2003
  2. Replies:
    0
    Views:
    1,166
  3. Kent
    Replies:
    1
    Views:
    411
    Irrwahn Grausewitz
    Sep 26, 2003
  4. Ivan Kljaic
    Replies:
    45
    Views:
    3,249
  5. David Smithz

    News ticker tool - any good ones out there?

    David Smithz, Dec 6, 2006, in forum: Javascript
    Replies:
    3
    Views:
    114
    David Smithz
    Dec 7, 2006
Loading...

Share This Page