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.moon | |
| parent | 42578872c72ec46b256a093f74482fb6e5b8e4b9 (diff) | |
Cleaning up metaprogramming a bit and fixing/adding test for recursion
control flow.
Diffstat (limited to 'nomsu_compiler.moon')
| -rw-r--r-- | nomsu_compiler.moon | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon index fdadb67..3313aa3 100644 --- a/nomsu_compiler.moon +++ b/nomsu_compiler.moon @@ -288,7 +288,7 @@ with NomsuCompiler run_lua_fn, err = load(lua_string, nil and tostring(source or lua.source), "t", self) if not run_lua_fn line_numbered_lua = concat( - [format("%3d|%s",i,line) for i, line in ipairs get_lines\match(lua_string)], + [format("%3d|%s",i,line) for i, line in ipairs files.get_lines(lua_string)], "\n") error("Failed to compile generated code:\n#{colored.bright colored.blue colored.onblack line_numbered_lua}\n\n#{err}", 0) source_key = tostring(source or lua.source) @@ -596,7 +596,7 @@ with NomsuCompiler nomsu = NomsuCode(tree.source, '".."\n ') for i, bit in ipairs tree if type(bit) == 'string' - bit_lines = get_lines\match(bit) + bit_lines = files.get_lines(bit) for j, line in ipairs bit_lines if j > 1 then nomsu\append "\n " if #line > 1.25*MAX_LINE |
