diff --git a/lib/parse.js b/lib/parse.js index 6f2c9be1..827b6a4a 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1668,7 +1668,7 @@ Cola.Parser.prototype.expr_atom = function(allow_calls) { if (!this.is_js && this.is("name")) { if(this.next_is("name")){ type = this.S.token.value, this.next(); - return this.function_(Cola.AST_Defun, type); + return this.function_(Cola.AST_Function, type); } var _this = this, balance = 1, isfun = false; @@ -1687,7 +1687,7 @@ Cola.Parser.prototype.expr_atom = function(allow_calls) { } this.restoreS(); - if(isfun) return this.function_(Cola.AST_Defun); + if(isfun) return this.function_(Cola.AST_Function); } if (this.is("keyword", "function")) { this.next();