aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-10-30 20:32:14 -0700
committerBruce Hill <bruce@bruce-hill.com>2018-10-30 20:32:49 -0700
commite7e84c9eda38c930f5475301de4a449dcf59e8b6 (patch)
treeb0d3890516170ca5aee0269aace10121b97a7593 /nomsu_compiler.moon
parentfdf7a537c8ae13fc7ccb32278e5e364a52005443 (diff)
Fix for compiler not parenthesizing method targets, fix for parser not
recognizing \ line continuation, and improvements to upgrade tool API.
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon5
1 files changed, 4 insertions, 1 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index 387c901..1106382 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -631,7 +631,10 @@ with NomsuCompiler
when "Action"
nomsu = NomsuCode(tree.source)
if tree.target
- nomsu\append @tree_to_inline_nomsu(tree.target), "::"
+ inline_target = @tree_to_inline_nomsu(tree.target)
+ if tree.target.type == "Action"
+ inline_target\parenthesize!
+ nomsu\append inline_target, "::"
for i,bit in ipairs tree
if type(bit) == "string"
clump_words = (type(tree[i-1]) == 'string' and is_operator(bit) != is_operator(tree[i-1]))