X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=835aa120c5a0e7f4e91205a123df6cb4efe55bcf;hp=1b0aca05dd93d0896845ceabd5c21872a52550a8;hb=00de591d3facb154131cfa2bc64a68bbd5b7cbd6;hpb=2183921647581416d5e16670143ed1198bf14579
diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js
index 1b0aca0..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, '');
@@ -300,7 +300,21 @@ ScopeParser.prototype = {
} else {
//var bn = this.braceNesting;
var bn = this.braceNesting;
- this.parseExpression();
+ var nts = [];
+ while (true) {
+ if (!token || token.type == 'VOID' || token.data == ',') {
+ break;
+ }
+ nts.push(token);
+ token = this.ts.nextTok();
+ }
+ if (nts.length) {
+ var TS = this.ts;
+ this.ts = new TokenStream(nts);
+ this.parseExpression();
+ this.ts = TS;
+ }
+
this.braceNesting = bn;
//this.braceNesting = bn;
//this.logR("parseScope DONE : ParseExpression - tok is:" + this.ts.lookT(0).toString());
@@ -412,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;
@@ -809,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;