annotationparser: indent _parse_comment_block gtkdoc code
authorAlban Browaeys <prahal@yahoo.com>
Mon, 9 Apr 2012 23:06:45 +0000 (01:06 +0200)
committerColin Walters <walters@verbum.org>
Tue, 17 Apr 2012 15:12:24 +0000 (11:12 -0400)
commitf41525d54f53edd9b0d665397f7c6c755ee3616b
treeae6361d314066027ac13f801fa7fece311cc993b
parenta847eb8017259f0ba2e5a1be3afdd2016d2a2542
annotationparser: indent _parse_comment_block gtkdoc code

The current logic in _parse_comment_block of the annotationparser
check the identifier and use variables that only makes sense if a
result was returned (column_offset, original_line). This patch
indent the logic so it is only triggered if a result is found.
Otherwise it returns None as expected by call chain
"parse >  parse_comment_block > _parse_comment_block":
ie in "parse":
   comment_block = self.parse_comment_block(comment)
   if comment_block is not None:

This still raises a lot of warnings but does not abort while generating
gir for libgnomekbd, mutter or telepathy-glib (those thus have to be
tweaked not to call g-ir-scanner with --warn-error at least until the
parser mask those false positives or the doc from those projects is
fixed to comply with the behaviour expected by giscanner).

https://bugzilla.gnome.org/show_bug.cgi?id=673806
giscanner/annotationparser.py
tests/scanner/regress.h