Added error reporting in case when there is no closing doxygen tag
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13266 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2d47ffc87d
commit
b3f53b98a0
1 changed files with 6 additions and 2 deletions
|
|
@ -156,13 +156,17 @@ std::string DoxygenParser::getStringTilEndCommand(std::string theCommand, TokenL
|
||||||
std::string description;
|
std::string description;
|
||||||
if (tokList.peek().tokenType == 0)
|
if (tokList.peek().tokenType == 0)
|
||||||
return "";
|
return "";
|
||||||
while (tokList.current() != tokList.end()
|
while (tokList.next().tokenString.compare(theCommand) != 0) {
|
||||||
&& tokList.next().tokenString.compare(theCommand) != 0) {
|
|
||||||
//TODO: it won't output doxygen commands, need a way to fix it
|
//TODO: it won't output doxygen commands, need a way to fix it
|
||||||
if (tokList.peek().tokenType == PLAINSTRING)
|
if (tokList.peek().tokenType == PLAINSTRING)
|
||||||
description += tokList.peek().tokenString + " ";
|
description += tokList.peek().tokenString + " ";
|
||||||
if (tokList.peek().tokenType == END_LINE)
|
if (tokList.peek().tokenType == END_LINE)
|
||||||
description += "\n";
|
description += "\n";
|
||||||
|
|
||||||
|
if (tokList.current() == tokList.end()) {
|
||||||
|
cout << "Error, @" << theCommand << " command expected." << endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tokList.next(); // eat the end command itself
|
tokList.next(); // eat the end command itself
|
||||||
return description;
|
return description;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue