while (token) {
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
//this.dumpToken(token , this.scopes, this.braceNesting);
- print('SCOPE:' + token.toString());
+ //print('SCOPE:' + token.toString());
//this.log(token.data);
if (token.type == 'NAME') {
// print('*' + token.data);
switch(token.type + '.' + token.name) {
case "KEYW.VAR":
case "KEYW.CONST": // not really relivant as it's only mozzy that does this.
-
+ print('SCOPE-VAR:' + token.toString());
var vstart = this.ts.cursor +1;
//this.log("parseScope GOT VAR/CONST : " + token.toString());
break;
case "KEYW.FUNCTION":
+ print('SCOPE-FUNC:' + token.toString());
//println("<i>"+token.data+"</i>");
var bn = this.braceNesting;
this.parseFunctionDeclaration();
break;
case "PUNC.LEFT_CURLY": // {
+ print('SCOPE-CURLY:' + token.toString());
//println("<i>"+token.data+"</i>");
isObjectLitAr.push(false);
this.braceNesting++;
//print(">>>>>> OBJLIT PUSH(false)" + this.braceNesting);
break;
-
+/*
case "PUNC.RIGHT_CURLY": // }
//println("<i>"+token.data+"</i>");
this.braceNesting--;
return;
}
break;
-
+*/
case "KEYW.WITH":
+ print('SCOPE-WITH:' + token.toString());
//println("<i>"+token.data+"</i>");
if (this.mode == "BUILDING_SYMBOL_TREE") {
// Inside a 'with' block, it is impossible to figure out
break;
case "KEYW.CATCH":
+ print('SCOPE-CATCH:' + token.toString());
//println("<i>"+token.data+"</i>");
this.parseCatch();
break;
case "STRN.DOUBLE_QUOTE": // used for object lit detection..
case "STRN.SINGLE_QUOTE":
+ print('SCOPE-STRING:' + token.toString());
//println("<i>"+token.data+"</i>");
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...
break;
case "NAME.NAME":
-
+ print('SCOPE-NAME:' + token.toString());
//print("DEAL WITH NAME:");
// got identifier..
if (token.type != 'KEYW') {
break;
}
+ print('SCOPE-KEYW:' + token.toString());
// print("Check eval:");
symbol = token.data;