aboutsummaryrefslogtreecommitdiff
path: root/nomsu_decompiler.moon
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu_decompiler.moon')
-rw-r--r--nomsu_decompiler.moon5
1 files changed, 4 insertions, 1 deletions
diff --git a/nomsu_decompiler.moon b/nomsu_decompiler.moon
index 8c559b1..9cb9ae8 100644
--- a/nomsu_decompiler.moon
+++ b/nomsu_decompiler.moon
@@ -333,7 +333,10 @@ tree_to_nomsu = (tree)->
interp_nomsu = recurse(bit)
unless interp_nomsu\is_multiline!
if bit.type == "Var"
- if type(tree[i+1]) == 'string' and not match(tree[i+1], "^[ \n\t,.:;#(){}[%]]")
+ next_str = tree[i+1]
+ while type(next_str) == 'table' and next_str.type == 'Text'
+ next_str = next_str[1]
+ if type(next_str) == 'string' and not match(next_str, "^[ \n\t,.:;#(){}[%]]")
interp_nomsu\parenthesize!
elseif bit.type == "EscapedNomsu" or bit.type == "Block" or bit.type == "IndexChain"
interp_nomsu\parenthesize!