aboutsummaryrefslogtreecommitdiff
path: root/nomsu_decompiler.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 17:32:48 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 17:33:04 -0800
commited70165294a6b846a9b0d513689dea03539755f7 (patch)
tree5f81723db4638e322d2b9d1a8d07000b2c5cb59d /nomsu_decompiler.moon
parente96ae0c78dc511d361d37bc69259d18a68648b8f (diff)
Better handling of shebangs and comments at the top of a file.
Diffstat (limited to 'nomsu_decompiler.moon')
-rw-r--r--nomsu_decompiler.moon2
1 files changed, 2 insertions, 0 deletions
diff --git a/nomsu_decompiler.moon b/nomsu_decompiler.moon
index 75eae6d..380bbca 100644
--- a/nomsu_decompiler.moon
+++ b/nomsu_decompiler.moon
@@ -172,6 +172,8 @@ tree_to_nomsu = (tree)->
switch tree.type
when "FileChunks"
+ if tree.shebang
+ nomsu\append tree.shebang, "\n"
should_clump = (prev_line, line)->
if prev_line.type == "Action" and line.type == "Action"
if prev_line.stub == "use" then return line.stub == "use"