From 171e9d674e4ae85e303c90679ad47bceda3b3810 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Nov 2018 18:28:10 -0800 Subject: Re-implemented nomsu -> lua comment translation and added file chunk comments. --- nomsu_environment.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nomsu_environment.lua') diff --git a/nomsu_environment.lua b/nomsu_environment.lua index a55fe88..4345947 100644 --- a/nomsu_environment.lua +++ b/nomsu_environment.lua @@ -208,11 +208,10 @@ local nomsu_environment = Importer({ } end local ret = nil - for _index_0 = 1, #to_run do - local chunk = to_run[_index_0] + for chunk_no, chunk in ipairs(to_run) do local lua = environment.compile(chunk) lua:declare_locals() - lua:prepend("-- File: " .. tostring(filename) .. "\n") + lua:prepend("-- File: " .. tostring(filename) .. " chunk #" .. tostring(chunk_no) .. "\n") ret = environment.run_1_in(lua, environment) end return ret -- cgit v1.2.3