JSDOC/DocComment.js
[gnome.introspection-doc-generator] / JSDOC / DocComment.js
index a21d863..b76f67c 100644 (file)
@@ -19,16 +19,43 @@ DocComment = XObject.define(
         this.src           = "";
         this.meta          = "";
         this.tagTexts      = [];
-        this.tags          = [];
+        this.tags          = []; // array of doctags..
         if (typeof comment != "undefined") {
             this.parse(comment);
         }
     }, 
     Object, // extends
     {
-             
+        this.isUserComment = true;
+        this.src           = "";
+        this.meta          = "";
+        this.tagTexts      = [];
+        this.tags          = [];     
     
-        
+        /**
+         * serialize..
+         */
+        toObject :function(t)
+        {
+            
+            var ret = { };
+            for (var i in this) {
+                switch (typeof(this[i])) {
+                    case 'function':
+                       continue;
+                       continue;
+                        
+                    case 'string':
+                    case 'number':
+                    case 'boolean':                    
+                        ret[i] = this[i]; continue;
+                    default:
+                        print("unknown type:" + typeof(this[i]));
+                        Seed.quit();
+                   }
+            }
+            return ret;
+        },    
         /**
         * @requires JSDOC.DocTag
         */