diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-04-30 17:51:14 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-04-30 17:51:14 (GMT) |
commit | 62d3c6501af58ceb48ce8e56327d07ad69e79374 (patch) | |
tree | a37d75aa0ebe073906cb1a3c2c1506b96409f075 /src/defargs.l | |
parent | ff31b2f109848ea3e08fb17d5821beb7af879193 (diff) | |
download | Doxygen-62d3c6501af58ceb48ce8e56327d07ad69e79374.zip Doxygen-62d3c6501af58ceb48ce8e56327d07ad69e79374.tar.gz Doxygen-62d3c6501af58ceb48ce8e56327d07ad69e79374.tar.bz2 |
Release-1.2.15-20020430
Diffstat (limited to 'src/defargs.l')
-rw-r--r-- | src/defargs.l | 27 |
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()); |