case '(': //Token.LP:
case '{': //Token.LC:
case '[': //Token.LB:
- //print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
+ print('SCOPE-CURLY/PAREN/BRACE:' + token.toString());
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
if (token.props) {
for (var prop in token.props) {
- if (token.props[prop].val.data == 'function') {
+ if (token.props[prop].val[0].data == 'function') {
// parse a function..
- this.parseFunctProp(token.props[prop]);
+ this.ts = new TokenStream(token.props[prop].val);
+ this.ts.nextTok();
+ this.parseFunctionDeclaration();
continue;
}
// key value..
//assert token.getType() == Token.LP;
if (this.mode == 'BUILDING_SYMBOL_TREE') {
- fnScope = new Scope(1, currentScope, token.n, '');
+ fnScope = new Scope(1, currentScope, token.n, '', token);
//println("STORING SCOPE" + this.ts.cursor);