[gtk-doc] common: also handle // comments in addition to /* */ ones.
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] common: also handle // comments in addition to /* */ ones.
- Date: Sun, 3 Jan 2010 11:35:17 +0000 (UTC)
commit 31f4610758e64b442394a4756fea623cebc380ca
Author: Stefan Kost <ensonic users sf net>
Date: Sun Jan 3 13:27:27 2010 +0200
common: also handle // comments in addition to /* */ ones.
Before we got error about parsing struct/union fields if they used // comments.
gtkdoc-common.pl.in | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in
index ac62744..ce7a96c 100644
--- a/gtkdoc-common.pl.in
+++ b/gtkdoc-common.pl.in
@@ -110,11 +110,13 @@ sub ParseStructDeclaration {
(?:/\*\s*<\s*public\s*>\s*\*/|(?=\}))!$1!msgx;
}
+ # Remove private symbols
# Assume end of declaration if line begins with '}'
$declaration =~ s!\n?[ \t]*/\*\s*<\s*(private|protected)\s*>\s*\*/.*?(?:/\*\s*<\s*public\s*>\s*\*/|(?=^\}))!!msgx;
# Remove all other comments;
$declaration =~ s@/\*([^*]+|\*(?!/))*\*/@ @g;
+ $declaration =~ s@//.*$@@g;
my @result = ();
@@ -251,8 +253,9 @@ sub ParseEnumDeclaration {
return ();
}
- # Remove comments;
+ # Remove comments
$declaration =~ s@/\*([^*]+|\*(?!/))*\*/@ @g;
+ $declaration =~ s@//.*$@@g;
my @result = ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]