{
var symbol;
- var token;
+ var token;
var currentScope = false;
var fnScope = false;
var identifier;
//this.logR("<B>PARSING FUNCTION</B>");
currentScope = this.scopes[this.scopes.length-1];
- token = this.ts.nextT();
- if (token.isType('identifier')) {
+ token = this.ts.nextTok();
+ if (token.type == "NAME") {
if (this.mode == 'BUILDING_SYMBOL_TREE') {
// Get the name of the function and declare it in the current scope.
symbol = token.data;
}
currentScope.declareIdentifier(symbol,token);
}
- token = this.ts.nextT();
+ token = this.ts.nextTok();
}
//assert token.getType() == Token.LP;