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_compiler.lua | |
| parent | 3c7a0ff2ea81c0530d0168c4b9f4326a6200b781 (diff) | |
Re-implemented nomsu -> lua comment translation and added file chunk
comments.
Diffstat (limited to 'nomsu_compiler.lua')
| -rw-r--r-- | nomsu_compiler.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua index 91e1237..0ea2079 100644 --- a/nomsu_compiler.lua +++ b/nomsu_compiler.lua @@ -433,7 +433,7 @@ local compile = setmetatable({ elseif "FileChunks" == _exp_0 then return error("Can't convert FileChunks to a single block of lua, since each chunk's " .. "compilation depends on the earlier chunks") elseif "Comment" == _exp_0 then - return LuaCode:from(tree.source, "") + return LuaCode:from(tree.source, "-- ", (tree[1]:gsub('\n', '\n-- '))) elseif "Error" == _exp_0 then return error("Can't compile errors") else |
