Functions translation bug fix

This commit is contained in:
Onoshko Dan 2014-07-03 01:08:11 +07:00
parent c635d9e1f1
commit 14eb63b057

View File

@ -1668,7 +1668,7 @@ Cola.Parser.prototype.expr_atom = function(allow_calls) {
if (!this.is_js && this.is("name")) { if (!this.is_js && this.is("name")) {
if(this.next_is("name")){ if(this.next_is("name")){
type = this.S.token.value, this.next(); 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; var _this = this, balance = 1, isfun = false;
@ -1687,7 +1687,7 @@ Cola.Parser.prototype.expr_atom = function(allow_calls) {
} }
this.restoreS(); this.restoreS();
if(isfun) return this.function_(Cola.AST_Defun); if(isfun) return this.function_(Cola.AST_Function);
} }
if (this.is("keyword", "function")) { if (this.is("keyword", "function")) {
this.next(); this.next();