]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix bug: namespaces can end in } without a semicolon. Elements after such a closing...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 Feb 2003 16:55:20 +0000 (16:55 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 3 Feb 2003 16:55:20 +0000 (16:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@7006 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/kdoc/src/kdoc

index 114c873ce52bb55c9e239bb2b65b701d64fc71fb..c94dbf493f946867ab82a5058de41f6b3ea6322a 100755 (executable)
@@ -600,7 +600,7 @@ sub identifyDecl
            $newNode = newFriendClass ($2, $1);
        }
 
-       # Class/Struct
+       # Class/Struct/Namespace
        elsif ( $decl =~ /^\s*((?:template\s*<.*>)?)      # 1 template
                                        \s*(class|struct|union|namespace) # 2 struct type
                                        \s+([\w_]+                        # 3 name
@@ -774,9 +774,17 @@ sub identifyDecl
 
                $skipBlock = 1 if $end eq '{';
        }
-       # end of an "extern" block
+       # end of an "extern" or namespace block
        elsif ( $decl =~ /^\s*}\s*$/ ) {
-               $inExtern = 0;
+               if ( ! ($#classStack < 0 )) {
+                   $cNode = pop @classStack;
+
+                   print "end decl: popped $cNode->{astNodeName}\n" 
+                       if $debug;
+               }
+               else {
+                   $inExtern = 0;
+               }
        }
        # end of an in-block declaration
        elsif ( $decl =~ /^\s*}\s*(.*?)\s*;\s*$/ ) {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.