summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-04-23 18:39:17 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-04-23 18:39:17 (GMT)
commita790b4aefe37b616ec4563877e01aa5f99447c85 (patch)
treeae15def425ebe4c6c13d7b4ffd8e147e03d535b3 /src/scanner.l
parent37905e0a0fcc820a556d56e609335afd21f8a929 (diff)
downloadDoxygen-a790b4aefe37b616ec4563877e01aa5f99447c85.zip
Doxygen-a790b4aefe37b616ec4563877e01aa5f99447c85.tar.gz
Doxygen-a790b4aefe37b616ec4563877e01aa5f99447c85.tar.bz2
Release-1.1.2-20000423
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/scanner.l b/src/scanner.l
index ae2cc8f..171ca71 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -836,6 +836,13 @@ static QCString findAndCopyImage(const char *fileName,ImageTypes type)
return result;
}
+QCString extractName(const QCString &s)
+{
+ uint i=0;
+ while (i<s.length() && isId(s.at(i))) i++;
+ return s.left(i);
+}
+
/* ----------------------------------------------------------------- */
//static void addToBody(const char *text);
@@ -2823,6 +2830,16 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
current->type=current->type.simplifyWhiteSpace();
current->args=current->args.simplifyWhiteSpace();
current->name=current->name.stripWhiteSpace();
+ if (!current->name.isEmpty() && current->type.left(8)=="typedef ")
+ {
+ // add typedef to dictionary
+ QCString dest = extractName(current->type.right(current->type.length()-8));
+ if (!dest.isEmpty())
+ {
+ //printf(">>>>>>>>>> adding %s->%s\n",current->name.data(),dest.data());
+ typedefDict.insert(current->name, new QCString(dest));
+ }
+ }
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
@@ -3707,12 +3724,11 @@ DOCPARAM ([a-z_A-Z0-9:\.\-]+)|("\"".*"\"")
{
if (isTypedef)
{
- // typedefDict.insert(yytext,new QCString(current->name));
- // current->type.prepend("typedef ");
- // current->extends
- current->extends->append(
- new BaseInfo(yytext,Public,Normal)
- );
+ QCString dest = extractName(current->name);
+ typedefDict.insert(yytext,new QCString(current->name));
+ //current->extends->append(
+ // new BaseInfo(yytext,Public,Normal)
+ // );
}
current->type += ' ' ;
current->type += current->name ;