miyo-jp / jsdoc-toolkit

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

Module pattern support problem #213

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Description:

I am trying to document private variables and functions within the function 
closure of the "standard" module pattern. You describe how to do this in 
the FAQ. 

If I attempt to wrap the module function invocation in parens, the private 
members are no longer generated in the output.

Specifically:

a.b.c = function(){
}();

works but,

a.b.c = (function(){
})();

Does not. 

Wrapping the function invocation is a fairly common practice.

If you use the example from the FAQ and modify it in this fashion, you will 
see that the private information is no longer emitted in the documentation.

Here is the command used to reproduce the issue.
java -jar jsrun.jar app\run.js -a -p -t=templates\jsdoc foo.js

I am using version 2.1.0 of the toolkit.
I am using version 1.6.0_12 of suns java

This code will reproduce the issue:

/** @namespace */
YOOHOO.myProject.myModule = (function () {
        /** @private */
        var myPrivateVar = "";

        /** @private */
        var myPrivateMethod = function () {
        }

        /** @scope YOOHOO.myProject.myModule */
        return  {
                /** describe myPublicProperty here */
                myPublicProperty: "",

                /** describe myPublicMethod here */
                myPublicMethod: function () {
                }
        };
})(); 

Here is my system configuration

OS Name Microsoft Windows XP Professional   
Version 5.1.2600 Service Pack 2 Build 2600  
OS Manufacturer Microsoft Corporation   
System Manufacturer Dell Inc.   
System Model    Latitude D630   
System Type X86-based PC    
Processor   x86 Family 6 Model 15 Stepping 11 GenuineIntel ~1995 Mhz    
Processor   x86 Family 6 Model 15 Stepping 11 GenuineIntel ~1994 Mhz    
BIOS Version/Date   Dell Inc. A04, 11/1/2007    
SMBIOS Version  2.4 
Windows Directory   C:\WINDOWS  
System Directory    C:\WINDOWS\system32 
Boot Device \Device\HarddiskVolume1 
Locale  United States   
Hardware Abstraction Layer  Version = "5.1.2600.2180 
(xpsp_sp2_rtm.040803-2158)"     
Time Zone   Eastern Daylight Time   
Total Physical Memory   3,072.00 MB 
Available Physical Memory   972.78 MB   
Total Virtual Memory    2.00 GB 
Available Virtual Memory    1.96 GB 
Page File Space 5.82 GB 
Page File   C:\pagefile.sys 

Original issue reported on code.google.com by james.culbert@gmail.com on 3 Apr 2009 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by micmath on 15 Jun 2009 at 1:51

GoogleCodeExporter commented 8 years ago
This was committed in revision 799 and will be in release 2.2.2.

Original comment by micmath on 20 Jun 2009 at 7:57

GoogleCodeExporter commented 8 years ago
Issue 222 has been merged into this issue.

Original comment by micmath on 21 Jun 2009 at 10:48