summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-06-07 11:47:47 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-06-07 11:47:47 (GMT)
commit0aa47e2a30513b04d1041d528f468d3434a81558 (patch)
treef17d17b67fdefdfdf992328f3f51dd90812c156e /src/docparser.cpp
parent35c2baedaa68519999af733a87d8e6ff9a89358c (diff)
downloadDoxygen-0aa47e2a30513b04d1041d528f468d3434a81558.zip
Doxygen-0aa47e2a30513b04d1041d528f468d3434a81558.tar.gz
Doxygen-0aa47e2a30513b04d1041d528f468d3434a81558.tar.bz2
Release-1.3.1-20030607
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 822f530..f69a0c9 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -826,6 +826,15 @@ reparsetoken:
doctokenizerYYsetStatePara();
}
break;
+ case CMD_XMLONLY:
+ {
+ doctokenizerYYsetStateXmlOnly();
+ tok = doctokenizerYYlex();
+ children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName));
+ if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker",doctokenizerYYlineno);
+ doctokenizerYYsetStatePara();
+ }
+ break;
case CMD_FORMULA:
{
DocFormula *form=new DocFormula(parent,g_token->id);
@@ -3043,7 +3052,8 @@ int DocParamList::parse(const QString &cmdName)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",cmdName.data());
- return 0;
+ retval=0;
+ goto endparamlist;
}
ASSERT(tok==TK_WHITESPACE);
@@ -3051,6 +3061,7 @@ int DocParamList::parse(const QString &cmdName)
m_paragraph->markFirst();
m_paragraph->markLast();
+endparamlist:
DBG(("DocParamList::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
@@ -3588,6 +3599,15 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStatePara();
}
break;
+ case CMD_XMLONLY:
+ {
+ doctokenizerYYsetStateXmlOnly();
+ retval = doctokenizerYYlex();
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::XmlOnly,g_isExample,g_exampleName));
+ if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: xmlonly section ended without end marker");
+ doctokenizerYYsetStatePara();
+ }
+ break;
case CMD_VERBATIM:
{
doctokenizerYYsetStateVerbatim();
@@ -3600,6 +3620,7 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_ENDCODE:
case CMD_ENDHTMLONLY:
case CMD_ENDLATEXONLY:
+ case CMD_ENDXMLONLY:
case CMD_ENDLINK:
case CMD_ENDVERBATIM:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
@@ -4491,6 +4512,9 @@ int DocSection::parse()
retval=0; // stop parsing
}
+ else
+ {
+ }
INTERNAL_ASSERT(retval==0 ||
retval==RetVal_Section ||
@@ -4615,6 +4639,18 @@ void DocRoot::parse()
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found");
}
+ else if (retval==RetVal_Subsection)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsection command outside of section context!");
+ }
+ else if (retval==RetVal_Subsubsection)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found subsubsection command outside of subsection context!");
+ }
+ else if (retval==RetVal_Paragraph)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: found paragraph command outside of subsubsection context!");
+ }
} while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal);
if (lastPar) lastPar->markLast();
@@ -4642,6 +4678,7 @@ void DocRoot::parse()
retval = in->parse();
}
+
handleUnclosedStyleCommands();
DocNode *n = g_nodeStack.pop();