diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-07-23 14:06:43 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-07-23 14:06:43 (GMT) |
commit | ea8a1bc7ccbd7b64a31c293caa31240bde7397cf (patch) | |
tree | 8bdbe4421ef1ea29861efd26ccfc83849a184148 /src/declinfo.l | |
parent | 5346e18047c0e047db2f1b13dc2c767a73c5c305 (diff) | |
download | Doxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.zip Doxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.tar.gz Doxygen-ea8a1bc7ccbd7b64a31c293caa31240bde7397cf.tar.bz2 |
Release-1.2.8-20010723
Diffstat (limited to 'src/declinfo.l')
-rw-r--r-- | src/declinfo.l | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/declinfo.l b/src/declinfo.l index 18e39d8..5548b56 100644 --- a/src/declinfo.l +++ b/src/declinfo.l @@ -27,6 +27,7 @@ #include "declinfo.h" #include "util.h" +#include "message.h" #define YY_NO_UNPUT @@ -157,6 +158,8 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+) sharpCount=0; BEGIN(Template); } +<Template>"<<" { name+="<<"; } +<Template>">>" { name+=">>"; } <Template>"<" { name+="<"; sharpCount++; @@ -235,16 +238,29 @@ void parseFuncDecl(const QCString &decl,QCString &cl,QCString &ctl,QCString &t, name=name.left(nb); } - cl=scope.copy(); - //printf("scope=`%s'\n",scope.data()); - int il=0,ir=0; - if ((il=cl.find('<'))!=-1 && (ir=cl.findRev('>'))!=-1) // split up scope and template arguments +#if 0 { - ctl=removeRedundantWhiteSpace(cl.mid(il,ir-il+1)); - cl=cl.left(il)+cl.right(cl.length()-ir-1); + int l=scope.length(); + int i=0; + int skipCount=0; + cl.resize(0); + ctl.resize(0); + for (i=0;i<l;i++) + { + char c=scope.at(i); + if (c=='<') + skipCount++; + else if (c=='>') + skipCount--; + else if (skipCount==0) + cl+=c; + } } - //printf("cl=`%s' ctl=`%s'\n",cl.data(),ctl.data()); +#endif + cl=stripTemplateSpecifiersFromScope(removeRedundantWhiteSpace(scope),FALSE); + ctl.resize(0); n=removeRedundantWhiteSpace(name); + int il,ir; if ((il=n.find('<'))!=-1 && (ir=n.findRev('>'))!=-1) // TODO: handle cases like where n="operator<< <T>" { @@ -285,9 +301,9 @@ void dumpDecl(const char *s) QCString name; QCString args; QCString funcTNames; - printf("-----------------------------------------\n"); + msg("-----------------------------------------\n"); parseFuncDecl(s,className,classTNames,type,name,args,funcTNames); - printf("type=`%s' class=`%s' classTempl=`%s' name=`%s' " + msg("type=`%s' class=`%s' classTempl=`%s' name=`%s' " "funcTemplateNames=`%s' args=`%s'\n", type.data(),className.data(),classTNames.data(), name.data(),funcTNames.data(),args.data() |