diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-19 17:21:08 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-19 17:21:17 -0800 |
| commit | acd1191fb06a51f70f553c1dc8b47cf245a1c913 (patch) | |
| tree | 993bb69cc050426644b98d10fb1a3133b3623be6 /nomsu_compiler.lua | |
| parent | 7f47d4204039258cec78c767f489b7809b4257ff (diff) | |
Tweaks and API cleanup.
Diffstat (limited to 'nomsu_compiler.lua')
| -rw-r--r-- | nomsu_compiler.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
