X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=835aa120c5a0e7f4e91205a123df6cb4efe55bcf;hp=81e39d81be1a746e15db3ee5a68130c338166774;hb=00de591d3facb154131cfa2bc64a68bbd5b7cbd6;hpb=6a2affe14a8b2d95852fcf3a5ace4b394eb4b560 diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 81e39d8..835aa12 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -141,7 +141,7 @@ ScopeParser.prototype = { this.braceNesting = 0; this.scopes = []; - print(JSON.stringify(this.ts.tokens, null,4)); + //print(JSON.stringify(this.ts.tokens, null,4)); this.globalScope = new Scope(-1, false, -1, ''); @@ -302,11 +302,11 @@ ScopeParser.prototype = { var bn = this.braceNesting; var nts = []; while (true) { - var n = this.ts.nextTok(); - if (n.data == ',') { + if (!token || token.type == 'VOID' || token.data == ',') { break; } - nts.push(n); + nts.push(token); + token = this.ts.nextTok(); } if (nts.length) { var TS = this.ts; @@ -426,7 +426,7 @@ ScopeParser.prototype = { break; case "KEYW.CATCH": - //print('SCOPE-CATCH:' + token.toString()); + print('SCOPE-CATCH:' + token.toString()); //println(""+token.data+""); this.parseCatch(); break; @@ -823,10 +823,11 @@ ScopeParser.prototype = { var token; var currentScope; var identifier; - + //token = getToken(-1); //assert token.getType() == Token.CATCH; token = this.ts.nextTok(); + print(token.toString()); //assert token.getType() == Token.LP; ( //token = this.ts.nextTok(); //assert token.getType() == Token.NAME;