miyo-jp / jsdoc-toolkit

Automatically exported from code.google.com/p/jsdoc-toolkit
0 stars 0 forks source link

Problem with parsing #307

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi.

Assume the following js document (attached 'a.js'):
=====================================================
/**
  * @class A
  */
A = Runner.extend(Runner.emptyFn, {
    i: false,
    /**
    * A variable
    */
    j: false,
    /**
    * A function
    */
    init: function(data){
    }
});
=====================================================

The documentation for this code would be EMPTY.
But if we add jsdoc comment for 'i' variabe, documentation will appear.

I've investigated source codes a bit. The problem is in namespace detection: 
the first un-annotated element ('i' variable in this example) is pushed into 
namespaces list with '$anonymous' name. Other element names are formatted as 
'$anonymous.elementName'. Parser drops then these elements due to 
JSDOC.Parser.conf.ignoreAnonymous configuration option.

Original issue reported on code.google.com by lost.gua...@gmail.com on 3 Dec 2010 at 2:58

Attachments: