//this.scopes.forEach(function() {
// scopeIndent += ' ';
//});
- print(">> ENTER SCOPE");
+ //print(">> ENTER SCOPE");
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());
+ //print('SCOPE-VAR:' + token.toString());
var vstart = this.ts.cursor +1;
//this.log("parseScope GOT VAR/CONST : " + token.toString());
while (true) {
token = this.ts.nextTok();
//!this.debug|| print( token.toString());
- print('SCOPE-VAR-VAL:' + token.toString());
+ //print('SCOPE-VAR-VAL:' + token.toString());
if (!token) { // can return false at EOF!
break;
}
break;
case "KEYW.FUNCTION":
- if (this.mode == 'BUILDING_SYMBOL_TREE')
- print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
+ //if (this.mode == 'BUILDING_SYMBOL_TREE')
+ // print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
//println("<i>"+token.data+"</i>");
var bn = this.braceNesting;
this.parseFunctionDeclaration();
case "PUNC.LEFT_CURLY": // {
case "PUNC.LEFT_PAREN": // (
- print('SCOPE-CURLY/PAREN:' + token.toString());
+ //print('SCOPE-CURLY/PAREN:' + token.toString());
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
if (token.props) {
break;
case "PUNC.RIGHT_CURLY": // }
- print("<< EXIT SCOPE");
+ //print("<< EXIT SCOPE");
return;
/*
//println("<i>"+token.data+"</i>");
break;
*/
case "KEYW.WITH":
- print('SCOPE-WITH:' + token.toString());
+ //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());
+ //print('SCOPE-CATCH:' + token.toString());
//println("<i>"+token.data+"</i>");
this.parseCatch();
break;
print("EXPR-NAME:" + JSON.stringify(token, null, 4));
} else {
print("EXPR-NAME:" + token.toString());
- }
+ }
symbol = token.data;
//print("in NAME = " + token.toString());
//print("in NAME 0: " + this.ts.look(0).toString());
//assert token.getType() == Token.CATCH;
token = this.ts.nextTok();
//assert token.getType() == Token.LP; (
- token = this.ts.nextTok();
+ //token = this.ts.nextTok();
//assert token.getType() == Token.NAME;
- symbol = token.data;
+ symbol = token.items[0].data;
currentScope = this.scopes[this.scopes.length-1];
if (this.mode == 'BUILDING_SYMBOL_TREE') {