X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FWalker2.js;h=119c84a41fba53f5ff98cd3339b27c404dfc4bf2;hb=804fe382b0c736b7f41bcfdc70b6378e9dfcad07;hp=e276aa92cea6e018cc4d306fbe654e00de249f31;hpb=4293c4e3233cc71fc96bc57270e2f5101530e9b2;p=gnome.introspection-doc-generator diff --git a/JSDOC/Walker2.js b/JSDOC/Walker2.js index e276aa9..119c84a 100644 --- a/JSDOC/Walker2.js +++ b/JSDOC/Walker2.js @@ -259,7 +259,7 @@ Walker2 = XObject.define( this.ts.lookT(4).type == 'NAME' && this.ts.lookT(5).data == ',' && this.ts.lookT(6).data == '{' - } + ) { // ignore test for ( a and , this.ts.nextT(); /// ( @@ -544,9 +544,9 @@ Walker2 = XObject.define( //print("checking for : function() {"); //print( [this.ts.lookT(-3).type , this.ts.lookT(-2).type , this.ts.lookT(-1).type ].join(":")); if ( - (this.ts.lookT(-1).tokN == Script.TOKcolon) && - (this.ts.lookT(-2).tokN == Script.TOKidentifier) && - (this.ts.lookT(-3).tokN == Script.TOKlbrace || this.ts.lookT(-3).tokN == Script.TOKcomma) + (this.ts.lookT(-1).data == ':') && + (this.ts.lookT(-2).type == 'NAME') && + (this.ts.lookT(-3).data == '(' || this.ts.lookT(-3).data== ',') ) { //print("got for : function() {"); @@ -571,10 +571,10 @@ Walker2 = XObject.define( //$this$=foo if ( - (this.ts.lookT(1).tokN == Script.TOKidentifier) + (this.ts.lookT(1).type == 'NAME') ) { //scopeName = this.ts.look(-3).data; - this.ts.balanceN(Script.TOKlparen); + this.ts.balanceN('('); token = this.ts.nextT(); // should be { var fnScope = new Scope(this.braceNesting, scope, token.n, ''); @@ -595,14 +595,14 @@ Walker2 = XObject.define( if ( // (this.ts.lookT(-1).tokN == Script.TOKlparen) && - (this.ts.lookT(1).tokN != Script.TOKidentifier) + (this.ts.lookT(1).name != 'NAME') // (this.ts.lookT(-2).tokN == Script.TOKnew) && // (this.ts.lookT(-3).tokN == Script.TOKassign) && // (this.ts.lookT(-4).tokN == Script.TOKidentifier) ) { //scopeName = this.ts.look(-3).data; - this.ts.balanceN(Script.TOKlparen); + this.ts.balanceN('('); token = this.ts.nextT(); // should be { var fnScope = new Scope(this.braceNesting, scope, token.n, '$private$'); this.indexedScopes[this.ts.cursor] = fnScope; @@ -627,16 +627,16 @@ Walker2 = XObject.define( } // end checking for TOKfunction - if (token.tokN == Script.TOKlbrace) { + if (token.data == '{') { // foo = { // !var!!! //$this$=foo|Foo if ( - (this.ts.lookT(-1).tokN == Script.TOKassign) && - (this.ts.lookT(-2).tokN == Script.TOKidentifier) && - (this.ts.lookT(-3).tokN != Script.TOKvar) + (this.ts.lookT(-1).data == '=') && + (this.ts.lookT(-2).type == 'NAME') && + (this.ts.lookT(-3).nane != 'VAR') ) { scopeName = this.ts.look(-2).data; @@ -658,9 +658,9 @@ Walker2 = XObject.define( //print("GOT LBRACE : check for :"); if ( - (this.ts.lookT(-1).tokN == Script.TOKcolon) && - (this.ts.lookT(-2).tokN == Script.TOKidentifier) && - (this.ts.lookT(-3).tokN != Script.TOKvar) + (this.ts.lookT(-1).data == ':') && + (this.ts.lookT(-2).type == 'NAME') && + (this.ts.lookT(-3).name != 'VAR') ) { scopeName = this.ts.lookT(-2).data; @@ -684,7 +684,7 @@ Walker2 = XObject.define( continue; } - if (token.tokN == Script.TOKrbrace) { + if (token.data == '{') { if (this.currentDoc) {