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.moon | |
| parent | 3c7a0ff2ea81c0530d0168c4b9f4326a6200b781 (diff) | |
Re-implemented nomsu -> lua comment translation and added file chunk
comments.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -128,10 +128,11 @@ run = -> code = NomsuCode\from(source, code) tree = nomsu_environment._1_parsed(code) tree = {tree} unless tree.type == 'FileChunks' - for chunk in *tree + for chunk_no, chunk in ipairs tree 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 #{filename} chunk ##{chunk_no}\n") output\write(tostring(lua), "\n") if args.verbose then print(tostring(lua)) print ("Compiled %-25s -> %s")\format(filename, filename\gsub("%.nom$", ".lua")) |
