X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=2e488634c728e26f4beb8463d65e6853593c6759;hp=ccb0acf9906ad6758b6beb710ceddd97a7d44a81;hb=464eb562cca9995e9a9988d5218ac94dbe3f0576;hpb=20d93120c51a8996942ec6f3707fce12f5a537ae diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index ccb0acf..2e48863 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -258,7 +258,7 @@ ScopeParser.prototype = { while (true) { token = this.ts.nextTok(); //!this.debug|| print( token.toString()); - print('SCOPE-VAR-VAL:' + JSON.stringify(token, null, 4)); + //print('SCOPE-VAR-VAL:' + JSON.stringify(token, null, 4)); if (!token) { // can return false at EOF! break; } @@ -828,7 +828,7 @@ ScopeParser.prototype = { //assert token.getType() == Token.CATCH; token = this.ts.nextTok(); - print(JSON.stringify(token,null,4)); + //print(JSON.stringify(token,null,4)); //assert token.getType() == Token.LP; ( //token = this.ts.nextTok(); //assert token.getType() == Token.NAME; @@ -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.data != "(") { token = this.ts.nextTok(); } + + //assert token.getType() == Token.LP; if (this.mode == 'BUILDING_SYMBOL_TREE') { fnScope = new Scope(1, currentScope, token.n, '', token); @@ -896,7 +895,7 @@ ScopeParser.prototype = { fnScope = this.indexedScopes[token.id]; } //if (this.mode == 'BUILDING_SYMBOL_TREE') - // print('FUNC-PARSE:' + JSON.stringify(token,null,4)); + print('FUNC-PARSE:' + JSON.stringify(token,null,4)); // Parse function arguments. var args = token.items; for (var argpos =0; argpos < args.length; argpos++) {