diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-02-10 10:10:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-02-10 10:10:20 (GMT) |
commit | 44c7ab97f03ef94d5965d0419def4931d0aa61eb (patch) | |
tree | dad4e102a2e658d6e933aaddaea1259c5003f1fd /src | |
parent | 8e91761d1d6333ccdb05d3400da88fc0b61a4fe7 (diff) | |
download | Doxygen-44c7ab97f03ef94d5965d0419def4931d0aa61eb.zip Doxygen-44c7ab97f03ef94d5965d0419def4931d0aa61eb.tar.gz Doxygen-44c7ab97f03ef94d5965d0419def4931d0aa61eb.tar.bz2 |
Improve handling < for expressions inside template argument defaults
Diffstat (limited to 'src')
-rw-r--r-- | src/defargs.l | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/defargs.l b/src/defargs.l index 7e9ccca..8743556 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>"(" { @@ -619,7 +615,7 @@ void stringToArgumentList(const char *argsString,ArgumentList* al,QCString *extr BEGIN( Start ); defargsYYlex(); if (extraTypeChars) *extraTypeChars=g_extraTypeChars; - //printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data()); + printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data()); printlex(yy_flex_debug, FALSE, __FILE__, NULL); } |