diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-25 18:07:41 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-25 18:07:51 -0800 |
| commit | fb22ba11ac2c363941d8bf34f8b8a9181bd7c7dc (patch) | |
| tree | 1939c69ef3c9c43b473ce9e8ca1f7045d57faa09 /nomsu.moon | |
| parent | 6668918b2e8a5548bb66864c5051ca94c61994d3 (diff) | |
Fixed improperly handling locals of a block.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -642,9 +642,9 @@ class NomsuCompiler for arg in *tree.value lua = @tree_to_lua arg if #tree.value == 1 and lua.expr and not lua.statements - return expr:lua.expr + return {expr:lua.expr, locals:lua.locals} if lua.locals - for l in *lua.locals do locals[l] = true + for l in *lua.locals do table.insert(locals, l) if lua.statements then insert lua_bits, lua.statements elseif lua.expr then insert lua_bits, "#{lua.expr};" utils.deduplicate(locals) |
