darklua
DocumentationTry itGitHub

remove_continue


Added in 0.14.1

This rule removes all continue statements and replaces them with code that only use break statements.

Note: this rule is useful if you are converting Luau code into regular Lua code.

Examples


for i = 1, 10 do
    if i == 1 then
        continue
    end
    print(i)
end
InputOutput
for i = 1, 10 do
    if i == 1 then
        continue
    end
    print(i)
end
for i = 1, 10 do
local __DARKLUA_CONTINUE_1=false repeat    if i == 1 then
__DARKLUA_CONTINUE_1=true        break
    end
    print(i)
__DARKLUA_CONTINUE_1=true until true if not __DARKLUA_CONTINUE_1 then break end end