renamed comma variable

This commit is contained in:
kikito 2013-09-14 17:06:06 +02:00
parent c34213d266
commit 7a0dae850d

View File

@ -175,8 +175,8 @@ function Inspector:puts(...)
return self return self
end end
function Inspector:commaControl(comma) function Inspector:commaControl(needsComma)
if comma then self:puts(',') end if needsComma then self:puts(',') end
return true return true
end end
@ -201,21 +201,21 @@ function Inspector:putTable(t)
if length >= 1 then self:tabify() end -- tabify the array values if length >= 1 then self:tabify() end -- tabify the array values
end end
local comma = false local needsComma = false
for i=1, length do for i=1, length do
comma = self:commaControl(comma) needsComma = self:commaControl(needsComma)
self:puts(' '):putValue(t[i]) self:puts(' '):putValue(t[i])
end end
local dictKeys = getDictionaryKeys(t) local dictKeys = getDictionaryKeys(t)
for _,k in ipairs(dictKeys) do for _,k in ipairs(dictKeys) do
comma = self:commaControl(comma) needsComma = self:commaControl(needsComma)
self:tabify():putKey(k):puts(' = '):putValue(t[k]) self:tabify():putKey(k):puts(' = '):putValue(t[k])
end end
if mt then if mt then
comma = self:commaControl(comma) needsComma = self:commaControl(needsComma)
self:tabify():puts('<metatable> = '):putValue(mt) self:tabify():puts('<metatable> = '):putValue(mt)
end end