aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nomsu.lua3
-rwxr-xr-xnomsu.moon1
2 files changed, 4 insertions, 0 deletions
diff --git a/nomsu.lua b/nomsu.lua
index f7182ba..fa77c1c 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -424,6 +424,9 @@ do
if max_operations == nil then
max_operations = nil
end
+ if src == "" then
+ return nil, "", vars
+ end
if max_operations then
local timeout
timeout = function()
diff --git a/nomsu.moon b/nomsu.moon
index e57954d..899b1fc 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -323,6 +323,7 @@ class NomsuCompiler
return tree
run: (src, filename, vars={}, max_operations=nil)=>
+ if src == "" then return nil, "", vars
if max_operations
timeout = ->
debug.sethook!