moonscript/tests/outputs/syntax.lua
2011-05-22 12:19:13 -07:00

42 lines
999 B
Lua

local x = function() print(what) end
function() end
function() function() function() end end end
go(to(the(barn)))
open(function() the(function() door end) end)
open(function()
the(door)
local hello = function() my(func) end
end)
local h = function() hi end
eat(function() end, world)
local a = 1 + 2 * 3 / 6
a = another
local bunch, go, here = world
func(arg1, arg2, another, arg3)
here = function() end
local we = yeah
local the, different = function() approach end, yeah
dad()
dad(lord)
hello(one, two)();
(5 + 5)(world)
fun(a)(b)
fun(a)(b)
fun(a)(b, bad(hello))
hello(world(what(are(you(doing(here))))))
what(the)[3243](world, yeck(heck))
hairy[hands][are](gross)(okay(okay[world]));
(get[something] + 5)[years]
local i = 200
x = 300
local yeah = (1 + 5) * 3
yeah = ((1 + 5) * 3) / 2
yeah = ((1 + 5) * 3) / 2 + i % 100
local whoa = (1 + 2) * (3 + 4) * (4 + 5);
(function() end)()
return(5 + function() 4 + 2 end)
return(5 + (function() 4 end) + 2)
print(5 + function()
34
good(nads)
end)