aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon6
1 files changed, 3 insertions, 3 deletions
diff --git a/nomsu.moon b/nomsu.moon
index 0bc9288..1181ae4 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -751,11 +751,11 @@ class NomsuCompiler
for bit in *tree
if type(bit) == 'string'
-- TODO: unescape better?
- nomsu\append (gsub(gsub(bit,"\\","\\\\"),"\n","\\n"))
+ nomsu\append (gsub(gsub(gsub(bit,"\\","\\\\"),"\n","\\n"),'"','\\"'))
else
interp_nomsu = @tree_to_nomsu(bit, true)
if interp_nomsu
- if bit.type != "List" and bit.type != "Dict" and bit.type != "Text"
+ if bit.type != "Var" and bit.type != "List" and bit.type != "Dict" and bit.type != "Text"
interp_nomsu\parenthesize!
nomsu\append "\\", interp_nomsu
else return nil
@@ -791,7 +791,7 @@ class NomsuCompiler
else
interp_nomsu = @tree_to_nomsu(bit, true)
if interp_nomsu
- if bit.type != "List" and bit.type != "Dict" and bit.type != "Text"
+ if bit.type != "Var" and bit.type != "List" and bit.type != "Dict" and bit.type != "Text"
interp_nomsu\parenthesize!
nomsu\append "\\", interp_nomsu
else