factored out Lua-specific function name/parms deduction

This commit is contained in:
steve donovan 2011-04-13 18:18:39 +02:00
parent 770edb40c0
commit 0e36a20ca4
1 changed files with 10 additions and 1 deletions

View File

@ -152,6 +152,10 @@ end
function Lang:find_module(tok)
end
function Lang:function_follows(t,v)
return false
end
function Lang:finalize()
self.empty_comment_ = self.start_comment_..'%s*$'
end
@ -192,6 +196,11 @@ function Lua:find_module(tok,t,v)
end
end
function Lua:function_follows(t,v)
return t == 'keyword' and v == 'function'
end
local lua = Lua()
class.CC(Lang)
@ -267,7 +276,7 @@ local function parse_file(fname,lang)
if ldoc_comment then
comment = table.concat(comment)
fun_follows = t == 'keyword' and v == 'function'
fun_follows = lang:function_follows(t,v)
if fun_follows or comment:find '@' then
tags = extract_tags(comment)
if doc.project_level(tags.class) then