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