Add isclass operator, make inspector print classes nicely

This commit is contained in:
2021-07-19 16:15:22 -04:00
parent 92f7d8cd91
commit f8f8a9843f
3 changed files with 34 additions and 1 deletions

View File

@@ -271,7 +271,13 @@ function Inspector:putTable(t)
if count > 0 then self:puts(',') end
self:tabify()
self:puts('<metatable> = ')
self:putValue(mt)
if isclass(mt) then
self:puts('<class ')
self:puts(rawget(mt, "__class"))
self:puts('>')
else
self:putValue(mt)
end
end
end)