From 452b6557aaa9ce9c64571b3f6019afef02e8f73b Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 12 Aug 2016 13:25:58 +0100 Subject: [PATCH] docs: get rid of dependency of doctree on mappings --- src/scripts/elua/apps/docgen/doctree.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/scripts/elua/apps/docgen/doctree.lua b/src/scripts/elua/apps/docgen/doctree.lua index 3e0a980..8b90f59 100644 --- a/src/scripts/elua/apps/docgen/doctree.lua +++ b/src/scripts/elua/apps/docgen/doctree.lua @@ -4,7 +4,6 @@ local eolian = require("eolian") local dutil = require("docgen.util") local writer = require("docgen.writer") -local eomap = require("docgen.mappings") local M = {} @@ -112,6 +111,13 @@ M.Doc = Node:clone { end } +local classt_to_str = { + [eolian.class_type.REGULAR] = "class", + [eolian.class_type.ABSTRACT] = "class", + [eolian.class_type.MIXIN] = "mixin", + [eolian.class_type.INTERFACE] = "interface" +} + M.Class = Node:clone { __ctor = function(self, cl) self.class = cl @@ -171,7 +177,7 @@ M.Class = Node:clone { for i = 1, #tbl do tbl[i] = tbl[i]:lower() end - table.insert(tbl, 1, eomap.classt_to_str[self.class:type_get()]) + table.insert(tbl, 1, classt_to_str[self.class:type_get()]) tbl[#tbl + 1] = self:name_get():lower() if root then tbl[#tbl + 1] = true -- 2.7.4