diff options
author | albert-github <albert.tests@gmail.com> | 2019-09-23 11:27:51 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-09-23 11:27:51 (GMT) |
commit | 5a25a7f33af4a53462a6ddea9e8b82d0d9f23280 (patch) | |
tree | 0fc728b9e0a98f7136625efe6a9d51436865f446 /src/code.l | |
parent | 1024ab18b435dac7ba4ab94a087bb950b3bdf2c0 (diff) | |
download | Doxygen-5a25a7f33af4a53462a6ddea9e8b82d0d9f23280.zip Doxygen-5a25a7f33af4a53462a6ddea9e8b82d0d9f23280.tar.gz Doxygen-5a25a7f33af4a53462a6ddea9e8b82d0d9f23280.tar.bz2 |
Bug 340202 - @code: static_cast, const_cast, etc C++ keywords
The `*_cast` had already been introduced, but there were some other places that needed the "REJECT" as well.
Also the cast was missing a whitesace between the cast name and the `<`.
Tested also against he doxygen internal documentation.
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -2606,7 +2606,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" <TemplCast>[*^]* { codifyLines(yytext); } -<Body,FuncCall>{CASTKW}"<" { // static_cast<T>( +<Body,MemberCall2,FuncCall>{CASTKW}{B}*"<" { // static_cast<T>( startFontClass("keyword"); codifyLines(yytext); endFontClass(); @@ -2651,6 +2651,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" } <Body>{SCOPETNAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"/{BN}*"(" | <Body>{SCOPETNAME}/{BN}*"(" { // a() or c::a() or t<A,B>::a() or A\B\foo() + int i=QCString(yytext).find('<'); + QCString kw = QCString(yytext).left(i).stripWhiteSpace(); + if (kw.right(5)=="_cast" && YY_START==Body) + { + REJECT; + } addType(); generateFunctionLink(*g_code,yytext); g_bracketCount=0; @@ -3062,6 +3068,12 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" endFontClass(); } <MemberCall2,FuncCall>{ID}(({B}*"<"[^\n\[\](){}<>]*">")?({B}*"::"{B}*{ID})?)* { + int i=QCString(yytext).find('<'); + QCString kw = QCString(yytext).left(i).stripWhiteSpace(); + if (kw.right(5)=="_cast") + { + REJECT; + } addParmType(); g_parmName=yytext; generateClassOrGlobalLink(*g_code,yytext,!g_insideBody); |