JSDOC/ScopeParser.js
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.js
index 5ecc388..900c01d 100644 (file)
@@ -877,12 +877,11 @@ ScopeParser.prototype = {
             token =  this.ts.nextTok();
         }
         // return function() {.... 
-        if (token.name == "RETURN") {
-            token =  this.ts.nextTok();
-        }
-        if (token.name == "FUNCTION") {
+        while (token.name != "FUNCTION") {
             token =  this.ts.nextTok();
         }
+        token =  this.ts.nextTok();
+        
         //assert token.getType() == Token.LP;
         if (this.mode == 'BUILDING_SYMBOL_TREE') {
             fnScope = new Scope(1, currentScope, token.n, '', token);