aboutsummaryrefslogtreecommitdiff
path: root/nomsu.lua
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-11 18:28:10 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-11 18:28:34 -0800
commit171e9d674e4ae85e303c90679ad47bceda3b3810 (patch)
tree5d3175abeea4135ba994b2645e0ae0f9d9a0be77 /nomsu.lua
parent3c7a0ff2ea81c0530d0168c4b9f4326a6200b781 (diff)
Re-implemented nomsu -> lua comment translation and added file chunk
comments.
Diffstat (limited to 'nomsu.lua')
-rw-r--r--nomsu.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu.lua b/nomsu.lua
index b0e13bb..4cbaf7c 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -199,11 +199,11 @@ run = function()
tree
}
end
- for _index_1 = 1, #tree do
- local chunk = tree[_index_1]
+ for chunk_no, chunk in ipairs(tree) do
local lua = nomsu_environment.compile(chunk)
lua:declare_locals()
nomsu_environment.run_1_in(chunk, nomsu_environment)
+ output:write((chunk_no > 1) and '\n' or '', "-- File " .. tostring(filename) .. " chunk #" .. tostring(chunk_no) .. "\n")
output:write(tostring(lua), "\n")
if args.verbose then
print(tostring(lua))