diff options
author | albert-github <albert.tests@gmail.com> | 2021-01-22 14:07:02 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2021-01-22 14:07:02 (GMT) |
commit | 3761b4907967ad5f2cf0819f29cf76fa5ac59ff0 (patch) | |
tree | 1ea1427b5e8fe414e16a3adf9764764ddf61da46 /src/code.l | |
parent | c6c2e1fe6e0806b0798395262e4b955e4493db86 (diff) | |
download | Doxygen-3761b4907967ad5f2cf0819f29cf76fa5ac59ff0.zip Doxygen-3761b4907967ad5f2cf0819f29cf76fa5ac59ff0.tar.gz Doxygen-3761b4907967ad5f2cf0819f29cf76fa5ac59ff0.tar.bz2 |
Incorrect code coloring of typedef
In case we have `typedef ::my_type T2;` the code coloring should be:
- typedef : keyword
- ::my_type : link
- T2 : link
though we see:
- typedef ::my_type : link
- T2 : link
this has been corrected.
Found by means of issue #8350
Note there might be other cases with the same problem as well.
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1102,6 +1102,7 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER} yyextra->name+=yytext; } <Body>{SCOPENAME}/{BN}*[:;,)\]] { // "int var;" or "var, var2" or "debug(f) macro" , or int var : 5; + if (QCString(yytext).startsWith("typedef")) REJECT; addType(yyscanner); // changed this to generateFunctionLink, see bug 624514 //generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext,FALSE,TRUE); @@ -1109,6 +1110,7 @@ NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER} yyextra->name+=yytext; } <Body>{SCOPENAME}/{B}* { // p->func() + if (QCString(yytext).startsWith("typedef")) REJECT; addType(yyscanner); generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext); yyextra->name+=yytext; |