[gtk-doc] mkdb: fix parsing of multiple annotations
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: fix parsing of multiple annotations
- Date: Wed, 8 Sep 2010 18:27:05 +0000 (UTC)
commit 8071b82a6d033f72e1ef0dacb8f9ab8e0b6c9ece
Author: Stefan Kost <ensonic users sf net>
Date: Wed Sep 8 21:25:38 2010 +0300
mkdb: fix parsing of multiple annotations
Tweak the regexp to support multiple annotations per comment. Reset var to
prevent extra parts of aanotations to be repeated.
gtkdoc-mkdb.in | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index a26f716..3b39eef 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2609,13 +2609,12 @@ sub ExpandAnnotation {
my ($symbol, $param_desc) = @_;
my $param_annotations = "";
- # look for annotations at the start of the comment
- if ($param_desc =~ m%^\s*\(([^)]*)\):%) {
+ # look for annotations at the start of the comment part
+ if ($param_desc =~ m%^\s*\((.*?)\):%) {
my @annotations;
my $annotation;
- my $annotation_extra = "";
$param_desc = $';
-
+
@annotations = split(/\)\s*\(/,$1);
foreach $annotation (@annotations) {
# need to search for the longest key-match in %AnnotationDefinition
@@ -2630,6 +2629,7 @@ sub ExpandAnnotation {
}
}
}
+ my $annotation_extra = "";
if ($match_annotation ne "") {
if ($annotation =~ m%$match_annotation\s+(.*)%) {
$annotation_extra = " $1";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]