no more fooling with globals in LDoc; the class ModuleMap is no longer global, but inserted into doc module so it can use it
This commit is contained in:
parent
fd323aa286
commit
4666e464cc
6
ldoc.lua
6
ldoc.lua
|
@ -82,8 +82,8 @@ local Item,File,Module = doc.Item,doc.File,doc.Module
|
|||
local quit = utils.quit
|
||||
|
||||
|
||||
class.ModuleMap(KindMap)
|
||||
local ModuleMap = ModuleMap
|
||||
local ModuleMap = class(KindMap)
|
||||
doc.ModuleMap = ModuleMap
|
||||
|
||||
function ModuleMap:_init ()
|
||||
self.klass = ModuleMap
|
||||
|
@ -97,7 +97,7 @@ ModuleMap:add_kind('lfunction','Local Functions','Parameters')
|
|||
ModuleMap:add_kind('annotation','Issues')
|
||||
|
||||
|
||||
class.ProjectMap(KindMap)
|
||||
local ProjectMap = class(KindMap)
|
||||
ProjectMap.project_level = true
|
||||
|
||||
function ProjectMap:_init ()
|
||||
|
|
|
@ -264,7 +264,7 @@ function File:finish()
|
|||
if not submodule then
|
||||
this_mod.package = package
|
||||
this_mod.mod_name = mname
|
||||
this_mod.kinds = ModuleMap() -- the iterator over the module contents
|
||||
this_mod.kinds = doc.ModuleMap() -- the iterator over the module contents
|
||||
self.modules:append(this_mod)
|
||||
end
|
||||
elseif doc.section_tag(item.type) then
|
||||
|
|
Loading…
Reference in New Issue