aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu_compiler.lua')
-rw-r--r--nomsu_compiler.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua
index 7aa117c..f9ba314 100644
--- a/nomsu_compiler.lua
+++ b/nomsu_compiler.lua
@@ -1005,7 +1005,11 @@ do
elseif "Action" == _exp_0 then
local nomsu = NomsuCode(tree.source)
if tree.target then
- nomsu:append(self:tree_to_inline_nomsu(tree.target), "::")
+ local inline_target = self:tree_to_inline_nomsu(tree.target)
+ if tree.target.type == "Action" then
+ inline_target:parenthesize()
+ end
+ nomsu:append(inline_target, "::")
end
for i, bit in ipairs(tree) do
if type(bit) == "string" then