q66 pushed a commit to branch master.

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

commit f43b8e24cc6161c6ba85022a542189c3ce89efd9
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Mon Aug 15 14:36:24 2016 +0100

    docs: initial Variable in doctree
---
 src/scripts/elua/apps/docgen/doctree.lua | 59 ++++++++++++++++++++++++++++++++
 src/scripts/elua/apps/gendoc.lua         |  2 +-
 2 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/src/scripts/elua/apps/docgen/doctree.lua 
b/src/scripts/elua/apps/docgen/doctree.lua
index 03290b9..128ad75 100644
--- a/src/scripts/elua/apps/docgen/doctree.lua
+++ b/src/scripts/elua/apps/docgen/doctree.lua
@@ -503,6 +503,65 @@ M.Event = Node:clone {
     end
 }
 
+M.Variable = Node:clone {
+    UNKNOWN = eolian.variable_type.UNKNOWN,
+    CONSTANT = eolian.variable_type.CONSTANT,
+    GLOBAL = eolian.variable_type.GLOBAL,
+
+    __ctor = function(self, var)
+        self.variable = var
+        assert(self.variable)
+    end,
+
+    type_get = function(self)
+        return self.variable:type_get()
+    end,
+
+    type_str_get = function(self)
+        local strs = {
+            [eolian.variable_type.CONSTANT] = "constant",
+            [eolian.variable_type.GLOBAL] = "global"
+        }
+        return strs[self:type_get()]
+    end,
+
+    doc_get = function(self)
+        return M.Doc(self.variable:documentation_get())
+    end,
+
+    file_get = function(self)
+        return self.variable:file_get()
+    end,
+
+    base_type_get = function(self)
+        return self.variable:base_type_get()
+    end,
+
+    value_get = function(self)
+        return self.variable:value_get()
+    end,
+
+    name_get = function(self)
+        return self.variable:name_get()
+    end,
+
+    full_name_get = function(self)
+        return self.variable:full_name_get()
+    end,
+
+    namespaces_get = function(self)
+        return self.variable:namespaces_get():to_array()
+    end,
+
+    is_extern = function(self)
+        return self.variable:is_extern()
+    end,
+
+    nspaces_get = function(self, root)
+        return M.Node.nspaces_get(self, self:type_str_get(), root)
+    end
+}
+
 local decl_to_nspace = function(decl)
     local dt = eolian.declaration_type
     local decltypes = {
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 742ce2a..29ee38e 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -822,7 +822,7 @@ local build_enum = function(tp)
 end
 
 local build_variable = function(v, constant)
-    local f = writer.Writer(dtree.Node.nspaces_get(v, constant and "constant" 
or "global"))
+    local f = writer.Writer(v:nspaces_get())
     if constant then
         stats.check_constant(v)
     else

-- 


Reply via email to