Fixed a bug with freezing on commands like \code, \link and others

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13330 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dmitry Kabak 2012-07-17 23:17:17 +00:00
commit 3d5d66dbd3

View file

@ -331,7 +331,7 @@ int DoxygenParser::addCommandEndCommand(std::string theCommand, TokenList & tokL
}
std::list < DoxygenEntity > aNewList;
aNewList = parse(endCommand, tokList);
tokList.next();
tokList.next();
doxyList.push_back(DoxygenEntity(theCommand, aNewList));
return 1;
}
@ -768,6 +768,12 @@ std::list < DoxygenEntity > DoxygenParser::parse(std::list < Token >::iterator e
} else if (currToken.tokenType == PLAINSTRING) {
addCommand(currPlainstringCommandType, tokList, aNewList);
}
if (endParsingIndex != tokList.end() && tokList.current() == tokList.end()) {
// this could happen if we cant reach the original endParsingIndex
tokList.printListError("Unexpected end of comment encountered");
break;
}
}
return aNewList;
}