diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-26 20:20:12 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-26 20:20:38 -0800 |
| commit | 90c56d31352a0eeccd382ef5921baf3af4971040 (patch) | |
| tree | 5167eafb5785c94b48458b18b0454222ca70c749 /nomsu.lua | |
| parent | d5aa4e52983712f9f4c5b23528d0c2dab12b0b33 (diff) | |
Added a ton of tests for virtually all the functionality. Helped me find
and fix a lot of latent problems.
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1311,6 +1311,9 @@ do self:define_compile_action("immediately %block", get_line_no(), function(_block) local lua = nomsu:tree_to_lua(_block) local lua_code = lua.statements or (lua.expr .. ";") + if lua.locals and #lua.locals > 0 then + lua_code = "local " .. tostring(concat(lua.locals, ", ")) .. ";\n" .. tostring(lua_code) + end nomsu:run_lua(lua_code) return { statements = "if IMMEDIATE then\n" .. tostring(lua_code) .. "\nend", |
