diff options
author | b-r-o-c-k <brockmammen@gmail.com> | 2018-04-14 14:17:51 -0500 |
---|---|---|
committer | b-r-o-c-k <brockmammen@gmail.com> | 2018-04-14 14:17:51 -0500 |
commit | ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f (patch) | |
tree | 92de2079e80f5f289dd87a54af123cb7d90c3058 /scripts/gen_api_vimdoc.py | |
parent | 78bc52ea5397c092d01cd08296fe1dc85d998329 (diff) | |
parent | ef4feab0e75be19c5f41d70a001db980b72090f5 (diff) | |
download | rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.gz rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.bz2 rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'scripts/gen_api_vimdoc.py')
-rw-r--r-- | scripts/gen_api_vimdoc.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/gen_api_vimdoc.py b/scripts/gen_api_vimdoc.py index 51e585a007..69f70f6e2b 100644 --- a/scripts/gen_api_vimdoc.py +++ b/scripts/gen_api_vimdoc.py @@ -45,6 +45,8 @@ if sys.version_info[0] < 3: doc_filename = 'api.txt' # String used to find the start of the generated part of the doc. section_start_token = '*api-global*' +# Required prefix for API function names. +api_func_name_prefix = 'nvim_' # Section name overrides. section_name = { @@ -260,11 +262,11 @@ def parse_parblock(parent, width=62): def parse_source_xml(filename): """Collects API functions. - This returns two strings: - 1. The API functions - 2. The deprecated API functions + Returns two strings: + 1. API functions + 2. Deprecated API functions - The caller decides what to do with the deprecated documentation. + Caller decides what to do with the deprecated documentation. """ global xrefs xrefs = set() @@ -294,9 +296,8 @@ def parse_source_xml(filename): annotations = get_text(get_child(member, 'argsstring')) if annotations and ')' in annotations: annotations = annotations.rsplit(')', 1)[-1].strip() - # XXX: (doxygen 1.8.11) 'argsstring' only includes FUNC_ATTR_* - # attributes if the function signature is non-void. - # Force attributes here for such functions. + # XXX: (doxygen 1.8.11) 'argsstring' only includes attributes of + # non-void functions. Special-case void functions here. if name == 'nvim_get_mode' and len(annotations) == 0: annotations += 'FUNC_API_ASYNC' annotations = filter(None, map(lambda x: annotation_map.get(x), @@ -379,7 +380,7 @@ def parse_source_xml(filename): if 'Deprecated' in xrefs: deprecated_functions.append(func_doc) - else: + elif name.startswith(api_func_name_prefix): functions.append(func_doc) xrefs.clear() @@ -477,7 +478,7 @@ def gen_docs(config): docs += '\n\n\n' docs = docs.rstrip() + '\n\n' - docs += ' vim:tw=78:ts=8:ft=help:norl:' + docs += ' vim:tw=78:ts=8:ft=help:norl:\n' doc_file = os.path.join(base_dir, 'runtime/doc', doc_filename) delete_lines_below(doc_file, section_start_token) |