factored out Lua-specific function name/parms deduction
This commit is contained in:
parent
770edb40c0
commit
0e36a20ca4
11
ldoc.lua
11
ldoc.lua
|
@ -152,6 +152,10 @@ end
|
||||||
function Lang:find_module(tok)
|
function Lang:find_module(tok)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Lang:function_follows(t,v)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function Lang:finalize()
|
function Lang:finalize()
|
||||||
self.empty_comment_ = self.start_comment_..'%s*$'
|
self.empty_comment_ = self.start_comment_..'%s*$'
|
||||||
end
|
end
|
||||||
|
@ -192,6 +196,11 @@ function Lua:find_module(tok,t,v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Lua:function_follows(t,v)
|
||||||
|
return t == 'keyword' and v == 'function'
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local lua = Lua()
|
local lua = Lua()
|
||||||
|
|
||||||
class.CC(Lang)
|
class.CC(Lang)
|
||||||
|
@ -267,7 +276,7 @@ local function parse_file(fname,lang)
|
||||||
|
|
||||||
if ldoc_comment then
|
if ldoc_comment then
|
||||||
comment = table.concat(comment)
|
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
|
if fun_follows or comment:find '@' then
|
||||||
tags = extract_tags(comment)
|
tags = extract_tags(comment)
|
||||||
if doc.project_level(tags.class) then
|
if doc.project_level(tags.class) then
|
||||||
|
|
Loading…
Reference in New Issue