JSDOC/TokenReader.js
[gnome.introspection-doc-generator] / JSDOC / Parser.js
index 1a28d4b..80ffd93 100644 (file)
@@ -1,10 +1,10 @@
 //<script type="text/javascript">
 
-Walker2      = imports.Walker2.Walker2;
-Symbol      = imports.Symbol.Symbol;
-SymbolSet      = imports.SymbolSet.SymbolSet;
-DocComment  = imports.DocComment.DocComment;
-Options     = imports.Options.Options;
+const Walker2      = imports.Walker2.Walker2;
+const Symbol      = imports.Symbol.Symbol;
+const SymbolSet      = imports.SymbolSet.SymbolSet;
+const DocComment  = imports.DocComment.DocComment;
+const Options     = imports.Options.Options;
 /**
  * Parser is a static  instance..
  * 
@@ -12,7 +12,7 @@ Options     = imports.Options.Options;
  */
  
  
-Parser = {
+const Parser = {
        conf: { 
         loaded: false 
     },
@@ -84,11 +84,12 @@ Parser = {
         for (p in this.symbols._index) {
             var symbol = this.symbols.getSymbol(p);
             
-            //print(JSON.stringify(symbol, null,4));
+           // print(JSON.stringify(symbol, null,4));
             
             if (!symbol) continue;
             
             if (symbol.isPrivate) {
+                this.symbols.deleteSymbol(symbol.alias);
                 continue;
             }
             
@@ -127,7 +128,7 @@ Parser = {
        
        addSymbol: function(symbol) 
     {
-         //print("PARSER addSYMBOL : " + symbol.alias);
+        //print("PARSER addSYMBOL : " + symbol.alias);
         
                // if a symbol alias is documented more than once the last one with the user docs wins
                if (this.symbols.hasSymbol(symbol.alias)) {
@@ -192,9 +193,16 @@ Parser = {
                        }
                        print("-------------------\n");
                }
-       }
-    
-    
-    
+       },
+    /**
+     * return symbols so they can be serialized.
+     */
+    symbolsToObject : function(srcFile)
+    {
+        //this.filesSymbols[srcFile] is a symbolset..
+        return this.filesSymbols[srcFile];
+        
+            //    Parser.filesSymbols[srcFile]._index
+    }
 
 }
\ No newline at end of file