parameter names which were List methods overwriting object - factor out as map field

This commit is contained in:
Steve Donovan 2014-04-23 13:19:16 +02:00
parent 251dc88f93
commit 624ff11afd
5 changed files with 8 additions and 16 deletions

View File

@ -760,5 +760,3 @@ if args.verbose then
print 'modules'
for k in pairs(module_list.by_name) do print(k) end
end

View File

@ -725,6 +725,8 @@ function Item:finish()
local original_names = formal and formal or param_names
local names = List()
self.subparams = {}
params.map = {}
for i,name in ipairs(original_names) do
if type(name) ~= 'string' then
self:error("declared table cannot have array entries")
@ -742,7 +744,7 @@ function Item:finish()
fields = nil
end
params[name] = comments[i]
params.map[name] = comments[i]
if pmods then
pmods[name] = pmods[i]
end
@ -1264,7 +1266,7 @@ function Item:dump(verbose)
if #self.params > 0 then
print 'parameters:'
for _,p in ipairs(self.params) do
print('',p,self.params[p])
print('',p,self.params.map[p])
end
end
if self.ret and #self.ret > 0 then

View File

@ -173,7 +173,7 @@ return [==[
# for parm in iter(item.params) do
# local param,sublist = item:subparam(parm)
# if sublist then
<li><span class="parameter">$(sublist)</span>$(M(item.params[sublist],item))
<li><span class="parameter">$(sublist)</span>$(M(item.params.map[sublist],item))
<ul>
# end
# for p in iter(param) do
@ -182,7 +182,7 @@ return [==[
# if tp ~= '' then
<span class="types">$(tp)</span>
# end
$(M(item.params[p],item))
$(M(item.params.map[p],item))
# if def then
(<em>default</em> $(def))
# end

View File

@ -1,4 +1,5 @@
format='markdown'
project = 'Basic Example'
file = {'types.lua','classes.lua'}
topics = {'one.md','two.md'}
use_markdown_titles=true
topics = {'one 1.md','two.md'}

View File

@ -1,9 +0,0 @@
# Something for all!
## First Topic
A first topic
## Second Topic
A second topic