Fixed a bug in parser with doxygen commands like code, dot, verbatim and so on

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13254 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dmitry Kabak 2012-07-04 22:28:41 +00:00
commit 4398d1aee4

View file

@ -158,10 +158,14 @@ std::string DoxygenParser::getStringTilEndCommand(std::string theCommand, TokenL
std::string description;
if (tokList.peek().tokenType == 0)
return "";
while (tokList.peek().tokenString.compare(theCommand) != 0) {
Token currentToken = tokList.next();
description = description + currentToken.tokenString + " ";
while (tokList.next().tokenString.compare(theCommand) != 0) {
//TODO: it won't output doxygen commands, need a way to fix it
if (tokList.peek().tokenType == PLAINSTRING)
description += tokList.peek().tokenString + " ";
if (tokList.peek().tokenType == END_LINE)
description += "\n";
}
tokList.next(); // eat the end command itself
return description;
}