var isObjectLitAr = [ false ];
var isInObjectLitAr;
thisScope = scope;
- if (thisScope) {
+ if (thisScope && thisScope.gid != this.scopes[this.scopes.length-1]) {
this.scopes.push(scope);
} else {
thisScope = this.scopes[this.scopes.length-1]
// key value..
this.ts = new TokenStream(token.props[prop].val);
- this.parseScope(currentScope);
+ this.parseScope(false);
}
this.ts = curTS;
//skip '.'
break;
}
-
+ if (symbol == 'this') {
+ break;
+ }
if (this.mode == 'PASS2_SYMBOL_TREE') {
//print("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')');
//throw "OOPS";
} else {
- print("undeclared:" + token.toString())
+ //print("undeclared:" + token.toString())
}
//assert token.getType() == Token.LP;
if (this.mode == 'BUILDING_SYMBOL_TREE') {
- fnScope = new Scope(this.braceNesting, currentScope, token.n, '');
+ fnScope = new Scope(1, currentScope, token.n, '');
//println("STORING SCOPE" + this.ts.cursor);
_this.ts = new TokenStream(tar);
_this.parseScope(fnScope);
+
});
//print(JSON.stringify(this.ts,null,4));