From: alan Date: Mon, 19 Apr 2010 09:47:50 +0000 (+0800) Subject: JSDOC/ScopeParser.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=ce6a4df71885ea2fa4bebd63bdf0caadb4acf8a7 JSDOC/ScopeParser.js --- diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 4242ec6..a412508 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -582,8 +582,8 @@ ScopeParser.prototype = { case 'NAME': symbol = token.data; - this.ts.nextTok(); - if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":") { + + if (this.ts.look(0).data == "{" && this.ts.lookTok(2).data == ":") { // then we are in an object lit.. -> we need to flag the brace as such... isObjectLitAr.pop(); isObjectLitAr.push(true); @@ -591,11 +591,11 @@ ScopeParser.prototype = { break; } isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1]; - if (isInObjectLitAr && this.ts.lookTok(-1).data == "," && this.ts.lookTok(1).data == ":") { + if (isInObjectLitAr && this.ts.lookTok(0).data == "," && this.ts.lookTok(2).data == ":") { break; } - print(this.ts.lookTok(-1).data); - if (this.ts.lookTok(-1).data == ".") { + print(this.ts.lookTok(0).data); + if (this.ts.lookTok(0).data == ".") { //skip '.' break; }