JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 9a83e08..216b99a 100644 (file)
@@ -225,10 +225,10 @@ ScopeParser.prototype = {
         var isInObjectLitAr;
         this.scopes.push(scope);
        
-        var scopeIndent = ''; 
-        this.scopes.forEach(function() {
-            scopeIndent += '   '; 
-        });
+        //var scopeIndent = ''; 
+        //this.scopes.forEach(function() {
+        //    scopeIndent += '   '; 
+        //});
         //print(scopeIndent + ">> ENTER SCOPE");
         
         
@@ -323,6 +323,29 @@ ScopeParser.prototype = {
                 case "PUNC.LEFT_CURLY": // {
                     print('SCOPE-CURLY:' + JSON.stringify(token,null,4));
                     //println("<i>"+token.data+"</i>");
+                    
+                    if (token.props) {
+                        var curTS = this.ts;
+                        for (var prop in token.props) {
+                            if (token.props[prop].val.data == 'function') {
+                                // parse a function..
+                                this.parseFunctProp(token.props[prop]);
+                                continue;
+                            }
+                            // key value..
+                            
+                            this.ts = new TokenStream(token.props[prop].val);
+                            this.parseScope(scope);
+                            
+                        }
+                        this.ts = curTS;
+                        
+                        // it's an object literal..
+                        // the values could be replaced..
+                        
+                    }
+                    print("NOT PROPS"); Seed.quit();
+                    
                     isObjectLitAr.push(false);
                     this.braceNesting++;