summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2003-03-30 19:53:04 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2003-03-30 19:53:04 (GMT)
commitb69146af8dce22431fc50dc3fcea6c7fd5fb1063 (patch)
treedcb3e2354df7b19ebd9458aca416a61d4922bc5c /src/docparser.cpp
parentfc0deb3d8c9dad128e1d5f5c90a5dfc0b9d60eea (diff)
downloadDoxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.zip
Doxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.tar.gz
Doxygen-b69146af8dce22431fc50dc3fcea6c7fd5fb1063.tar.bz2
Release-1.3-rc3-20030330
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 846d19c..08e21cf 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -37,6 +37,7 @@
#include "cmdmapper.h"
#include "printdocvisitor.h"
#include "message.h"
+#include "section.h"
#define DBG(x) do {} while(0)
//#define DBG(x) printf x
@@ -58,10 +59,11 @@ static const char *sectionLevelToName[] =
//---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc
-static bool g_hasParamCommand;
-static MemberDef * g_memberDef;
-static QDict<void> g_paramsFound;
-static bool g_isExample;
+static bool g_hasParamCommand;
+static MemberDef * g_memberDef;
+static QDict<void> g_paramsFound;
+static bool g_isExample;
+static SectionDict *g_sectionDict;
// include file state
static QString g_includeFileText;
@@ -703,6 +705,10 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
}
else // compound link
{
+ if (compound->definitionType()==Definition::TypeFile)
+ {
+ name=g_token->name;
+ }
children.append(new
DocLinkedWord(parent,name,
compound->getReference(),
@@ -1153,6 +1159,10 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{
m_file = sec->fileName;
m_anchor = sec->label;
+ if (g_sectionDict && g_sectionDict->find(id)==0)
+ {
+ g_sectionDict->insert(id,sec);
+ }
}
else
{
@@ -1458,6 +1468,10 @@ void DocSecRefItem::parse()
{
m_file = sec->fileName;
m_anchor = sec->label;
+ if (g_sectionDict && g_sectionDict->find(m_target)==0)
+ {
+ g_sectionDict->insert(m_target,sec);
+ }
}
else
{
@@ -4339,6 +4353,7 @@ reparsetoken:
break;
}
}
+ retval=0;
endparagraph:
handlePendingStyleCommands(this,m_children);
DocNode *n = g_nodeStack.pop();
@@ -4369,6 +4384,10 @@ int DocSection::parse()
m_anchor = sec->label;
m_title = sec->title;
if (m_title.isEmpty()) m_title = sec->label;
+ if (g_sectionDict && g_sectionDict->find(m_id)==0)
+ {
+ g_sectionDict->insert(m_id,sec);
+ }
}
}
@@ -4611,7 +4630,8 @@ void DocRoot::parse()
DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md,
- const char *input,bool isExample)
+ const char *input,bool isExample,
+ SectionDict *sections)
{
//printf("========== validating %s at line %d\n",fileName,startLine);
@@ -4633,6 +4653,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_hasParamCommand = FALSE;
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
+ g_sectionDict = sections;
doctokenizerYYlineno=startLine;
doctokenizerYYinit(input,g_fileName);