• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision9de02a0999886b4aeb889fdef7a8f57c88846225 (tree)
Zeit2024-03-30 11:43:34
AutorFs <Fsu0413@vip....>
CommiterFs

Log Message

indent dump table

Ändern Zusammenfassung

Diff

--- a/Compile/lib/Generate.lua
+++ b/Compile/lib/Generate.lua
@@ -1029,7 +1029,9 @@ gen.generateBuildCommand = function(self, para)
10291029 return ret
10301030 end
10311031
1032-gen.dumpConfTable = function(self, para)
1032+gen.dumpConfTable = function(self, para, indent)
1033+ if not indent then indent = 1 end
1034+
10331035 local returnText = "{\n"
10341036 local keys = {}
10351037
@@ -1042,7 +1044,7 @@ gen.dumpConfTable = function(self, para)
10421044 for _, k in ipairs(keys) do
10431045 local v = para[k]
10441046 -- key is always string
1045- returnText = returnText .. "[\"" .. k .. "\"] = "
1047+ returnText = returnText .. string.rep("\t", indent) .. "[\"" .. k .. "\"] = "
10461048 if type(v) == "nil" then
10471049 returnText = returnText .. "nil"
10481050 elseif type(v) == "string" then
@@ -1050,13 +1052,13 @@ gen.dumpConfTable = function(self, para)
10501052 elseif type(v) == "boolean" then
10511053 returnText = returnText .. (v and "true" or "false")
10521054 elseif type(v) == "table" then
1053- returnText = returnText .. self:dumpConfTable(v)
1055+ returnText = returnText .. self:dumpConfTable(v, indent + 1)
10541056 else
10551057 returnText = returnText .. tostring(v)
10561058 end
10571059 returnText = returnText .. ",\n"
10581060 end
1059- returnText = returnText .. "}"
1061+ returnText = returnText .. string.rep("\t", indent - 1) .. "}"
10601062 return returnText
10611063 end
10621064