JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index b77f6ee..a20c596 100644 (file)
@@ -348,7 +348,7 @@ ScopeParser.prototype = {
                             // key value..
                             
                             this.ts = new TokenStream(token.props[prop].val);
-                            this.parseScope(false);
+                            this.parseExpression();
                             
                         }
                         this.ts = curTS;
@@ -627,21 +627,24 @@ ScopeParser.prototype = {
                         case '(': //Token.LP:
                         case '{': //Token.LC:
                         case '[': //Token.LB:
-                            //print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
+                            print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
+                           // print('SCOPE-CURLY/PAREN/BRACE:' + JSON.stringify(token, null,4));
                             //println("<i>"+token.data+"</i>");
                             var curTS = this.ts;
                             if (token.props) {
                                 
                                 for (var prop in token.props) {
-                                    if (token.props[prop].val.data == 'function') {
+                                    if (token.props[prop].val[0].data == 'function') {
                                         // parse a function..
-                                        this.parseFunctProp(token.props[prop]);
+                                        this.ts = new TokenStream(token.props[prop].val);
+                                        this.ts.nextTok();
+                                        this.parseFunctionDeclaration();
                                         continue;
                                     }
                                     // key value..
                                     
                                     this.ts = new TokenStream(token.props[prop].val);
-                                    this.parseScope(false);
+                                    this.parseExpression();
                                     
                                 }
                                 this.ts = curTS;
@@ -858,7 +861,7 @@ ScopeParser.prototype = {
 
         //assert token.getType() == Token.LP;
         if (this.mode == 'BUILDING_SYMBOL_TREE') {
-            fnScope = new Scope(1, currentScope, token.n, '');
+            fnScope = new Scope(1, currentScope, token.n, '', token);
             
             //println("STORING SCOPE" + this.ts.cursor);