Merge pull request #243 from mpeterv/fix-module-call-parse
Fix module call parse
This commit is contained in:
commit
088034e437
|
@ -231,8 +231,13 @@ local function parse_file(fname, lang, package, args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if lang.parse_module_call and t ~= 'comment' then
|
if lang.parse_module_call and t ~= 'comment' then
|
||||||
while t and not (t == 'iden' and v == 'module') do
|
local prev_token
|
||||||
t,v = tnext(tok)
|
while t do
|
||||||
|
if prev_token ~= '.' and prev_token ~= ':' and t == 'iden' and v == 'module' then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
prev_token = t
|
||||||
|
t, v = tnext(tok)
|
||||||
end
|
end
|
||||||
if not t then
|
if not t then
|
||||||
if not args.ignore then
|
if not args.ignore then
|
||||||
|
@ -241,7 +246,7 @@ local function parse_file(fname, lang, package, args)
|
||||||
--return nil
|
--return nil
|
||||||
else
|
else
|
||||||
mod,t,v = lang:parse_module_call(tok,t,v)
|
mod,t,v = lang:parse_module_call(tok,t,v)
|
||||||
if mod ~= '...' then
|
if mod and mod ~= '...' then
|
||||||
add_module(Tags.new{summary='(no description)'},mod,true)
|
add_module(Tags.new{summary='(no description)'},mod,true)
|
||||||
first_comment = false
|
first_comment = false
|
||||||
module_found = true
|
module_found = true
|
||||||
|
|
Loading…
Reference in New Issue