summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-02-10 19:33:23 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-02-20 18:23:51 (GMT)
commit52352ffd0713a666cf070ce859a11149f0453db5 (patch)
tree153fddf77c3e120192c1b8f19a3d9e6d2c00c177
parent5fff1fc1d5b268b47fbdac2c06199b7cf42987a1 (diff)
downloadDoxygen-52352ffd0713a666cf070ce859a11149f0453db5.zip
Doxygen-52352ffd0713a666cf070ce859a11149f0453db5.tar.gz
Doxygen-52352ffd0713a666cf070ce859a11149f0453db5.tar.bz2
Improve handling of @param command without name or description
-rw-r--r--src/docparser.cpp13
-rw-r--r--src/doctokenizer.l2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index b63674a..83887c6 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -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();
@@ -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;
}
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 0c167ca..a11f2fe 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -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)
{