From 625abc3b7cf4a090aea76f2eef48fcc51753e75d Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Mon, 24 Jul 2000 14:22:16 +0000 Subject: 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 --- helpers/scandoc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'helpers') 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 "; # -- cgit v1.2.1