diff options
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 8be11c6..b21c15c 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -76,7 +76,8 @@ static const char *sectionLevelToName[] = "section", "subsection", "subsubsection", - "paragraph" + "paragraph", + "subparagraph" }; //--------------------------------------------------------------------------- @@ -4670,12 +4671,15 @@ int DocParamList::parse(const QCString &cmdName) DBG(("DocParamList::parse() start\n")); g_nodeStack.push(this); DocPara *par=0; + QCString saveCmdName = cmdName; int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", qPrint(cmdName)); + retval=0; + goto endparamlist; } doctokenizerYYsetStateParam(); tok=doctokenizerYYlex(); @@ -4715,7 +4719,13 @@ int DocParamList::parse(const QCString &cmdName) retval=0; goto endparamlist; } - ASSERT(tok==TK_WHITESPACE); + if (tok!=TK_WHITESPACE) /* premature end of comment block */ + { + warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token in comment block while parsing the " + "argument of command %s",qPrint(saveCmdName)); + retval=0; + goto endparamlist; + } par = new DocPara(this); m_paragraphs.append(par); @@ -5217,6 +5227,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) QCString blockId; if (t==DocInclude::Snippet) { + if (fileName == "this") fileName=g_fileName; doctokenizerYYsetStateSnippet(); tok=doctokenizerYYlex(); doctokenizerYYsetStatePara(); |