diff options
| author | Opportunity <[email protected]> | 2020-01-17 12:14:05 +0800 |
|---|---|---|
| committer | Opportunity <[email protected]> | 2020-01-17 12:14:05 +0800 |
| commit | 8098258ec6c24647698d64a38df1c89c3845e3bb (patch) | |
| tree | 8529dbe616f14d891eb1e32153f70bf0d59cf7c1 | |
| parent | 9ec8c57fe8aebcc6212543ce03392d13a865e802 (diff) | |
fix color
| -rw-r--r-- | xmake/core/base/bytes.lua | 8 | ||||
| -rw-r--r-- | xmake/core/base/hashset.lua | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xmake/core/base/bytes.lua b/xmake/core/base/bytes.lua index e2749f64e..9b32b0de4 100644 --- a/xmake/core/base/bytes.lua +++ b/xmake/core/base/bytes.lua @@ -214,7 +214,7 @@ function _instance:dump() if p + 0x20 <= e then -- dump offset - line = line .. string.format("${yellow}%08X ${green}", p) + line = line .. string.format("${color.dump.anchor}%08X ${color.dump.number}", p) -- dump data for i = 0, 0x20 - 1 do @@ -228,7 +228,7 @@ function _instance:dump() line = line .. " " -- dump characters - line = line .. "${magenta}" + line = line .. "${color.dump.string}" for i = 0, 0x20 - 1 do local v = self[p + i + 1] if v > 0x1f and v < 0x7f then @@ -251,7 +251,7 @@ function _instance:dump() local padding = n - 0x20 -- dump offset - line = line .. string.format("${yellow}%08X ${green}", p) + line = line .. string.format("${color.dump.anchor}%08X ${color.dump.number}", p) if padding >= 9 then padding = padding - 9 end @@ -278,7 +278,7 @@ function _instance:dump() end -- dump characters - line = line .. "${magenta}" + line = line .. "${color.dump.string}" for i = 0, left - 1 do local v = self[p + i + 1] if v > 0x1f and v < 0x7f then diff --git a/xmake/core/base/hashset.lua b/xmake/core/base/hashset.lua index 49e4f094e..7122c1b3f 100644 --- a/xmake/core/base/hashset.lua +++ b/xmake/core/base/hashset.lua @@ -27,7 +27,7 @@ local table = require("base/table") local todisplay = require("base/todisplay") -- representaion for nil key -hashset._NIL = setmetatable({}, { __todisplay = function() return "${color.dump.keyword}nil${reset}" end, __tostring = function() return "${color.dump.keyword}nil${reset}" end }) +hashset._NIL = setmetatable({}, { __todisplay = function() return "${color.dump.keyword}nil${reset}" end, __tostring = function() return "symbol(nil)" end }) function hashset:__todisplay() return string.format("hashset${reset}(%s) {%s}", todisplay(self._SIZE), table.concat(table.imap(table.keys(self._DATA), function (i, k) |
