//this.scopes.forEach(function() {
// scopeIndent += ' ';
//});
- //print(scopeIndent + ">> 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);
}
token = this.ts.nextTok();
- print('FUNC-BODY:' + JSON.stringify(token,null,4));
- Seed.quit();
+ print('FUNC-BODY:' + JSON.stringify(token.items,null,4));
+ //Seed.quit();
//print(token.toString());
// assert token.getType() == Token.LC;
//this.braceNesting++;
//token = this.ts.nextTok();
//print(token.toString());
var outTS = this.ts;
- this.ts = new TokenStream(token.items);
- this.parseScope(fnScope);
+ var _this = this;
+ token.items.forEach(function(tar) {
+ _this.ts = new TokenStream(tar);
+ _this.parseScope(fnScope);
+
+ }
+
+ //print(JSON.stringify(this.ts,null,4));
+ //this.parseScope(fnScope);
this.ts = outTS;
// now pop it off the stack!!!