Skip to content

Commit

Permalink
Improve handling of @param command without name or description
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Feb 20, 2021
1 parent 5fff1fc commit 52352ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/docparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4518,7 +4518,7 @@ int DocParamList::parse(const QCString &cmdName)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"expected whitespace after \\%s command",
qPrint(saveCmdName));
retval=0;
retval=RetVal_EndParBlock;
goto endparamlist;
}
doctokenizerYYsetStateParam();
Expand Down Expand Up @@ -4556,14 +4556,17 @@ int DocParamList::parse(const QCString &cmdName)
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"unexpected end of comment block while parsing the "
"argument of command %s",qPrint(saveCmdName));
retval=0;
retval=RetVal_EndParBlock;
goto endparamlist;
}
if (tok!=TK_WHITESPACE) /* premature end of comment block */
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"unexpected token in comment block while parsing the "
"argument of command %s",qPrint(saveCmdName));
retval=0;
if (tok!=TK_NEWPARA) /* empty param description */
{
warn_doc_error(g_fileName,getDoctokinizerLineNr(),"unexpected token in comment block while parsing the "
"argument of command %s",qPrint(saveCmdName));
}
retval=RetVal_EndParBlock;
goto endparamlist;
}

Expand Down
2 changes: 1 addition & 1 deletion src/doctokenizer.l
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revisio
}
lineCount(yytext,yyleng);
}
<St_Para>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
lineCount(yytext,yyleng);
if (g_insidePre)
{
Expand Down

0 comments on commit 52352ff

Please sign in to comment.