summaryrefslogtreecommitdiff
path: root/repl.lua
diff options
context:
space:
mode:
Diffstat (limited to 'repl.lua')
-rw-r--r--repl.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/repl.lua b/repl.lua
index 8abb822..4076729 100644
--- a/repl.lua
+++ b/repl.lua
@@ -32,6 +32,9 @@ local function read_chunk()
-- if error ends in <eof> try multiline
local function try(text)
+ if text == nil then
+ os.exit()
+ end
if text:sub(1,3) == ",r " then
return function() reload(text:sub(4)) print("reloaded "..text:sub(4)) end
end