summaryrefslogtreecommitdiffstats
path: root/src/defargs.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2002-04-30 17:51:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2002-04-30 17:51:14 (GMT)
commit758291b1be0c43c13088389b0cfbb560efe00c1f (patch)
treea37d75aa0ebe073906cb1a3c2c1506b96409f075 /src/defargs.l
parent210582f8060fb41f6ad34d8315c9dd27b1bb6834 (diff)
downloadDoxygen-758291b1be0c43c13088389b0cfbb560efe00c1f.zip
Doxygen-758291b1be0c43c13088389b0cfbb560efe00c1f.tar.gz
Doxygen-758291b1be0c43c13088389b0cfbb560efe00c1f.tar.bz2
Release-1.2.15-20020430
Diffstat (limited to 'src/defargs.l')
-rw-r--r--src/defargs.l27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/defargs.l b/src/defargs.l
index d736369..b88ef13 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -261,16 +261,37 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
//printf("g_curArgTypeName=`%s' i=%d\n",g_curArgTypeName.data(),i);
Argument *a = new Argument;
a->attrib = g_curArgAttrib.copy();
- if (i>=0 && g_curArgTypeName.at(i)!=':')
+ //printf("a->type=%s a->name=%s i=%d l=%d\n",
+ // a->type.data(),a->name.data(),i,l);
+ a->array.resize(0);
+ if (i==l-1 && g_curArgTypeName.at(i)==')') // function argument
+ {
+ int bi=g_curArgTypeName.find('(');
+ int fi=bi-1;
+ //printf("func arg fi=%d\n",fi);
+ while (fi>=0 && isId(g_curArgTypeName.at(fi))) fi--;
+ if (fi>=0)
+ {
+ a->type = g_curArgTypeName.left(fi+1);
+ a->name = g_curArgTypeName.mid(fi+1,bi-fi-1);
+ a->array = g_curArgTypeName.right(l-bi);
+ }
+ else
+ {
+ a->type = g_curArgTypeName;
+ }
+ }
+ else if (i>=0 && g_curArgTypeName.at(i)!=':')
{ // type contains a name
a->type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1));
- a->name = g_curArgTypeName.right(g_curArgTypeName.length()-i-1);
+ a->name = g_curArgTypeName.right(l-i-1);
}
else // assume only the type was specified, try to determine name later
{
a->type = removeRedundantWhiteSpace(g_curArgTypeName);
}
- a->array = removeRedundantWhiteSpace(g_curArgArray);
+ //printf("a->type=%s a->name=%s a->array=%s\n",a->type.data(),a->name.data());
+ a->array += removeRedundantWhiteSpace(g_curArgArray);
a->defval = g_curArgDefValue.copy();
a->docs = g_curArgDocs.stripWhiteSpace();
//printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data());