remove gotos

This commit is contained in:
2026-03-12 19:31:37 -04:00
parent 45b46cf3c4
commit d08935b68a
4 changed files with 94 additions and 99 deletions

View File

@@ -308,16 +308,16 @@ local history = {}
while true do
local code = getUserInput("lua> ", history)
if code == "" then goto continue end
if code ~= "" then
while isIncomplete(code) do
code = code .. "\n" .. getUserInput("... ", nil)
while isIncomplete(code) do
code = code .. "\n" .. getUserInput("... ", nil)
end
if code ~= history[#history] then
history[#history+1] = code
end
runCode(code)
end
if code ~= history[#history] then
history[#history+1] = code
end
runCode(code)
::continue::
end