From 14eb63b057949086314181f9363ac7003c076cd5 Mon Sep 17 00:00:00 2001 From: Onoshko Dan Date: Thu, 3 Jul 2014 01:08:11 +0700 Subject: [PATCH] Functions translation bug fix --- lib/parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();