summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/code.l b/src/code.l
index 37a956b..3b272cd 100644
--- a/src/code.l
+++ b/src/code.l
@@ -272,10 +272,11 @@ ClassDef *VariableContext::findVariable(const QCString &name)
ClassDef *result = 0;
QListIterator<Scope> sli(m_scopes);
Scope *scope;
+ QCString key = name;
// search from inner to outer scope
for (sli.toLast();(scope=sli.current());--sli)
{
- result = scope->find(name);
+ result = scope->find(key);
if (result)
{
DBG_CTX((stderr,"** findVariable(%s)=%p\n",name.data(),result));
@@ -2433,7 +2434,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<MemberCall,MemberCall2,FuncCall>")" {
g_theVarContext.addVariable(g_parmType,g_parmName);
g_theCallContext.popScope();
- g_theCallContext.setClass(0);
+ //g_theCallContext.setClass(0); // commented out, otherwise a()->b() does not work for b().
g_code->codify(yytext);
if (--g_bracketCount<=0)
{
@@ -2461,8 +2462,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_theVarContext.addVariable(g_type,g_name);
}
g_parmType.resize(0);g_parmName.resize(0);
- //g_theCallContext.popScope();
- //g_theCallContext.setClass(0);
+ g_theCallContext.setClass(0);
if (*yytext==';' || g_insideBody)
{
if (!g_insideBody)