summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2021-01-22 14:07:02 (GMT)
committeralbert-github <albert.tests@gmail.com>2021-01-22 14:07:02 (GMT)
commit3761b4907967ad5f2cf0819f29cf76fa5ac59ff0 (patch)
tree1ea1427b5e8fe414e16a3adf9764764ddf61da46 /src/code.l
parentc6c2e1fe6e0806b0798395262e4b955e4493db86 (diff)
downloadDoxygen-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.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/code.l b/src/code.l
index 956034f..7d7ba3d 100644
--- a/src/code.l
+++ b/src/code.l
@@ -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;