From b016be4d13f36506590452924f634956dbe6d730 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 6 Jul 2010 18:05:03 +0800 Subject: [PATCH] JSDOC/Walker2.js --- JSDOC/Walker2.js | 110 +++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/JSDOC/Walker2.js b/JSDOC/Walker2.js index 7d8ec5b..4e2e650 100644 --- a/JSDOC/Walker2.js +++ b/JSDOC/Walker2.js @@ -221,16 +221,16 @@ Walker2 = XObject.define( if (token.name == 'VAR' && - this.ts.lookT(1).type == 'NAME' && - this.ts.lookT(2).data == '-' && - this.ts.lookT(3).type == 'NAME' && - this.ts.lookT(4).data == ';' + this.ts.lookTok(1).type == 'NAME' && + this.ts.lookTok(2).data == '-' && + this.ts.lookTok(3).type == 'NAME' && + this.ts.lookTok(4).data == ';' ) { - //print("SET ALIAS:" + this.ts.lookT(1).data +'=' + this.ts.lookT(3).data); + //print("SET ALIAS:" + this.ts.lookTok(1).data +'=' + this.ts.lookTok(3).data); - aliases[this.ts.lookT(1).data] = this.ts.lookT(3).data; + aliases[this.ts.lookTok(1).data] = this.ts.lookTok(3).data; } @@ -253,12 +253,12 @@ Walker2 = XObject.define( if (/\.extend$/.test(token.data) && - this.ts.lookT(1).data == '(' && - this.ts.lookT(2).type == 'NAME' && - this.ts.lookT(3).data == ',' && - this.ts.lookT(4).type == 'NAME' && - this.ts.lookT(5).data == ',' && - this.ts.lookT(6).data == '{' + this.ts.lookTok(1).data == '(' && + this.ts.lookTok(2).type == 'NAME' && + this.ts.lookTok(3).data == ',' && + this.ts.lookTok(4).type == 'NAME' && + this.ts.lookTok(5).data == ',' && + this.ts.lookTok(6).data == '{' ) { // ignore test for ( a and , @@ -294,15 +294,15 @@ Walker2 = XObject.define( // a = Roo.extend(parentname, { if (/\.extend$/.test(token.data) && - this.ts.lookT(-2).type == 'NAME' && - this.ts.lookT(-1).data == '=' && - this.ts.lookT(1).data == '(' && - this.ts.lookT(2).type == 'NAME' && - this.ts.lookT(3).data == ',' && - this.ts.lookT(4).data == '{' + this.ts.lookTok(-2).type == 'NAME' && + this.ts.lookTok(-1).data == '=' && + this.ts.lookTok(1).data == '(' && + this.ts.lookTok(2).type == 'NAME' && + this.ts.lookTok(3).data == ',' && + this.ts.lookTok(4).data == '{' ) { // ignore test for ( a and , - token = this.ts.lookT(-2); + token = this.ts.lookTok(-2); scopeName = token.data; if (this.currentDoc) { this.addSymbol(scopeName,false,'OBJECT'); @@ -332,10 +332,10 @@ Walker2 = XObject.define( // apply ( XXXX, { if (/\.(applyIf|apply)$/.test(token.data) && - this.ts.lookT(1).data == '(' && - this.ts.lookT(2).type == 'NAME' && - this.ts.lookT(3).data == ',' && - this.ts.lookT(4).data == '{' + this.ts.lookTok(1).data == '(' && + this.ts.lookTok(2).type == 'NAME' && + this.ts.lookTok(3).data == ',' && + this.ts.lookTok(4).data == '{' ) { this.ts.nextT(); /// ( @@ -371,11 +371,11 @@ Walker2 = XObject.define( // change scope to xxxx - if ( this.ts.lookT(1).data == '=' && - this.ts.lookT(2).name == 'NEW' && - this.ts.lookT(3).type == 'NAME' && - this.ts.lookT(4).data == '(' && - this.ts.lookT(5).data == '{' + if ( this.ts.lookTok(1).data == '=' && + this.ts.lookTok(2).name == 'NEW' && + this.ts.lookTok(3).type == 'NAME' && + this.ts.lookTok(4).data == '(' && + this.ts.lookTok(5).data == '{' ) { scopeName = token.data; if (this.currentDoc) { @@ -432,16 +432,16 @@ Walker2 = XObject.define( // ident = function () var atype = 'OBJECT'; - if (((this.ts.lookT(1).data == ':' )|| (this.ts.lookT(1).data == '=')) && - (this.ts.lookT(2).name == "FUNCTION") + if (((this.ts.lookTok(1).data == ':' )|| (this.ts.lookTok(1).data == '=')) && + (this.ts.lookTok(2).name == "FUNCTION") ) { atype = 'FUNCTION'; } - //print("ADD SYM:" + atype + ":" + token.toString() + this.ts.lookT(1).toString() + this.ts.lookT(2).toString()); + //print("ADD SYM:" + atype + ":" + token.toString() + this.ts.lookTok(1).toString() + this.ts.lookTok(2).toString()); this.addSymbol( - this.ts.lookT(-1).tokN == Script.TOKdot ? token.data : fixAlias(token.data), + this.ts.lookTok(-1).tokN == Script.TOKdot ? token.data : fixAlias(token.data), false, atype); @@ -481,10 +481,10 @@ Walker2 = XObject.define( //$this$=foo.prototype|$private$|foo.prototype if ( - (this.ts.lookT(-1).data == '=') && - (this.ts.lookT(-2).type == 'NAME') + (this.ts.lookTok(-1).data == '=') && + (this.ts.lookTok(-2).type == 'NAME') ) { - scopeName = this.ts.lookT(-2).data; + scopeName = this.ts.lookTok(-2).data; this.ts.balanceN('('); token = this.ts.nextT(); // should be { //print("FOO=FUNCITON() {}" + this.ts.context() + "\n" + token.toString()); @@ -513,9 +513,9 @@ Walker2 = XObject.define( //$private$ if ( - (this.ts.lookT(-1).name == 'NEW') && - (this.ts.lookT(-2).data == '=') && - (this.ts.lookT(-3).type = 'FUNCTION') + (this.ts.lookTok(-1).name == 'NEW') && + (this.ts.lookTok(-2).data == '=') && + (this.ts.lookTok(-3).type = 'FUNCTION') ) { //scopeName = this.ts.look(-3).data; this.ts.balanceN(Script.TOKlparen); @@ -542,11 +542,11 @@ Walker2 = XObject.define( // no change to scoping.. //print("checking for : function() {"); - //print( [this.ts.lookT(-3).type , this.ts.lookT(-2).type , this.ts.lookT(-1).type ].join(":")); + //print( [this.ts.lookTok(-3).type , this.ts.lookTok(-2).type , this.ts.lookTok(-1).type ].join(":")); if ( - (this.ts.lookT(-1).data == ':') && - (this.ts.lookT(-2).type == 'NAME') && - (this.ts.lookT(-3).data == '(' || this.ts.lookT(-3).data== ',') + (this.ts.lookTok(-1).data == ':') && + (this.ts.lookTok(-2).type == 'NAME') && + (this.ts.lookTok(-3).data == '(' || this.ts.lookTok(-3).data== ',') ) { //print("got for : function() {"); @@ -571,7 +571,7 @@ Walker2 = XObject.define( //$this$=foo if ( - (this.ts.lookT(1).type == 'NAME') + (this.ts.lookTok(1).type == 'NAME') ) { //scopeName = this.ts.look(-3).data; this.ts.balanceN('('); @@ -594,12 +594,12 @@ Walker2 = XObject.define( // RETURN function(...) { if ( - // (this.ts.lookT(-1).tokN == Script.TOKlparen) && - (this.ts.lookT(1).name != 'NAME') + // (this.ts.lookTok(-1).tokN == Script.TOKlparen) && + (this.ts.lookTok(1).name != 'NAME') - // (this.ts.lookT(-2).tokN == Script.TOKnew) && - // (this.ts.lookT(-3).tokN == Script.TOKassign) && - // (this.ts.lookT(-4).tokN == Script.TOKidentifier) + // (this.ts.lookTok(-2).tokN == Script.TOKnew) && + // (this.ts.lookTok(-3).tokN == Script.TOKassign) && + // (this.ts.lookTok(-4).tokN == Script.TOKidentifier) ) { //scopeName = this.ts.look(-3).data; this.ts.balanceN('('); @@ -634,9 +634,9 @@ Walker2 = XObject.define( if ( - (this.ts.lookT(-1).data == '=') && - (this.ts.lookT(-2).type == 'NAME') && - (this.ts.lookT(-3).nane != 'VAR') + (this.ts.lookTok(-1).data == '=') && + (this.ts.lookTok(-2).type == 'NAME') && + (this.ts.lookTok(-3).nane != 'VAR') ) { scopeName = this.ts.look(-2).data; @@ -658,12 +658,12 @@ Walker2 = XObject.define( //print("GOT LBRACE : check for :"); if ( - (this.ts.lookT(-1).data == ':') && - (this.ts.lookT(-2).type == 'NAME') && - (this.ts.lookT(-3).name != 'VAR') + (this.ts.lookTok(-1).data == ':') && + (this.ts.lookTok(-2).type == 'NAME') && + (this.ts.lookTok(-3).name != 'VAR') ) { - scopeName = this.ts.lookT(-2).data; + scopeName = this.ts.lookTok(-2).data; scopeName = fixAlias(scopeName); var fnScope = new Scope(this.braceNesting, scope, token.n, scopeName); this.indexedScopes[this.ts.cursor] = fnScope; -- 2.39.2