diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-11 18:28:10 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-11 18:28:34 -0800 |
| commit | 171e9d674e4ae85e303c90679ad47bceda3b3810 (patch) | |
| tree | 5d3175abeea4135ba994b2645e0ae0f9d9a0be77 /nomsu_environment.lua | |
| parent | 3c7a0ff2ea81c0530d0168c4b9f4326a6200b781 (diff) | |
Re-implemented nomsu -> lua comment translation and added file chunk
comments.
Diffstat (limited to 'nomsu_environment.lua')
| -rw-r--r-- | nomsu_environment.lua | 5 |
1 files changed, 2 insertions, 3 deletions
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 |
