From 180171ddffc5f7c2e7d0a20816373c41e0fa6931 Mon Sep 17 00:00:00 2001 From: Cheryl Foil Date: Sat, 16 Aug 2008 07:31:05 +0000 Subject: [PATCH] Fixed post comment behaviour git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-cherylfoil@10767 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/CParse/parser.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index eaf53449b..09aeb7381 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -105,8 +105,14 @@ static Node *new_node(const String_or_char *tag) { if(parseComments){ /* Sets any post comments to the previous node */ if(previousNode != NULL && currentPostComment != 0){ - String *copyPostComment = Copy(currentComment); - Setattr(previousNode,"DoxygenPostComment",copyPostComment); + String *copyPostComment = Copy(currentPostComment); + if (!Getattr(previousNode, "DoxygenComment")){ + Setattr(previousNode,"DoxygenComment",copyPostComment);} + else { + Append(copyPostComment, Getattr(previousNode, "DoxygenComment")); + Setattr(previousNode,"DoxygenComment",copyPostComment); + } + currentPostComment = 0; } /* Sets Doxygen Comment if a Comment is Availible */