diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:55:23 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:55:23 +0900 |
commit | 1ec16d649a01d369eecae2f1225c0ffa1caaf640 (patch) | |
tree | ed6cfed60d2438db244a7cddec6d4f0cf5fa93f6 /src/defargs.l | |
parent | 5e552810bc3dfc820036b4b16ae53561bb7cf3c6 (diff) | |
download | doxygen-1ec16d649a01d369eecae2f1225c0ffa1caaf640.tar.gz doxygen-1ec16d649a01d369eecae2f1225c0ffa1caaf640.tar.bz2 doxygen-1ec16d649a01d369eecae2f1225c0ffa1caaf640.zip |
Imported Upstream version 1.8.16upstream/1.8.16
Diffstat (limited to 'src/defargs.l')
-rw-r--r-- | src/defargs.l | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/defargs.l b/src/defargs.l index 7e9ccca..85878c1 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -282,6 +282,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <CopyArgSharp>"<<" { if (g_argRoundCount>0) { + // for e.g. < typename A = (i<<3) > *g_copyArgValue += yytext; } else @@ -289,17 +290,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" REJECT; } } -<CopyArgSharp>">>)" { // combined token (see bug 790320) - *g_copyArgValue += yytext; - if (g_argSharpCount>0) g_argSharpCount--; - else BEGIN( g_readArgContext ); - if (g_argSharpCount>0) g_argSharpCount--; - else BEGIN( g_readArgContext ); - g_argRoundCount--; - } <CopyArgSharp>">>" { if (g_argRoundCount>0) { + // for e.g. < typename A = (i>>3) > *g_copyArgValue += yytext; } else @@ -308,12 +302,14 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } } <CopyArgSharp>"<" { - g_argSharpCount++; + // don't count < inside (, e.g. for things like: < typename A=(i<6) > + if (g_argRoundCount==0) g_argSharpCount++; *g_copyArgValue += *yytext; } <CopyArgSharp>">" { *g_copyArgValue += *yytext; - if (g_argSharpCount>0) g_argSharpCount--; + // don't count > inside ) + if (g_argSharpCount>0 && g_argRoundCount==0) g_argSharpCount--; else BEGIN( g_readArgContext ); } <CopyArgSharp>"(" { @@ -371,7 +367,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" { g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName); g_curArgDefValue=g_curArgDefValue.stripWhiteSpace(); - //printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data()); + //printf("curArgType='%s' curArgDefVal='%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data()); int l=g_curArgTypeName.length(); if (l>0) { @@ -451,7 +447,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" a->defval = g_curArgDefValue.copy(); //printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data()); a->docs = g_curArgDocs.stripWhiteSpace(); - //printf("Argument `%s' `%s' adding docs=`%s'\n",a->type.data(),a->name.data(),a->docs.data()); + //printf("Argument '%s' '%s' adding docs='%s'\n",a->type.data(),a->name.data(),a->docs.data()); g_argList->append(a); } g_curArgAttrib.resize(0); @@ -483,7 +479,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" g_curArgTypeName+=" []"; g_curArgArray.resize(0); } - //printf("resolveName `%s'->`%s'\n",yytext,name.data()); + //printf("resolveName '%s'->'%s'\n",yytext,name.data()); g_curArgTypeName+=name; } <ReadFuncArgType,ReadFuncArgPtr>. { |