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.moon | |
| 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.moon')
| -rwxr-xr-x | nomsu.moon | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |
