return self.func:legacy_get(ft)
end,
- doc_get = function(self, ft)
- -- TODO: handle overridden docs sanely
- return M.Doc(self.func:implement_get():documentation_get(ft))
- end,
-
implement_get = function(self)
return M.Implement(self.func:implement_get())
end,
- fallback_doc_get = function(self, ft)
- if not ft then
- local fft = self:type_get()
- if fft == self.PROP_GET or fft == self.PROP_SET then
- ft = fft
- end
- end
- if ft then
- return self:doc_get(ft)
- end
- return nil
- end,
-
is_legacy_only = function(self, ft)
return self.func:is_legacy_only(ft)
end,
return M.Doc(self.impl:documentation_get(ftype))
end,
+ fallback_doc_get = function(self)
+ local ig, is = self:is_prop_get(), self:is_prop_set()
+ if ig and not is then
+ return self:doc_get(M.Function.PROP_GET)
+ elseif is and not ig then
+ return self:doc_get(M.Function.PROP_SET)
+ end
+ return nil
+ end,
+
is_auto = function(self, ftype)
return self.impl:is_auto(ftype)
end,
stat_incr("mret", false)
end
end
- if not fn:doc_get(fn.METHOD):exists() then
+ if not fn:implement_get():doc_get(fn.METHOD):exists() then
print_missing(fulln, "method")
stat_incr("method", true)
else
end
end
- if not fn:doc_get(fn.PROPERTY):exists() and not fn:doc_get(ft):exists() then
+ local pimp = fn:implement_get()
+
+ if not pimp:doc_get(fn.PROPERTY):exists() and not pimp:doc_get(ft):exists() then
print_missing(fulln, pfx .. "etter")
stat_incr(pfx .. "etter", true)
else
local buf = {}
gen_func_namesig(fn, cl, buf, false, false, false)
- local pimp = fn:implement_get()
+ local fimp = fn:implement_get()
- if pimp:is_pure_virtual(fn.METHOD) then
+ if fimp:is_pure_virtual(fn.METHOD) then
buf[#buf + 1] = "@pure_virtual "
end
buf[#buf + 1] = "{"
lbuf:write_raw(" ")
lbuf:write_i(pt)
end
+ local fimp = v:implement_get()
nt[#nt + 1] = {
lbuf:finish(),
- v:doc_get(v.METHOD):brief_get(v:fallback_doc_get())
+ fimp:doc_get(v.METHOD):brief_get(fimp:fallback_doc_get())
}
if v:type_str_get() == "property" then
build_property(v, cl)
end
f:write_h("Description", 2)
- f:write_raw(fn:doc_get(fn.METHOD):full_get(nil, true))
+ f:write_raw(fn:implement_get():doc_get(fn.METHOD):full_get(nil, true))
f:write_nl()
f:write_editable(mns, "description")
if isget then stats.check_property(fn, cl, fn.PROP_GET) end
if isset then stats.check_property(fn, cl, fn.PROP_SET) end
- local doc = fn:doc_get(fn.PROPERTY)
- local gdoc = fn:doc_get(fn.PROP_GET)
- local sdoc = fn:doc_get(fn.PROP_SET)
+ local pimp = fn:implement_get()
+
+ local doc = pimp:doc_get(fn.PROPERTY)
+ local gdoc = pimp:doc_get(fn.PROP_GET)
+ local sdoc = pimp:doc_get(fn.PROP_SET)
f:write_h("Signature", 2)
f:write_code(gen_prop_sig(fn, cl))