summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-31 18:09:08 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2000-07-31 18:09:08 (GMT)
commite139c0246413d3803028572dcafe9f065f4c9eab (patch)
tree8b6d1855a77a3cfa84674b2918bdb7c6478b94ae /src/code.l
parent3876f92c80e9cc62af30916f0ccdeb83cdc2ff05 (diff)
downloadDoxygen-e139c0246413d3803028572dcafe9f065f4c9eab.zip
Doxygen-e139c0246413d3803028572dcafe9f065f4c9eab.tar.gz
Doxygen-e139c0246413d3803028572dcafe9f065f4c9eab.tar.bz2
Release-1.2.0-20000731
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/code.l b/src/code.l
index ae0beeb..be75cc3 100644
--- a/src/code.l
+++ b/src/code.l
@@ -281,12 +281,23 @@ static void addVariable()
}
else
{
- //printf("adding variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
+ int i;
if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
{
+ //printf("adding variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
g_codeVarList.append(new CodeVarDef(g_cvd)); // add it to a list
}
+ else if ((i=g_cvd.type.find('<'))>0)
+ {
+ g_cvd.type = g_cvd.type.left(i);
+ if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
+ {
+ //printf("adding template type variable `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
+ g_cvd.classScope=g_classScope;
+ g_codeVarList.append(new CodeVarDef(g_cvd));
+ }
+ }
}
}
@@ -300,12 +311,23 @@ static void addParameter()
}
else
{
- //printf("adding parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
- if ((getClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
+ int i;
+ if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type]))
{
+ //printf("adding parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
g_cvd.classScope=g_classScope;
g_codeParmList.append(new CodeVarDef(g_cvd)); // add it to a list
}
+ else if ((i=g_cvd.type.find('<'))>0)
+ {
+ g_cvd.type = g_cvd.type.left(i);
+ if ((getResolvedClass(g_cvd.type)) || (g_codeClassDict[g_cvd.type.left(i)]))
+ {
+ //printf("adding template type parameter `%s' `%s'\n",g_cvd.type.data(),g_cvd.name.data());
+ g_cvd.classScope=g_classScope;
+ g_codeParmList.append(new CodeVarDef(g_cvd));
+ }
+ }
}
}
@@ -948,15 +970,11 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
addType();
g_name+=yytext;
}
- /*
-<Body>{SCOPETNAME}/{B}* {
- int i;
- generateClassLink(*g_code,yytext,&i);
+<Body>{SCOPENAME}{B}*"<"[^\n\>]*">"/{B}* { // A<T> *pt;
+ generateClassLink(*g_code,yytext);
addType();
- QCString text=yytext;
- g_name+=text.left(i);
- }
- */
+ g_name+=yytext;
+ }
<Body>{SCOPENAME}/{B}* { // p->func()
generateClassLink(*g_code,yytext);
addType();
@@ -1094,7 +1112,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
endFontClass();
}
-<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]* {
+<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]*({B}*"<"[^\n\>]*">")? {
addParmType();
g_parmName=yytext;
generateClassLink(*g_code,yytext);