summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2000-07-24 14:22:16 +0000
committerRyan Bloom <rbb@apache.org>2000-07-24 14:22:16 +0000
commit625abc3b7cf4a090aea76f2eef48fcc51753e75d (patch)
tree0ba1b301d68dee56179df2d3b05a44ef2f9a90d7 /helpers
parentb57e55c922438cf575f220798bb574a65e7405c5 (diff)
downloadapr-625abc3b7cf4a090aea76f2eef48fcc51753e75d.tar.gz
ScanDoc recently committed a change that correctly parsed "extern C". I am
adding that change to the scanDoc in our tree and removing the horrible hack I added to make it work in the meantime. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60436 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/scandoc27
1 files changed, 17 insertions, 10 deletions
diff --git a/helpers/scandoc b/helpers/scandoc
index 5a0ebb492..a35bdc269 100755
--- a/helpers/scandoc
+++ b/helpers/scandoc
@@ -187,16 +187,16 @@ sub skipBody {
$nest = 1;
-# for (;;) {
-# if (&matchRBracket) { $nest++; }
-# elsif (&matchLBracket) {
-# $nest--;
-# last if !$nest;
-# }
-# else {
-# last if ((($valid,) = &matchKW( "[^\{\}]")) && !$valid);
-# }
-# }
+ for (;;) {
+ if (&matchRBracket) { $nest++; }
+ elsif (&matchLBracket) {
+ $nest--;
+ last if !$nest;
+ }
+ else {
+ last if ((($valid,) = &matchKW( "[^\{\}]")) && !$valid);
+ }
+ }
}
# Skip a string. (multiline)
@@ -613,6 +613,13 @@ sub parseDeclaration {
elsif ((($valid,)=&matchKW( "friend\s*class" )) && $valid) {
&skipToSemi;
}
+ elsif ((($valid, $token) = &matchKW("extern\\s*\\\"C\\\"")) && $valid) {
+ &matchRBracket;
+ while (!&matchLBracket) {
+ &parseDeclaration( '' ) || die "Unmatched brace! line = $linenumber\n";
+ }
+ &matchSemi;
+ }
# elsif ($kw = &matchID) {
# $type = "$kw ";
#