aboutsummaryrefslogtreecommitdiff
path: root/nomsu_compiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-14 14:52:28 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-14 14:53:03 -0700
commitc9ff0ff04b2d1922bcfe5b1106b9979c29b167a2 (patch)
tree76616ba5dddc1d4b11c88fa16460ae673e2969a0 /nomsu_compiler.moon
parentd535dc57940f6c9558d3b588d53b44a87b2a8ed2 (diff)
Fixed up some edge cases with parsing and comments.
Diffstat (limited to 'nomsu_compiler.moon')
-rw-r--r--nomsu_compiler.moon2
1 files changed, 1 insertions, 1 deletions
diff --git a/nomsu_compiler.moon b/nomsu_compiler.moon
index 0b330c8..22fa54d 100644
--- a/nomsu_compiler.moon
+++ b/nomsu_compiler.moon
@@ -484,7 +484,7 @@ with NomsuCompiler
.tree_to_nomsu = (tree, options)=>
options or= {}
unless options.pop_comments
- comments = [{comment:c, pos:p} for p,c in pairs(tree.comments or {})]
+ comments = [{comment:c, pos:p} for p,c in pairs(tree.comments or {}) when tree.source.start <= p and p <= tree.source.stop]
table.sort comments, (a,b)-> a.pos < b.pos
comment_i = 1
options.pop_comments = (pos)->