From f04ff0bcf89e08e647194346caec8e9d213145d6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 15 Jul 2010 16:14:33 +0800 Subject: [PATCH] JSDOC/ScopeParser.js --- JSDOC/ScopeParser.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 4479462..538957c 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -234,7 +234,7 @@ ScopeParser.prototype = { //this.scopes.forEach(function() { // scopeIndent += ' '; //}); - print(">> ENTER SCOPE"); + //print(">> ENTER SCOPE"); @@ -243,7 +243,7 @@ ScopeParser.prototype = { while (token) { // this.timerPrint("parseScope AFTER lookT: " + token.toString()); //this.dumpToken(token , this.scopes, this.braceNesting); - print('SCOPE:' + token.toString()); + //print('SCOPE:' + token.toString()); //this.log(token.data); if (token.type == 'NAME') { // print('*' + token.data); @@ -251,14 +251,14 @@ ScopeParser.prototype = { switch(token.type + '.' + token.name) { case "KEYW.VAR": case "KEYW.CONST": // not really relivant as it's only mozzy that does this. - print('SCOPE-VAR:' + token.toString()); + //print('SCOPE-VAR:' + token.toString()); var vstart = this.ts.cursor +1; //this.log("parseScope GOT VAR/CONST : " + token.toString()); while (true) { token = this.ts.nextTok(); //!this.debug|| print( token.toString()); - print('SCOPE-VAR-VAL:' + token.toString()); + //print('SCOPE-VAR-VAL:' + token.toString()); if (!token) { // can return false at EOF! break; } @@ -318,8 +318,8 @@ ScopeParser.prototype = { break; case "KEYW.FUNCTION": - if (this.mode == 'BUILDING_SYMBOL_TREE') - print('SCOPE-FUNC:' + JSON.stringify(token,null,4)); + //if (this.mode == 'BUILDING_SYMBOL_TREE') + // print('SCOPE-FUNC:' + JSON.stringify(token,null,4)); //println(""+token.data+""); var bn = this.braceNesting; this.parseFunctionDeclaration(); @@ -328,7 +328,7 @@ ScopeParser.prototype = { case "PUNC.LEFT_CURLY": // { case "PUNC.LEFT_PAREN": // ( - print('SCOPE-CURLY/PAREN:' + token.toString()); + //print('SCOPE-CURLY/PAREN:' + token.toString()); //println(""+token.data+""); var curTS = this.ts; if (token.props) { @@ -374,7 +374,7 @@ ScopeParser.prototype = { break; case "PUNC.RIGHT_CURLY": // } - print("<< EXIT SCOPE"); + //print("<< EXIT SCOPE"); return; /* //println(""+token.data+""); @@ -397,7 +397,7 @@ ScopeParser.prototype = { break; */ case "KEYW.WITH": - print('SCOPE-WITH:' + token.toString()); + //print('SCOPE-WITH:' + token.toString()); //println(""+token.data+""); if (this.mode == "BUILDING_SYMBOL_TREE") { // Inside a 'with' block, it is impossible to figure out @@ -411,7 +411,7 @@ ScopeParser.prototype = { break; case "KEYW.CATCH": - print('SCOPE-CATCH:' + token.toString()); + //print('SCOPE-CATCH:' + token.toString()); //println(""+token.data+""); this.parseCatch(); break; @@ -711,7 +711,7 @@ ScopeParser.prototype = { print("EXPR-NAME:" + JSON.stringify(token, null, 4)); } else { print("EXPR-NAME:" + token.toString()); - } + } symbol = token.data; //print("in NAME = " + token.toString()); //print("in NAME 0: " + this.ts.look(0).toString()); @@ -819,10 +819,10 @@ ScopeParser.prototype = { //assert token.getType() == Token.CATCH; token = this.ts.nextTok(); //assert token.getType() == Token.LP; ( - token = this.ts.nextTok(); + //token = this.ts.nextTok(); //assert token.getType() == Token.NAME; - symbol = token.data; + symbol = token.items[0].data; currentScope = this.scopes[this.scopes.length-1]; if (this.mode == 'BUILDING_SYMBOL_TREE') { -- 2.39.2