q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a621f0bd1ab4ac585804a5e35f94ff34d1d1b07c
commit a621f0bd1ab4ac585804a5e35f94ff34d1d1b07c Author: Daniel Kolesa <d.kol...@osg.samsung.com> Date: Fri Aug 12 14:19:32 2016 +0100 docs: fully utilize Function's type_str_get --- src/scripts/elua/apps/docgen/mappings.lua | 15 ++++++--------- src/scripts/elua/apps/gendoc.lua | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/scripts/elua/apps/docgen/mappings.lua b/src/scripts/elua/apps/docgen/mappings.lua index dc97de5..03449be 100644 --- a/src/scripts/elua/apps/docgen/mappings.lua +++ b/src/scripts/elua/apps/docgen/mappings.lua @@ -3,13 +3,6 @@ local dtree = require("docgen.doctree") local M = {} -M.funct_to_str = { - [eolian.function_type.PROPERTY] = "property", - [eolian.function_type.PROP_GET] = "property", - [eolian.function_type.PROP_SET] = "property", - [eolian.function_type.METHOD] = "method" -} - M.pdir_to_str = { [eolian.parameter_dir.IN] = "(in)", [eolian.parameter_dir.OUT] = "(out)", @@ -115,12 +108,16 @@ M.gen_nsp_ref = function(str, root) if fn then ftype = fn:type_get() end end - if not fn or not M.funct_to_str[ftype] then + if fn then + fn = dtree.Function(fn) + end + + if not fn or not fn:type_str_get() then error("invalid reference '" .. str .. "'") end local ret = M.gen_nsp_ref(bstr) - ret[#ret + 1] = M.funct_to_str[ftype] + ret[#ret + 1] = fn:type_str_get() ret[#ret + 1] = fn:name_get():lower() if root then ret[#ret + 1] = true end return ret diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua index 9668a13..517deec 100644 --- a/src/scripts/elua/apps/gendoc.lua +++ b/src/scripts/elua/apps/gendoc.lua @@ -376,7 +376,7 @@ local build_functable = function(f, title, ctitle, cl, tp) nt[#nt + 1] = { lbuf:finish(), get_brief_fdoc(v) } - if eomap.funct_to_str[v:type_get()] == "property" then + if v:type_str_get() == "property" then build_property(v, cl) else build_method(v, cl) --