//assert token.getType() == Token.RP; // )
}
- void parseFunctionDeclaration (scope)
+ void parseFunctionDeclaration (Scope scope)
{
//print("PARSE FUNCTION");
var token = this.ts.nextTok();
if (token.type == "NAME") {
- if (this.mode == copeParserMode.BUILDING_SYMBOL_TREE) {
+ if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) {
// Get the name of the function and declare it in the current scope.
symbol = token.data;
if (scope.getIdentifier(symbol,token) != false) {
//assert token.getType() == Token.LP;
- if (this.mode == 'BUILDING_SYMBOL_TREE') {
- fnScope = new Scope(1, scope, token.n, '', token);
+ if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) {
+ var fnScope = new Scope(1, scope, token.n, '', token);
//println("STORING SCOPE" + this.ts.cursor);