JSDOC/Symbol.js
[gnome.introspection-doc-generator] / JSDOC / Symbol.js
index 49556e9..96d3e57 100644 (file)
@@ -23,7 +23,7 @@ Symbol = XObject.define(
         name : "",
         defaultValue : "",
         params : [],
-        $args : [],
+        $args : [], // original arguments used when constructing.
         addOn : "",
         alias : "",
         augments : [],
@@ -72,17 +72,33 @@ Symbol = XObject.define(
                 var r = [];
                 a.forEach(function(e) {
                     r.push(m ? e : e.toObject());
-                }
+                })
             }
+            
             var ret = { };
             for (var i in this) {
+                if (Symbol.hide.indexOf(i) > -1) {
+                    continue;
+                }
                 switch (typeof(this[i])) {
                     case 'function':
                         continue;
                     case 'object':
-                    
-                        print("object? :" + i);
-                        Seed.quit();
+                        switch(i) {
+                            //arrays..
+                            case 'params' : 
+                                ret[i] = array2object(this[i],true); 
+                                continue;
+                            //objects..
+                            case 'augments' : 
+                                ret[i] = this[i].toArray();
+                                continue;
+                            default:
+                                print("object? :" + i);
+                                Seed.quit();
+                        }
+                        
+                        
                     case 'string':
                     case 'number':
                         ret[i] = this[i]; continue;
@@ -791,9 +807,13 @@ Symbol = XObject.define(
         }
 });
 
-
-
-
+/**
+ * Elements that are not serialized
+ * 
+ */
+Symbol.hide = [ 
+    '$args' // not needed AFAIK
+]
 
 Symbol.srcFile = ""; //running reference to the current file being parsed