summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-11-06 21:06:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-11-06 21:06:38 (GMT)
commitc400bd439b3df09704e33df382ed7b08f80dd8ed (patch)
treed2b3049367f2df643a3f305ecfcd739b426c3edc /src/code.l
parentc6d6555a949e86be5c859311eb4db5dcc092c258 (diff)
downloadDoxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.zip
Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.gz
Doxygen-c400bd439b3df09704e33df382ed7b08f80dd8ed.tar.bz2
Release-1.2.18-20021106
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/code.l b/src/code.l
index 79fc82a..4c08b2c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -521,7 +521,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
{
QCString scope = name.left(scopeEnd);
QCString locName = name.right(name.length()-scopeEnd-2);
- //printf("name=%s scope=%s\n",locName.data(),scope.data());
+ //printf("explicit scope: name=%s scope=%s\n",locName.data(),scope.data());
ClassDef *mcd = getClass(scope); // TODO: check namespace as well
if (mcd && !locName.isEmpty())
{
@@ -539,20 +539,21 @@ static MemberDef *setCallContextForVar(const QCString &name)
ClassDef *mcd = g_theVarContext.findVariable(name);
if (mcd) // local variable
{
- //printf("local var `%s'\n",name.data());
+ //printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data());
g_theCallContext.setClass(mcd);
- return 0;
}
-
- // look for a class member
- mcd = getClass(g_classScope);
- if (mcd)
+ else
{
- MemberDef *md=mcd->getMemberByName(name);
- if (md)
+ // look for a class member
+ mcd = getClass(g_classScope);
+ if (mcd)
{
- g_theCallContext.setClass(stripClassName(md->typeString()));
- return md;
+ MemberDef *md=mcd->getMemberByName(name);
+ if (md)
+ {
+ g_theCallContext.setClass(stripClassName(md->typeString()));
+ return md;
+ }
}
}
@@ -613,6 +614,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0)
{
int i=0;
+ //printf("generateClassOrGlobalLink(clName=%s)\n",clName);
if (*clName=='~') // correct for matching negated values i.s.o. destructors.
{
g_code->codify("~");
@@ -634,6 +636,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
}
if (cd && cd->isLinkable()) // is it a linkable class
{
+ //printf("is linkable class %s\n",clName);
if (g_exampleBlock)
{
QCString anchor;
@@ -654,10 +657,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
if (cd==0) // not a class, see if it is a global enum/variable/typedef.
{
MemberDef *md = setCallContextForVar(clName);
+ //printf("is a global md=%p\n",md);
if (md)
{
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope();
+ //printf("definition %s\n",d?d->name().data():"<none>");
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable())
{