From: alan Date: Mon, 19 Apr 2010 04:48:02 +0000 (+0800) Subject: JSDOC/ScopeParser.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=658468f4c7b92b3d59bbcd9d836565e08eee76b2 JSDOC/ScopeParser.js --- diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index bee211f..e281d9c 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -252,7 +252,7 @@ ScopeParser.prototype = { //this.logR("parseScope DONE : ParseExpression - tok is:" + this.ts.lookT(0).toString()); - if (this.ts.look(0).data == ';') { + if (this.ts.lookTok(0).data == ';') { break; } } @@ -310,15 +310,15 @@ ScopeParser.prototype = { case "STRN.DOUBLE_QUOTE": // used for object lit detection.. case "STRN.SINGLE_QUOTE": //println(""+token.data+""); - if (this.ts.look(-1).data == '{' && this.ts.look(1).data == ':') { + if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') { // then we are in an object lit.. -> we need to flag the brace as such... isObjectLitAr.pop(); isObjectLitAr.push(true); } var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1]; - if (isInObjectLitAr && this.ts.look(1).data == ':' && - ( this.ts.look(-1).data == '{' || this.ts.look(-1).data == ':' )) { + if (isInObjectLitAr && this.ts.lookTok(1).data == ':' && + ( this.ts.lookTok(-1).data == '{' || this.ts.lookTok(-1).data == ':' )) { // see if we can replace.. // remove the quotes.. // should do a bit more checking!!!! (what about wierd char's in the string.. @@ -343,7 +343,7 @@ ScopeParser.prototype = { // got identifier.. // look for { ** : <- indicates obj literal.. ** this could occur with numbers .. - if ((this.ts.look(-1).data == "{") && (this.ts.look(1).data == ":")) { + if ((this.ts.lookTok(-1).data == "{") && (this.ts.lookTok(1).data == ":")) { isObjectLitAr.pop(); isObjectLitAr.push(true); //println(""+token.data+""); @@ -351,7 +351,7 @@ ScopeParser.prototype = { } var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1]; - if (isInObjectLitAr && (this.ts.look(1).data == ":") && (this.ts.look(-1).data == ",")) { + if (isInObjectLitAr && (this.ts.lookTok(1).data == ":") && (this.ts.lookTok(-1).data == ",")) { // skip, it's an object lit key.. //println(""+token.data+""); break; @@ -360,7 +360,7 @@ ScopeParser.prototype = { // skip anyting with "." before it..!! - if (this.ts.look(-1).data(".")) { + if (this.ts.lookTok(-1).data(".")) { // skip, it's an object prop. //println(""+token.data+""); break; @@ -459,7 +459,7 @@ ScopeParser.prototype = { var parensNesting = 0; var isObjectLitAr = [ false ]; - while (token = this.ts.look()) { + while (token = this.ts.lookTok()) { @@ -514,7 +514,7 @@ ScopeParser.prototype = { switch(token.type) { case 'STRN': // used for object lit detection.. - if (this.ts.look(-1).data == "{" && this.ts.look(1).data == ":" ) { + if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":" ) { // then we are in an object lit.. -> we need to flag the brace as such... isObjectLitAr.pop(); isObjectLitAr.push(true); @@ -523,8 +523,8 @@ ScopeParser.prototype = { var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1]; - if (isInObjectLitAr && this.ts.look(1).data = ":" && - ( this.ts.look(-1).data == "{" || this.ts.look(-1).data == "," )) { + if (isInObjectLitAr && this.ts.lookTok(1).data = ":" && + ( this.ts.lookTok(-1).data == "{" || this.ts.lookTok(-1).data == "," )) { // see if we can replace.. // remove the quotes.. var str = token.data.substring(1,token.data.length-1); @@ -551,18 +551,18 @@ ScopeParser.prototype = { case 'NAME': case 'KEYW': symbol = token.data; - if (this.ts.look(-1).data == "{" && this.ts.look(1).data == ":") { + if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":") { // then we are in an object lit.. -> we need to flag the brace as such... isObjectLitAr.pop(); isObjectLitAr.push(true); break; } var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1]; - if (isInObjectLitAr && this.ts.look(-1).data == "," && this.ts.look(1).data == ":") { + if (isInObjectLitAr && this.ts.lookTok(-1).data == "," && this.ts.lookTok(1).data == ":") { break; } - if (this.ts.look(-1).data == ".") { + if (this.ts.lookTok(-1).data == ".") { //skip '.' break; } @@ -701,7 +701,7 @@ ScopeParser.prototype = { // Parse function arguments. var argpos = 0; - while (!this.ts.look().data == ')') { //(token = consumeToken()).getType() != Token.RP) { + while (!this.ts.lookTok().data == ')') { //(token = consumeToken()).getType() != Token.RP) { token = this.ts.nextTok(); //assert token.getType() == Token.NAME || @@ -722,7 +722,7 @@ ScopeParser.prototype = { this.braceNesting++; token = this.ts.nextTok(); - if (token.type == "STRN" && this.ts.look(1).data == ';') { + if (token.type == "STRN" && this.ts.lookTok(1).data == ';') { /* NOT SUPPORTED YET!?!!?!