aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-02-26 10:33:38 -0500
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-02-26 10:33:38 -0500
commitdb4c0c32f0def494e351ca968dfaa67d1588b6a7 (patch)
treeaf8025c8e54b61cbb6c904d6d98d3ac8466d6d06 /scripts
parentf28b0254397541ea46b5eced805597d6d72e5b1a (diff)
Support multiple '@return' tags in Lua Adeptsense documentation.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/adeptsensedoc.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/adeptsensedoc.lua b/scripts/adeptsensedoc.lua
index 1f8cdcc3..cfae8898 100644
--- a/scripts/adeptsensedoc.lua
+++ b/scripts/adeptsensedoc.lua
@@ -64,7 +64,13 @@ local function write_apidoc(file, m, b)
end
end
-- Function returns (@return).
- if b.class == 'function' and b.ret then doc[#doc + 1] = '@return '..b.ret end
+ if b.class == 'function' and b.ret then
+ if type(b.ret) == 'string' then
+ doc[#doc + 1] = '@return '..b.ret
+ else
+ for _, u in ipairs(b.ret) do doc[#doc + 1] = '@return '..u end
+ end
+ end
-- See also (@see).
if b.see then
if type(b.see) == 'string' then