Modules may return a single _function_ (see tests/funmod.lua)
Steve Donovan
7 years ago
291 | 291 | end |
292 | 292 | if item_follows or comment_contains_tags(comment,args) then |
293 | 293 | tags = extract_tags(comment,args) |
294 | ||
294 | 295 | -- explicitly named @module (which is recommended) |
295 | 296 | if doc.project_level(tags.class) then |
296 | 297 | module_found = tags.name |
297 | 298 | -- might be a module returning a single function! |
298 | 299 | if tags.param or tags['return'] then |
299 | 300 | local parms, ret, summ = tags.param, tags['return'],tags.summary |
301 | local name = tags.name | |
300 | 302 | tags.param = nil |
301 | 303 | tags['return'] = nil |
302 | tags.summary = nil | |
303 | add_module(tags,tags.name,false) | |
304 | tags['class'] = nil | |
305 | tags['name'] = nil | |
306 | add_module(tags,name,false) | |
304 | 307 | tags = { |
305 | summary = summ, | |
308 | summary = '', | |
306 | 309 | name = 'returns...', |
307 | 310 | class = 'function', |
308 | 311 | ['return'] = ret, |