diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-26 15:52:38 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-06-26 15:53:00 -0700 |
| commit | 65dc1f2196b46dbd527d49da113515bea825416d (patch) | |
| tree | 02dbbe6528dc9c4a1e71a522da624a08f1179d64 /nomsu_compiler.lua | |
| parent | 42578872c72ec46b256a093f74482fb6e5b8e4b9 (diff) | |
Cleaning up metaprogramming a bit and fixing/adding test for recursion
control flow.
Diffstat (limited to 'nomsu_compiler.lua')
| -rw-r--r-- | nomsu_compiler.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua index 137df2e..0505562 100644 --- a/nomsu_compiler.lua +++ b/nomsu_compiler.lua @@ -439,7 +439,7 @@ do local line_numbered_lua = concat((function() local _accum_0 = { } local _len_0 = 1 - for i, line in ipairs(get_lines:match(lua_string)) do + for i, line in ipairs(files.get_lines(lua_string)) do _accum_0[_len_0] = format("%3d|%s", i, line) _len_0 = _len_0 + 1 end @@ -870,7 +870,7 @@ do local nomsu = NomsuCode(tree.source, '".."\n ') for i, bit in ipairs(tree) do if type(bit) == 'string' then - local bit_lines = get_lines:match(bit) + local bit_lines = files.get_lines(bit) for j, line in ipairs(bit_lines) do if j > 1 then nomsu:append("\n ") |
