aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-26 15:59:21 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-26 16:00:12 -0700
commitf6e9bdc1c021552b4c52d427a54cb71a4ff8e2ac (patch)
tree2b9ff5b624a522861b6f60caa95958dfa30ba29e
parente7c3455d4f24c76aa553cc56dbf57774c6fbdc41 (diff)
Fixed a bug where if an indented string interpolation was at the end of
an indented text, the nomsu codegen would fail to put a "\n.." after it, so it wouldn't parse as an iterpolation.
-rw-r--r--nomsu_compiler.lua2
-rw-r--r--nomsu_compiler.moon2
2 files changed, 2 insertions, 2 deletions
diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua
index 75c6040..486e3e6 100644
--- a/nomsu_compiler.lua
+++ b/nomsu_compiler.lua
@@ -1159,7 +1159,7 @@ do
end
end
nomsu:append(interp_nomsu)
- if interp_nomsu:is_multiline() and i < #tree then
+ if interp_nomsu:is_multiline() then
nomsu:append("\n..")
end
end
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index fb834cd..abb48f7 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -743,7 +743,7 @@ with NomsuCompiler
elseif bit.type != "List" and bit.type != "Dict"
interp_nomsu\parenthesize!
nomsu\append interp_nomsu
- if interp_nomsu\is_multiline! and i < #tree
+ if interp_nomsu\is_multiline!
nomsu\append "\n.."
nomsu = NomsuCode(tree.source)
add_text(nomsu, tree)