You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- print the first number divisible by 4
foo = () ->
for i = 0, 40
continue if not (i % 4 == 0)
print i
return
foo()
Compiled Lua:
foo = function()
for i = 0, 40 do
local _continue_0 = false
repeat
if not (i % 4 == 0) then
_continue_0 = true
break
end
print(i)
return
_continue_0 = true
until true
if not _continue_0 then
break
end
end
end
return foo()
error:
Error
Syntax error: main.lua:12: 'until' expected (to close 'repeat' at line 5) near '='
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: at 0x7ffc25e62fa0
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
The text was updated successfully, but these errors were encountered:
Moonscript (main.lua):
Compiled Lua:
error:
The text was updated successfully, but these errors were encountered: