From: Alan Knowles Date: Wed, 4 Aug 2010 02:51:52 +0000 (+0800) Subject: JSDOC/ScopeParser.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=e5ee64fee7547445cff428eecac8ba2032b058f6 JSDOC/ScopeParser.js --- diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 8a3f330..ed51371 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -172,7 +172,7 @@ ScopeParser.prototype = { this.parseScope(this.globalScope); - this.globalScope.dump(); + //this.globalScope.dump(); this.globalScope.munge(); @@ -239,7 +239,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; } @@ -301,7 +301,8 @@ ScopeParser.prototype = { //this.logR("parseScope DONE : ParseExpression - tok is:" + this.ts.lookT(0).toString()); token = this.ts.lookTok(1); - !this.debug|| print("AFTER EXP: " + token.toString()); + //!this.debug|| + // print("AFTER EXP: " + token.toString()); if (token.data == ';') { break; } @@ -359,8 +360,14 @@ ScopeParser.prototype = { var _this = this; token.items.forEach(function(expr) { - _this.ts = new TokenStream(expr); - _this.parseExpression(scope) + //print(JSON.stringify(expr, null,4)); + _this.ts = new TokenStream(expr); + //if (curTS.data == '(') { + _this.parseScope(scope) + //} else { + // _this.parseExpression(scope) + //} + }); this.ts = curTS; //print("NOT PROPS"); Seed.quit(); @@ -486,7 +493,7 @@ ScopeParser.prototype = { if (token.name == "EVAL") { - //print(JSON.stringify(token, null,4)); + print(JSON.stringify(token, null,4)); // look back one and see if we can find a comment!!! //if (this.ts.look(-1).type == "COMM") { if (token.prefix && token.prefix.match(/eval/)) { @@ -575,7 +582,7 @@ ScopeParser.prototype = { */ //this.dumpToken(token, this.scopes, this.braceNesting ); - //print('EXPR' + token.toString()); + //print('EXPR' + token.toString()); //println(""+token.data+""); @@ -737,13 +744,12 @@ ScopeParser.prototype = { break; } - - + symbol = token.data; if (this.mode == 'BUILDING_SYMBOL_TREE') { if (token.name == "EVAL") { - //print(JSON.stringify(token,null,4)); + print(JSON.stringify(token,null,4)); if (token.prefix && token.prefix.match(/eval:var:/g)) { // look for eval:var:noreplace\n // print("GOT MATCH?"); @@ -793,9 +799,11 @@ ScopeParser.prototype = { //token = getToken(-1); //assert token.getType() == Token.CATCH; - token = this.ts.nextTok(); + token = this.ts.nextTok(1); + token = this.ts.nextTok(1); + - //print(JSON.stringify(token,null,4)); + //print(JSON.stringify(this.ts,null,4)); //assert token.getType() == Token.LP; ( //token = this.ts.nextTok(); //assert token.getType() == Token.NAME; @@ -847,7 +855,7 @@ ScopeParser.prototype = { // return function() {.... while (token.data != "(") { - print(token.toString()); + //print(token.toString()); token = this.ts.nextTok();