From acd1191fb06a51f70f553c1dc8b47cf245a1c913 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 19 Nov 2018 17:21:08 -0800 Subject: Tweaks and API cleanup. --- nomsu_compiler.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nomsu_compiler.lua') diff --git a/nomsu_compiler.lua b/nomsu_compiler.lua index a1eadd8..a83f4ec 100644 --- a/nomsu_compiler.lua +++ b/nomsu_compiler.lua @@ -95,6 +95,9 @@ local compile = setmetatable({ return lua end, ["Lua"] = function(compile, code) + if not code then + return LuaCode("LuaCode()") + end if code.type ~= "Text" then return LuaCode("LuaCode:from(", tostring(code.source):as_lua(), ", ", compile(code), ")") end -- cgit v1.2.3