function hs( bg )
local a = {}
local function b(bg)
if type(bg) ~= "table" then
return bg
end
local c = {}
a[bg] = c
for i,v in pairs(bg) do
c[b(i)] = b(v)
end
return setmetatable(c, getmetatable(bg))
end
return b(bg)
end
百度到的,不知道 local a = {} a[bg] = c 存在的意义
local a = {}
local function b(bg)
if type(bg) ~= "table" then
return bg
end
local c = {}
a[bg] = c
for i,v in pairs(bg) do
c[b(i)] = b(v)
end
return setmetatable(c, getmetatable(bg))
end
return b(bg)
end
百度到的,不知道 local a = {} a[bg] = c 存在的意义