aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-09-25 13:45:41 +0200
committerJustin M. Keyes <justinkz@gmail.com>2022-09-25 14:31:33 +0200
commit1b60b5ec94001f18b70dbebf6c232c33209f11b5 (patch)
tree9a6bdfcb05511b1bdae304c1c06da252a0adaa71 /scripts/gen_vimdoc.py
parent3169fc54a129f6dd1c0baf2d404e50381cf48e8f (diff)
downloadrneovim-1b60b5ec94001f18b70dbebf6c232c33209f11b5.tar.gz
rneovim-1b60b5ec94001f18b70dbebf6c232c33209f11b5.tar.bz2
rneovim-1b60b5ec94001f18b70dbebf6c232c33209f11b5.zip
fix(gen_vimdoc.py): handle missing luajit
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 766c420c7d..306857ca6c 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -295,14 +295,16 @@ annotation_map = {
# or if `cond()` is callable and returns True.
def debug_this(o, cond=True):
name = ''
+ if cond is False:
+ return
if not isinstance(o, str):
try:
name = o.nodeName
o = o.toprettyxml(indent=' ', newl='\n')
except Exception:
pass
- if ((callable(cond) and cond())
- or (not callable(cond) and cond)
+ if (cond is True
+ or (callable(cond) and cond())
or (not callable(cond) and cond in o)):
raise RuntimeError('xxx: {}\n{}'.format(name, o))
@@ -887,7 +889,7 @@ def extract_from_xml(filename, target, width, fmt_vimhelp):
def fmt_doxygen_xml_as_vimhelp(filename, target):
"""Entrypoint for generating Vim :help from from Doxygen XML.
- Returns 3 items:
+ Returns 2 items:
1. Vim help text for functions found in `filename`.
2. Vim help text for deprecated functions.
"""
@@ -1094,7 +1096,11 @@ def main(config, args):
fn_map_full.update(fn_map)
if len(sections) == 0:
- fail(f'no sections for target: {target}')
+ if target == 'lua':
+ fail(f'no sections for target: {target} (this usually means'
+ + ' "luajit" was not found by scripts/lua2dox_filter)')
+ else:
+ fail(f'no sections for target: {target}')
if len(sections) > len(CONFIG[target]['section_order']):
raise RuntimeError(
'found new modules "{}"; update the "section_order" map'.format(