summaryrefslogtreecommitdiff
path: root/xmake/core/base/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/utils.lua')
-rw-r--r--xmake/core/base/utils.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/core/base/utils.lua b/xmake/core/base/utils.lua
index d85d1ecd9..ca13ab097 100644
--- a/xmake/core/base/utils.lua
+++ b/xmake/core/base/utils.lua
@@ -42,7 +42,7 @@ function utils.dump(...)
local info = debug.getinfo(2)
local line = info.currentline
if not line or line < 0 then line = info.linedefined end
- io.write(string.format("dump form %s %s:%s\n", info.name or "<anonymous>", info.source, line))
+ io.write(string.format("dump from %s %s:%s\n", info.name or "<anonymous>", info.source, line))
end
local values = table.pack(...)
@@ -327,5 +327,13 @@ function utils.confirm(opt)
return confirm
end
+function utils.table(data, opt)
+ utils.printf(colors.table(data, opt))
+end
+
+function utils.vtable(data, opt)
+ utils.vprintf(colors.table(data, opt))
+end
+
-- return module
return utils