From 2048d4468acf4720c38eabe5644e9f112cea5478 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 7 Jan 2019 21:41:59 -0800 Subject: Added quit/exit and switched Files.read->exists. --- nomsu_environment.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nomsu_environment.lua') diff --git a/nomsu_environment.lua b/nomsu_environment.lua index ca22389..51100fc 100644 --- a/nomsu_environment.lua +++ b/nomsu_environment.lua @@ -137,6 +137,8 @@ local nomsu_environment = Importer({ compile_error_at = compile_error, _1_forked = _1_forked, import_to_1_from = import_to_1_from, + exit = os.exit, + quit = os.exit, _1_parsed = function(nomsu_code, syntax_version) if type(nomsu_code) == 'string' then local filename = Files.spoof(nomsu_code) @@ -333,7 +335,7 @@ local nomsu_environment = Importer({ break end local code - if optimization ~= 0 and Files.read(lua_filename) then + if optimization ~= 0 and Files.exists(lua_filename) then local file = Files.read(lua_filename) code = LuaCode:from(Source(filename, 1, #file), file) else -- cgit v1.2.3