var isObjectLitAr = [ false ];
this.scopes.push(scope);
- token = this.ts.lookTok();
+ token = this.ts.lookTok(1);
while (token) {
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
- //println("START<i>"+token.data+"</i>");
+ print(token.type + '.' + token.name+ ":" + token.data);
switch(token.type + '.' + token.name) {
case "KEYW.VAR":
case "KEYW.CONST": // not really relivant as it's only mozzy that does this.
token.getType() == Token.COMMA ||
token.getType() == Token.IN;
*/
- if (token.name == "IN")) {
+ if (token.name == "IN") {
break;
} else {
this.parseExpression();
default:
- if ((token.type != "NAME") && (token.type != "KEYW"){
+ if ((token.type != "NAME") && (token.type != "KEYW")){
break;
}
+ print("DEAL WITH NAME:");
// got identifier..
// look for { ** : <- indicates obj literal.. ** this could occur with numbers ..
//println("<i>"+token.data+"</i>");
break;
}
+ print("DEAL WITH obj lit:");
var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
if (isInObjectLitAr && (this.ts.lookTok(1).data == ":") && (this.ts.lookTok(-1).data == ",")) {
// skip anyting with "." before it..!!
-
- if (this.ts.lookTok(-1).data(".")) {
+
+ if (this.ts.lookTok(-1).data == ".") {
// skip, it's an object prop.
//println("<i>"+token.data+"</i>");
break;
//println("<B>SID</B>");
-
+ print("Check eval:");
symbol = token.data;
var isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
- if (isInObjectLitAr && this.ts.lookTok(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..
}
return false;
}
-});
\ No newline at end of file
+};
\ No newline at end of file