new flag: -N,--no_args_infer don't infer arguments from source
This commit is contained in:
parent
ff0eebceb2
commit
1bcd76e307
5
ldoc.lua
5
ldoc.lua
|
@ -58,6 +58,7 @@ ldoc, a documentation generator for Lua, vs ]]..version..[[
|
|||
-X,--not_luadoc break LuaDoc compatibility. Descriptions may continue after tags.
|
||||
-D,--define (default none) set a flag to be used in config.ld
|
||||
-C,--colon use colon style
|
||||
-N,--no_args_infer don't infer arguments from source
|
||||
-B,--boilerplate ignore first comment in source files
|
||||
-M,--merge allow module merging
|
||||
-S,--simple no return or params, no summary
|
||||
|
@ -239,7 +240,8 @@ local ldoc_contents = {
|
|||
'unqualified', 'custom_display_name_handler', 'kind_names', 'custom_references',
|
||||
'dont_escape_underscore','global_lookup','prettify_files','convert_opt', 'user_keywords',
|
||||
'postprocess_html',
|
||||
'custom_css','version'
|
||||
'custom_css','version',
|
||||
'no_args_infer'
|
||||
}
|
||||
ldoc_contents = tablex.makeset(ldoc_contents)
|
||||
|
||||
|
@ -424,6 +426,7 @@ local process_file_list = tools.process_file_list
|
|||
|
||||
setup_package_base()
|
||||
|
||||
override 'no_args_infer'
|
||||
override 'colon'
|
||||
override 'merge'
|
||||
override 'not_luadoc'
|
||||
|
|
|
@ -225,7 +225,7 @@ local function parse_file(fname, lang, package, args)
|
|||
return nil
|
||||
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
|
||||
t,v = tnext(tok)
|
||||
end
|
||||
|
@ -314,7 +314,9 @@ local function parse_file(fname, lang, package, args)
|
|||
tags:add('class','function')
|
||||
end
|
||||
item_follows, is_local = false, false
|
||||
elseif lang:is_module_modifier (tags) then
|
||||
elseif args.no_args_infer then
|
||||
F:error("No name and type provided (no_args_infer)")
|
||||
elseif lang:is_module_modifier (tags) then
|
||||
if not item_follows then
|
||||
F:warning("@usage or @export followed by unknown code")
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue