Codebase list lua-ldoc / b09f7f8
unknown typename check for kind_names; updated ldoc's config.ld steve donovan 10 years ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
66 dir='../out'
77 readme='doc.md'
88 style='!pale'
9 kind_names={topic='Manual',script='Programs'}
910 examples = {
1011 '../tests/styles/colon.lua',
1112 '../tests/styles/four.lua',
118118 -- the ldoc table represents the API available in `config.ld`.
119119 local ldoc = { charset = 'UTF-8' }
120120
121 local kind_names
121 local known_types, kind_names = {}
122122
123123 local function lookup (itype,igroup,isubgroup)
124124 local kn = kind_names[itype]
125 known_types[itype] = true
125126 if kn then
126127 if type(kn) == 'string' then
127128 igroup = kn
147148 ProjectMap:add_kind(lookup('classmod','Classes'))
148149 ProjectMap:add_kind(lookup('topic','Topics'))
149150 ProjectMap:add_kind(lookup('example','Examples'))
151
152 for k in pairs(kind_names) do
153 if not known_types[k] then
154 quit("unknown item type "..tools.quote(k).." in kind_names")
155 end
156 end
150157 end
151158
152159