mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
DocStringParser: Fix error message for empty parameter description.
This commit is contained in:
parent
032ea9bc5b
commit
0d0c9b8688
@ -119,21 +119,17 @@ DocStringParser::iter DocStringParser::parseDocTagParam(iter _pos, iter _end)
|
||||
return _end;
|
||||
}
|
||||
auto nameEndPos = firstSpaceOrTab(nameStartPos, _end);
|
||||
if (nameEndPos == _end)
|
||||
{
|
||||
appendError("End of param name not found: " + string(nameStartPos, _end));
|
||||
return _end;
|
||||
}
|
||||
auto paramName = string(nameStartPos, nameEndPos);
|
||||
|
||||
auto descStartPos = skipWhitespace(nameEndPos, _end);
|
||||
if (descStartPos == _end)
|
||||
auto nlPos = find(descStartPos, _end, '\n');
|
||||
|
||||
if (descStartPos == nlPos)
|
||||
{
|
||||
appendError("No description given for param " + paramName);
|
||||
return _end;
|
||||
}
|
||||
|
||||
auto nlPos = find(descStartPos, _end, '\n');
|
||||
auto paramDesc = string(descStartPos, nlPos);
|
||||
newTag("param");
|
||||
m_lastTag->paramName = paramName;
|
||||
|
Loading…
Reference in New Issue
Block a user