diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-11-19 21:49:13 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2018-11-28 09:29:07 -0300 |
commit | 925c3b875861e83d3d6808439b61e80fe5ee8b48 (patch) | |
tree | e3e40f76f07d429c8fbec25949d5ccb55a2e210c /giscanner/transformer.py | |
parent | e194cf780fb13932be2e158d5eb23db737a6e0db (diff) | |
download | gobject-introspection-925c3b875861e83d3d6808439b61e80fe5ee8b48.tar.gz |
writer: Include documentation and symbol position in source files
Some documentation tool (as hotdoc[0]) need to have information about
symbol declaration and documentation positions in the source files
to be able to do smart indexing (automatically build the documenation
index).
[0] https://hotdoc.github.io/
Fixes #175
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r-- | giscanner/transformer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 2c412339..bb0eb3e0 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -626,7 +626,8 @@ raise ValueError.""" # https://bugzilla.gnome.org/show_bug.cgi?id=755882 if name.endswith('_autoptr'): return None - return ast.Alias(name, target, ctype=symbol.ident) + node = ast.Alias(name, target, ctype=symbol.ident) + node.add_symbol_reference(symbol) else: raise NotImplementedError( "symbol '%s' of type %s" % (symbol.ident, ctype_name(ctype))) |