1
0
Fork 0
mirror of https://github.com/Reuh/candran.git synced 2025-10-27 17:59:30 +00:00

Added 0.5.0 tests

Also removed an error thrown when the start of an implicit push looks
like an assignment...
This commit is contained in:
Étienne Fildadut 2017-08-25 19:57:02 +02:00
parent d249c353c5
commit 724249555f
4 changed files with 98 additions and 5 deletions

View file

@ -395,7 +395,7 @@ return function(code, ast, options)
push("push", false) -- no push here (make sure higher push don't affect us)
end
r ..= lua(t[2])
if hasPush then
if hasPush and (t[2][#t[2]] and t[2][#t[2]].tag ~= "Return") then -- add return only if needed
r ..= newline() .. "return " .. UNPACK(var("push"))
end
pop("push")