log : function(str)
{
- //println("<B>LOG:</B>" + htmlescape(str) + "<BR/>\n");
+ print (" ".substring(0, this.braceNesting) + str);
+
+ //println("<B>LOG:</B>" + htmlescape(str) + "<BR/>\n");
},
logR : function(str)
{
while (token) {
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
- !this.debug|| print(token.type + '.' + token.name+ ":" + token.data);
+ this.log(token.type + '.' + token.name+ ":" + token.data);
if (token.type == 'NAME') {
- print('*' + token.data);
+ // print('*' + token.data);
}
switch(token.type + '.' + token.name) {
case "KEYW.VAR":
isObjectLitAr.push(false);
this.braceNesting++;
- print(">>>>>> OBJLIT PUSH(false)" + this.braceNesting);
+ //print(">>>>>> OBJLIT PUSH(false)" + this.braceNesting);
break;
case "PUNC.RIGHT_CURLY": // }
//println("<i>"+token.data+"</i>");
this.braceNesting--;
isObjectLitAr.pop();
- print(">>>>>> OBJLIT POP"+ this.braceNesting);
+ //print(">>>>>> OBJLIT POP"+ this.braceNesting);
//assert braceNesting >= scope.getBra ceNesting();
if (this.braceNesting < 0) {
var ls = this.scopes.pop();
ls.getUsedSymbols();
- print("<<<<<<<EXIT SCOPE" +this.scopes.length);
+ //print("<<<<<<<EXIT SCOPE" +this.scopes.length);
return;
}
break;
// then we are in an object lit.. -> we need to flag the brace as such...
isObjectLitAr.pop();
isObjectLitAr.push(true);
- print(">>>>>> OBJLIT REPUSH(true)");
+ //print(">>>>>> OBJLIT REPUSH(true)");
}
isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
if ((this.ts.lookTok(-1).data == "{") && (this.ts.lookTok(1).data == ":")) {
isObjectLitAr.pop();
isObjectLitAr.push(true);
- print(">>>>>> OBJLIT REPUSH(true)");
+ //print(">>>>>> OBJLIT REPUSH(true)");
//println("<i>"+token.data+"</i>");
break;
}
isObjectLitAr.push(false);
this.braceNesting++;
- print(">>>>> EXP PUSH(false)"+this.braceNesting);
+ ///print(">>>>> EXP PUSH(false)"+this.braceNesting);
break;
case '}': //Token.RC:
this.braceNesting--;
isObjectLitAr.pop();
- print(">>>>> EXP POP" + this.braceNesting);
+ //print(">>>>> EXP POP" + this.braceNesting);
// assert braceNesting >= expressionBraceNesting;
break;
// then we are in an object lit.. -> we need to flag the brace as such...
isObjectLitAr.pop();
isObjectLitAr.push(true);
- print(">>>>> EXP PUSH(true)");
+ //print(">>>>> EXP PUSH(true)");
}
// then we are in an object lit.. -> we need to flag the brace as such...
isObjectLitAr.pop();
isObjectLitAr.push(true);
- print(">>>>> EXP PUSH(true)");
+ //print(">>>>> EXP PUSH(true)");
break;
}
isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];