diff options
| author | Opportunity <[email protected]> | 2020-01-15 11:24:36 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-01-15 11:24:36 +0800 |
| commit | 9862d1b95fa5978eaf24d65f1ca5f151d410a14b (patch) | |
| tree | 2cac28495cfc70402a60d1b244dc4a801d484eb5 /xmake/core/base/utils.lua | |
| parent | eb1effdccd96425375af083d45a94a790f0c6d56 (diff) | |
Improve options parsing
Diffstat (limited to 'xmake/core/base/utils.lua')
| -rw-r--r-- | xmake/core/base/utils.lua | 10 |
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 |
