aboutsummaryrefslogtreecommitdiff
path: root/nomsu_tree.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-03 16:37:48 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-03 16:38:06 -0700
commit36ead4d82bdb058229271fb742f659d47c5c48a3 (patch)
treea87295955bdc3f553248b3fb5b1f78162cf3fba6 /nomsu_tree.moon
parente64a91b8ba7e0d2cd4af4154e3b9adcccb299854 (diff)
Cleanup of unnecessary parens in generated lua code for math operations.
Diffstat (limited to 'nomsu_tree.moon')
-rw-r--r--nomsu_tree.moon3
1 files changed, 2 insertions, 1 deletions
diff --git a/nomsu_tree.moon b/nomsu_tree.moon
index 0119490..4af4dfc 100644
--- a/nomsu_tree.moon
+++ b/nomsu_tree.moon
@@ -132,10 +132,11 @@ Tree "Action",
unless tok_lua.is_value
src = tok.source\get_text!
error("non-expression value inside math expression: #{colored.yellow src}")
+ if tok.type == "Action"
+ tok_lua\parenthesize!
lua\append tok_lua
if i < #@value
lua\append " "
- lua\parenthesize!
return lua
args = {}