aboutsummaryrefslogtreecommitdiff
path: root/error_handling.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-20 15:22:03 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-20 15:22:06 -0700
commitd73cbf0aa5c9081d965e06822f4958aa5c1871e6 (patch)
tree776740bfa4b47bd7983efd3d332da3c14b97bb49 /error_handling.lua
parentc1cec2ac8487bf7486b1ab85d24252d6658b3dfc (diff)
Cleanups.
Diffstat (limited to 'error_handling.lua')
-rw-r--r--error_handling.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/error_handling.lua b/error_handling.lua
index 3ead904..5e7d715 100644
--- a/error_handling.lua
+++ b/error_handling.lua
@@ -160,7 +160,7 @@ print_error = function(error_message, stack_offset)
end
end
end
- if file and calling_fn.short_src:match("%.moon$") and type(MOON_SOURCE_MAP[file]) == 'table' then
+ if file and (calling_fn.short_src:match("%.moon$") or file:match("^#![^\n]*moon\n")) and type(MOON_SOURCE_MAP[file]) == 'table' then
local char = MOON_SOURCE_MAP[file][calling_fn.currentline]
line_num = 1
for _ in file:sub(1, char):gmatch("\n") do