X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=835aa120c5a0e7f4e91205a123df6cb4efe55bcf;hp=2914d1829abd318d00d25d3de6097b9726dd8632;hb=00de591d3facb154131cfa2bc64a68bbd5b7cbd6;hpb=916df056b7a16402c5258d9f6a3fd0ce865a3ed5 diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 2914d18..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,13 +302,11 @@ ScopeParser.prototype = { var bn = this.braceNesting; var nts = []; while (true) { - var n = this.ts.lookTok(); - print(n.toString()); - if (!n || n.data == ',') { + if (!token || token.type == 'VOID' || token.data == ',') { break; } - nts.push(n); - this.ts.nextTok(); + nts.push(token); + token = this.ts.nextTok(); } if (nts.length) { var TS = this.ts; @@ -428,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; @@ -825,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;