summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-05-28 12:47:44 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2003-05-28 12:47:44 (GMT)
commit35c2baedaa68519999af733a87d8e6ff9a89358c (patch)
tree3e4e50e4fa9b9f0f4c75870e0a09ffc488b34699 /src/docparser.cpp
parent9e1745a1714d4ece7d490918de2eb7ff2060453e (diff)
downloadDoxygen-35c2baedaa68519999af733a87d8e6ff9a89358c.zip
Doxygen-35c2baedaa68519999af733a87d8e6ff9a89358c.tar.gz
Doxygen-35c2baedaa68519999af733a87d8e6ff9a89358c.tar.bz2
Release-1.3.1
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index e84bf96..822f530 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -63,6 +63,7 @@ static bool g_hasParamCommand;
static MemberDef * g_memberDef;
static QDict<void> g_paramsFound;
static bool g_isExample;
+static QCString g_exampleName;
static SectionDict *g_sectionDict;
// include file state
@@ -811,7 +812,7 @@ reparsetoken:
{
doctokenizerYYsetStateHtmlOnly();
tok = doctokenizerYYlex();
- children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
+ children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
@@ -820,7 +821,7 @@ reparsetoken:
{
doctokenizerYYsetStateLatexOnly();
tok = doctokenizerYYlex();
- children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
+ children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_exampleName));
if (tok==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
@@ -3168,7 +3169,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
tokToString(tok),cmdName.data());
return;
}
- DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context,g_isExample,g_fileName);
+ DocIncOperator *op = new DocIncOperator(this,t,g_token->name,g_context,g_isExample,g_exampleName);
DocNode *n1 = m_children.last();
DocNode *n2 = n1!=0 ? m_children.prev() : 0;
bool isFirst = n1==0 || // no last node
@@ -3389,7 +3390,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
tokToString(tok),cmdName.data());
return;
}
- DocInclude *inc = new DocInclude(this,g_token->name,g_context,t,g_isExample,g_fileName);
+ DocInclude *inc = new DocInclude(this,g_token->name,g_context,t,g_isExample,g_exampleName);
m_children.append(inc);
inc->parse();
}
@@ -3564,7 +3565,7 @@ int DocPara::handleCommand(const QString &cmdName)
if (g_token->verb.at(i)=='\n') li=i+1;
i++;
}
- m_children.append(new DocVerbatim(this,g_context,g_token->verb.mid(li),DocVerbatim::Code,g_isExample,g_fileName));
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb.mid(li),DocVerbatim::Code,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: code section ended without end marker");
doctokenizerYYsetStatePara();
}
@@ -3573,7 +3574,7 @@ int DocPara::handleCommand(const QString &cmdName)
{
doctokenizerYYsetStateHtmlOnly();
retval = doctokenizerYYlex();
- m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
@@ -3582,7 +3583,7 @@ int DocPara::handleCommand(const QString &cmdName)
{
doctokenizerYYsetStateLatexOnly();
retval = doctokenizerYYlex();
- m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker");
doctokenizerYYsetStatePara();
}
@@ -3591,7 +3592,7 @@ int DocPara::handleCommand(const QString &cmdName)
{
doctokenizerYYsetStateVerbatim();
retval = doctokenizerYYlex();
- m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_fileName));
+ m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_exampleName));
if (retval==0) warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: verbatim section ended without end marker");
doctokenizerYYsetStatePara();
}
@@ -4652,6 +4653,7 @@ void DocRoot::parse()
DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md,
const char *input,bool isExample,
+ const char *exampleName,
SectionDict *sections)
{
@@ -4671,6 +4673,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_includeFileOffset = 0;
g_includeFileLength = 0;
g_isExample = isExample;
+ g_exampleName = exampleName;
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
@@ -4721,6 +4724,7 @@ DocNode *validatingParseText(const char *input)
g_includeFileOffset = 0;
g_includeFileLength = 0;
g_isExample = FALSE;
+ g_exampleName = "";
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();