diff options
Diffstat (limited to 'scripts/qapi/doc.py')
-rwxr-xr-x | scripts/qapi/doc.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py index 433e9fcbfb..5fc0fc7e06 100755 --- a/scripts/qapi/doc.py +++ b/scripts/qapi/doc.py @@ -182,6 +182,17 @@ def texi_members(doc, what, base, variants, member_func): return '\n@b{%s:}\n@table @asis\n%s@end table\n' % (what, items) +def texi_features(doc): + """Format the table of features""" + items = '' + for section in doc.features.values(): + desc = texi_format(section.text) + items += '@item @code{%s}\n%s' % (section.name, desc) + if not items: + return '' + return '\n@b{Features:}\n@table @asis\n%s@end table\n' % (items) + + def texi_sections(doc, ifcond): """Format additional sections following arguments""" body = '' @@ -201,6 +212,7 @@ def texi_entity(doc, what, ifcond, base=None, variants=None, member_func=texi_member): return (texi_body(doc) + texi_members(doc, what, base, variants, member_func) + + texi_features(doc) + texi_sections(doc, ifcond)) |