summaryrefslogtreecommitdiffstats
path: root/src/defargs.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-09-14 19:14:55 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2008-09-14 19:14:55 (GMT)
commit9e34481c1a67ca9ffb6a83f9723f23f6cf3982c7 (patch)
tree7c2a1d6f7f4f4a314acdd54d620ac8a75519e369 /src/defargs.l
parent093ac41f561578b904905e466df307131cd80893 (diff)
downloadDoxygen-9e34481c1a67ca9ffb6a83f9723f23f6cf3982c7.zip
Doxygen-9e34481c1a67ca9ffb6a83f9723f23f6cf3982c7.tar.gz
Doxygen-9e34481c1a67ca9ffb6a83f9723f23f6cf3982c7.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
{