q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b6d869c3f3ce9381f8717bcc72c66e5d2fcf516d

commit b6d869c3f3ce9381f8717bcc72c66e5d2fcf516d
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Mon Aug 15 13:53:01 2016 +0100

    docs: move all eolian init logic into doctree
---
 src/scripts/elua/apps/docgen/doctree.lua | 18 ++++++++++++++++--
 src/scripts/elua/apps/gendoc.lua         | 15 +++------------
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/scripts/elua/apps/docgen/doctree.lua 
b/src/scripts/elua/apps/docgen/doctree.lua
index 3c1967d..0808922 100644
--- a/src/scripts/elua/apps/docgen/doctree.lua
+++ b/src/scripts/elua/apps/docgen/doctree.lua
@@ -428,9 +428,23 @@ M.Event = Node:clone {
 
 M.scan_directory = function(dir)
     if not dir then
-        return eolian.system_directory_scan()
+        if not eolian.system_directory_scan() then
+            error("failed scanning system directory")
+        end
+        return
+    end
+    if not eolian.directory_scan(dir) then
+        error("failed scanning directory: " .. dir)
+    end
+end
+
+M.parse = function()
+    if not eolian.all_eot_files_parse() then
+        error("failed parsing eo type files")
+    end
+    if not eolian.all_eo_files_parse() then
+        error("failed parsing eo files")
     end
-    return eolian.directory_scan(dir)
 end
 
 return M
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 0329351..01fbf03 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -1092,22 +1092,13 @@ getopt.parse {
         dr = dutil.path_join(dr, dutil.nspace_to_path(rootns))
         dutil.init(dr)
         if #args == 0 then
-            if not dtree.scan_directory() then
-                error("failed scanning system directory")
-            end
+            dtree.scan_directory()
         else
             for i, p in ipairs(args) do
-                if not dtree.scan_directory(p) then
-                    error("failed scanning directory: " .. p)
-                end
+                dtree.scan_directory(p)
             end
         end
-        if not eolian.all_eot_files_parse() then
-            error("failed parsing eo type files")
-        end
-        if not eolian.all_eo_files_parse() then
-            error("failed parsing eo files")
-        end
+        dtree.parse()
         stats.init(not not opts["v"])
         local wfeatures = {
             notes = not opts["disable-notes"],

-- 


Reply via email to