diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-18 19:48:58 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-18 19:49:29 -0700 |
| commit | 79d4bd5125de7ff220fbf8a8a5493d437ed16963 (patch) | |
| tree | fa09e1a5ccb384373b50e27067a7cc3a25669550 /nomsu.lua | |
| parent | d11f9bc5d3971a68dd78cdaca0b046a40a329000 (diff) | |
Got rid of repr() use and replaced with :as_lua() or :as_nomsu() in as
many places as possible.
Diffstat (limited to 'nomsu.lua')
| -rw-r--r-- | nomsu.lua | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -91,8 +91,6 @@ do local _obj_0 = require("code_obj") NomsuCode, LuaCode, Source = _obj_0.NomsuCode, _obj_0.LuaCode, _obj_0.Source end -local repr -repr = require("utils").repr if not arg or debug.getinfo(2).func == require then return NomsuCompiler end @@ -324,7 +322,11 @@ say "\ local ret ok, ret = xpcall(nomsu.run, err_hand, nomsu, buff, Source(pseudo_filename, 1, #buff)) if ok and ret ~= nil then - print("= " .. repr(ret)) + if type(ret) == 'number' then + print("= " .. tostring(ret)) + else + print("= " .. tostring(ret:as_nomsu())) + end elseif not ok then Errhand.print_error(ret) end |
