X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.js;h=77dd6f7ccf0e072e1b7e8cc0787aca8f8ab37bc5;hb=a699000b68dda9c5248328ba41a86d0e4bdb6ac8;hp=ee8f1c75c7c2d104d6717f0bd04a169a0b0abe8e;hpb=7f3a0ba1ceed67925de215ad5357f3ab7e4526ea;p=gnome.introspection-doc-generator
diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js
index ee8f1c7..77dd6f7 100644
--- a/JSDOC/ScopeParser.js
+++ b/JSDOC/ScopeParser.js
@@ -577,9 +577,9 @@ ScopeParser.prototype = {
//print(scopeIndent + ">> ENTER EXPRESSION" + this.expN);
- while (token = this.ts.lookTok()) {
+ while (token = this.ts.nextTok()) {
-
+
/*
// moved out of loop?
@@ -592,7 +592,7 @@ ScopeParser.prototype = {
*/
//this.dumpToken(token, this.scopes, this.braceNesting );
- //print('EXP' + this.expN + ':' + token.toString());
+ print('EXP' + token.toString());
//println(""+token.data+"");
@@ -608,7 +608,7 @@ ScopeParser.prototype = {
if (this.braceNesting == expressionBraceNesting &&
bracketNesting == 0 &&
parensNesting == 0) {
- print(scopeIndent + "<< EXIT EXPRESSION");
+ print("<< EXIT EXPRESSION");
this.expN--;
return;
}
@@ -631,13 +631,23 @@ ScopeParser.prototype = {
break;
case '[': //Token.LB:
- bracketNesting++;
+
+ var ts = this.ts;
+ var _this = this;
+ token.items.forEach(function(ns) {
+ print("EXPR-PUNC-MAKE:" + JSON.stringify(ns, null, 4));
+ _this.ts = new TokenStream(ns);
+ //_this.ts.cursor--;
+ _this.parseExpression();
+ });
+ this.ts = ts;
+
break;
-
+
case ']': //Token.RB:
- bracketNesting--;
- break;
-
+ return;
+
+
case '(': //Token.LP:
parensNesting++;
break;
@@ -734,7 +744,7 @@ ScopeParser.prototype = {
//println("EID");
- case 'KEYW':
+ case 'KEYW':
print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
if (token.name == "FUNCTION") {
@@ -771,11 +781,13 @@ ScopeParser.prototype = {
}
break;
}
-
+ default:
+ print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
+ break;
}
- if (!this.ts.nextTok()) break;
+
}
- print(scopeIndent + "<< EXIT EXPRESSION");
+ print("<< EXIT EXPRESSION");
this.expN--;
},