docs: use more abstracted doctree APIs

This commit is contained in:
Daniel Kolesa 2016-08-12 14:22:14 +01:00
parent a621f0bd1a
commit 00049bd798
1 changed files with 2 additions and 6 deletions

View File

@ -82,7 +82,7 @@ M.gen_nsp_ref = function(str, root)
local ftp = eolian.function_type
local cl = eolian.class_get_by_name(bstr)
local cl = dtree.Class.by_name_get(bstr)
local fn
local ftype = ftp.UNRESOLVED
if not cl then
@ -98,7 +98,7 @@ M.gen_nsp_ref = function(str, root)
error("invalid reference '" .. str .. "'")
end
bstr = bstr:match("(.+)%.[^.]+")
cl = eolian.class_get_by_name(bstr)
cl = dtree.Class.by_name_get(bstr)
if cl then
fn = cl:function_get_by_name(mname, ftype)
end
@ -108,10 +108,6 @@ M.gen_nsp_ref = function(str, root)
if fn then ftype = fn:type_get() end
end
if fn then
fn = dtree.Function(fn)
end
if not fn or not fn:type_str_get() then
error("invalid reference '" .. str .. "'")
end