summaryrefslogtreecommitdiffstats
path: root/src/defargs.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2008-09-14 19:14:55 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2008-09-14 19:14:55 (GMT)
commitec8cd7293a58213bac5967a3a3ccc7dc55ba19fe (patch)
tree7c2a1d6f7f4f4a314acdd54d620ac8a75519e369 /src/defargs.l
parent1b605218ded157b8c128418fb86b0e53c8c3d452 (diff)
downloadDoxygen-ec8cd7293a58213bac5967a3a3ccc7dc55ba19fe.zip
Doxygen-ec8cd7293a58213bac5967a3a3ccc7dc55ba19fe.tar.gz
Doxygen-ec8cd7293a58213bac5967a3a3ccc7dc55ba19fe.tar.bz2
Release-1.5.6-20080914
Diffstat (limited to 'src/defargs.l')
-rw-r--r--src/defargs.l18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/defargs.l b/src/defargs.l
index f44c1f3..42faf17 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -98,7 +98,7 @@ static int yyread(char *buf,int max_size)
%}
B [ \t]
-ID [a-z_A-Z][a-z_A-Z0-9]*
+ID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
%option noyywrap
@@ -302,6 +302,22 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
{ // type contains a name
a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1));
a->name = g_curArgTypeName.right(l-i-1).stripWhiteSpace();
+
+ // if the type becomes a type specifier only then we make a mistake
+ // and need to correct it to avoid seeing a nameless parameter
+ // "struct A" as a parameter with type "struct" and name "A".
+ int sv=0;
+ if (a->type.left(6)=="const ") sv=6;
+ else if (a->type.left(8)=="volatile ") sv=9;
+ if (a->type.mid(sv)=="struct" ||
+ a->type.mid(sv)=="union" ||
+ a->type.mid(sv)=="class" ||
+ a->type.mid(sv)=="typename" ||
+ a->type=="const" || a->type=="volatile")
+ {
+ a->type = a->type + " " + a->name;
+ a->name.resize(0);
+ }
}
else // assume only the type was specified, try to determine name later
{