aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-09-22 00:03:32 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-09-22 00:03:32 -0700
commitfaf19b2729171edcea33569d6149ea02269bc100 (patch)
tree4907bc6c81026973fdc072c0c199fd23b140397f /nomsu.moon
parent85db7b422b1a21c41684db03861ea452f58ba4d3 (diff)
Being extra cautious and putting the indent stack back.
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon5
1 files changed, 3 insertions, 2 deletions
diff --git a/nomsu.moon b/nomsu.moon
index babccee..8683d4c 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -256,10 +256,11 @@ class NomsuCompiler
if @debug
@writeln("PARSING:\n#{str}")
- export indent_stack
- indent_stack = {0}
str = str\gsub("\r","").."\n"
+ export indent_stack
+ old_indent_stack, indent_stack = indent_stack, {0}
tree = nomsu\match(str)
+ indent_stack = old_indent_stack -- Put it back, just in case.
if @debug
@writeln("\nPARSE TREE:")
@print_tree(tree)