aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-01-11 18:48:43 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-01-11 18:48:43 -0800
commit06bf76f818382cdd33816073866f3cfd41609597 (patch)
treef5a94d3cf844f218514b9b51a747075d72248d60
parent48b27d4b1ac2c39cbbc19af6600ca1ac28ac8be3 (diff)
Truncated debug output for readability.
-rw-r--r--nomsu.lua11
-rwxr-xr-xnomsu.moon2
2 files changed, 11 insertions, 2 deletions
diff --git a/nomsu.lua b/nomsu.lua
index 3232d7d..04d74c0 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -769,7 +769,16 @@ end]]):format(lua_code))
end
if self.debug then
self:write(tostring(colored.bright("RUNNING MACRO")) .. " " .. tostring(colored.underscore(colored.magenta(tree.stub))) .. " ")
- self:writeln(tostring(colored.bright("WITH ARGS:")) .. " " .. tostring(colored.dim(repr(args))))
+ self:writeln(tostring(colored.bright("WITH ARGS:")) .. " " .. tostring(colored.dim(repr((function()
+ local _accum_0 = { }
+ local _len_0 = 1
+ for _index_0 = 1, #args do
+ local a = args[_index_0]
+ _accum_0[_len_0] = (repr(a)):sub(1, 50)
+ _len_0 = _len_0 + 1
+ end
+ return _accum_0
+ end)()))))
end
local lua = self.defs[tree.stub].fn(self, unpack(args))
remove(self.compilestack)
diff --git a/nomsu.moon b/nomsu.moon
index 45ac3c6..c37f8e0 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -526,7 +526,7 @@ end]]\format(lua_code))
args = [arg for arg in *tree.value when arg.type != "Word"]
if @debug
@write "#{colored.bright "RUNNING MACRO"} #{colored.underscore colored.magenta(tree.stub)} "
- @writeln "#{colored.bright "WITH ARGS:"} #{colored.dim repr args}"
+ @writeln "#{colored.bright "WITH ARGS:"} #{colored.dim repr [(repr a)\sub(1,50) for a in *args]}"
lua = @defs[tree.stub].fn(self, unpack(args))
remove @compilestack
return lua