Skip to content

Commit

Permalink
Merge pull request #151 from shawwn/fixes/return-multi
Browse files Browse the repository at this point in the history
Fix RETURN for multiple values on Lua
  • Loading branch information
Scott Bell authored Jul 13, 2017
2 parents d439854 + 83a9b99 commit bfe2b51
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ setenv("return", {_stash: true, special: function (x) {
if (nil63(x)) {
__e55 = "return";
} else {
__e55 = "return(" + compile(x) + ")";
__e55 = "return " + compile(x);
}
var __x167 = __e55;
return(indentation() + __x167);
Expand Down
2 changes: 1 addition & 1 deletion bin/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ setenv("return", {_stash = true, special = function (x)
if nil63(x) then
__e47 = "return"
else
__e47 = "return(" .. compile(x) .. ")"
__e47 = "return " .. compile(x)
end
local __x171 = __e47
return(indentation() .. __x171)
Expand Down
2 changes: 1 addition & 1 deletion compiler.l
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
(define-special return (x) :stmt
(let x (if (nil? x)
"return"
(cat "return(" (compile x) ")"))
(cat "return " (compile x)))
(cat (indentation) x)))

(define-special new (x)
Expand Down

0 comments on commit bfe2b51

Please sign in to comment.