tparam macros can be used in table definitions

This commit is contained in:
steve donovan 2012-12-13 19:17:32 +02:00
parent a551b47085
commit 8869cf4924
1 changed files with 5 additions and 5 deletions

View File

@ -442,7 +442,6 @@ function Item:finish()
if tags.see then if tags.see then
tags.see = tools.expand_comma_list(read_del(tags,'see')) tags.see = tools.expand_comma_list(read_del(tags,'see'))
end end
local fallback
if doc.project_level(self.type) then if doc.project_level(self.type) then
-- we are a module, so become one! -- we are a module, so become one!
self.items = List() self.items = List()
@ -461,13 +460,14 @@ function Item:finish()
end end
else else
self.parameter = 'field' self.parameter = 'field'
fallback = 'param'
end end
local field = self.parameter local field = self.parameter
local params = read_del(tags,field) local params = read_del(tags,field)
if fallback then -- use of macros like @string (which is short for '@tparam string')
local xparams = read_del(tags,fallback) -- can lead to param tags associated with a table.
params:extend(xparams) if self.parameter == 'field' then
params:extend(read_del(tags,'param'))
List(self.modifiers.field):extend(self.modifiers.param)
end end
local names, comments = List(), List() local names, comments = List(), List()
if params then if params then