diff --git a/moonscript/compile.lua b/moonscript/compile.lua index 0715b86..58390c2 100644 --- a/moonscript/compile.lua +++ b/moonscript/compile.lua @@ -94,8 +94,7 @@ do end insert(buffer, l) if "string" == type(self[i + 1]) then - local lc = l:sub(-1) - if (lc == ")" or lc == "]") and self[i + 1]:sub(1, 1) == "(" then + if l:sub(-1) ~= ',' and l:sub(-3) ~= 'end' and self[i + 1]:sub(1, 1) == "(" then insert(buffer, ";") end end diff --git a/moonscript/compile.moon b/moonscript/compile.moon index a2b17fe..716c2c4 100644 --- a/moonscript/compile.moon +++ b/moonscript/compile.moon @@ -71,8 +71,7 @@ class Lines -- insert breaks between ambiguous statements if "string" == type @[i + 1] - lc = l\sub(-1) - if (lc == ")" or lc == "]") and @[i + 1]\sub(1,1) == "(" + if l\sub(-1)!=',' and l\sub(-3)!='end' and @[i + 1]\sub(1,1) == "(" insert buffer, ";" insert buffer, "\n"