aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-18 19:48:58 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-18 19:49:29 -0700
commit79d4bd5125de7ff220fbf8a8a5493d437ed16963 (patch)
treefa09e1a5ccb384373b50e27067a7cc3a25669550 /nomsu.moon
parentd11f9bc5d3971a68dd78cdaca0b046a40a329000 (diff)
Got rid of repr() use and replaced with :as_lua() or :as_nomsu() in as
many places as possible.
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon6
1 files changed, 4 insertions, 2 deletions
diff --git a/nomsu.moon b/nomsu.moon
index 382a5b5..1ab9637 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -48,7 +48,6 @@ Files = require "files"
Errhand = require "error_handling"
NomsuCompiler = require "nomsu_compiler"
{:NomsuCode, :LuaCode, :Source} = require "code_obj"
-{:repr} = require "utils"
-- If this file was reached via require(), then just return the Nomsu compiler
if not arg or debug.getinfo(2).func == require
@@ -222,7 +221,10 @@ say "\
Errhand.print_error error_message
ok, ret = xpcall(nomsu.run, err_hand, nomsu, buff, Source(pseudo_filename, 1, #buff))
if ok and ret != nil
- print "= "..repr(ret)
+ if type(ret) == 'number'
+ print "= #{ret}"
+ else
+ print "= #{ret\as_nomsu!}"
elseif not ok
Errhand.print_error ret