summaryrefslogtreecommitdiff
path: root/giscanner/sectionparser.py
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2020-06-06 02:13:38 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2020-07-12 04:10:40 +0200
commitb8c92fddbfbadc910ef0c0c6c65bd5648b8e86ca (patch)
tree24fb56f6eed5696ef96473d2debce108b422fb5f /giscanner/sectionparser.py
parente7c17469ef3eb1c3a1c4c717800c277ee231405c (diff)
downloadgobject-introspection-b8c92fddbfbadc910ef0c0c6c65bd5648b8e86ca.tar.gz
Add the notion of standalone doc sections.
Up to now, section annotations had to match a class or interface name in order to be serialized in the gir. With this commit, they now get serialized as docsection nodes, for potential use by documentation tools.
Diffstat (limited to 'giscanner/sectionparser.py')
-rw-r--r--giscanner/sectionparser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/sectionparser.py b/giscanner/sectionparser.py
index ed4660fe..b8850432 100644
--- a/giscanner/sectionparser.py
+++ b/giscanner/sectionparser.py
@@ -148,5 +148,7 @@ def generate_sections_file(transformer):
append_symbol(section, meth.symbol)
for meth in node.static_methods:
append_symbol(section, meth.symbol)
+ elif isinstance(node, ast.DocSection):
+ section = new_section(None, node.name)
return SectionsFile(sections)