[gtk-doc] scan: improve the brace counting
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] scan: improve the brace counting
- Date: Mon, 20 Jun 2011 11:04:30 +0000 (UTC)
commit 30b092765d569736b86f354296fbcb13cc931213
Author: David NeÄas <yeti physics muni cz>
Date: Mon Jun 20 13:02:41 2011 +0200
scan: improve the brace counting
Eliminate groups of braces on the same line.
gtkdoc-scan.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index 1f2e145..749038f 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -679,6 +679,9 @@ sub ScanHeader {
if ($skip_block == 0) {
$decl .= $_;
} else {
+ # Remove all nested pairs of curly braces.
+ while ($_ =~ s/{[^{]*}//g) { }
+ # Then hope at most one remains in the line...
if (m%(.*?){%) {
if ($skip_block == 1) {
$decl .= $1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]