summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2018-08-11 14:28:18 (GMT)
committeralbert-github <albert.tests@gmail.com>2018-08-11 14:28:18 (GMT)
commit7508151230301113cf6531bfe631472fa4513d19 (patch)
treef2b30a9ae028f21624081fb504018a23c6784cb3
parentc82abe1f23ec55aa1d05f118c2bae3aac3b68296 (diff)
downloadDoxygen-7508151230301113cf6531bfe631472fa4513d19.zip
Doxygen-7508151230301113cf6531bfe631472fa4513d19.tar.gz
Doxygen-7508151230301113cf6531bfe631472fa4513d19.tar.bz2
Bug 634830 - Automatic links don't work correctly with operator< and operator<=
A longer match was chosen by 'lex' resulting in that 'operator<' and 'operator<=' and the first argument were not correctly linked and color coded. We now test if the "operator" match is present, if so we use the right rule for operator.
-rw-r--r--src/code.l7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/code.l b/src/code.l
index 2c9b0ae..14a53ff 100644
--- a/src/code.l
+++ b/src/code.l
@@ -2597,6 +2597,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_name+=yytext+7;
}
<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>]*">"("::"{ID})*/{B}* { // A<T> *pt;
+ if (YY_START==Body)
+ {
+ // check for special case that starts with: operator{B}*<[=]?{B}*(
+ static QRegExp re("operator[ \t]*<[=]?[ \t]*(");
+ QString qq = yytext;
+ if (qq.find(re) == 0) REJECT;
+ }
int i=QCString(yytext).find('<');
QCString kw = QCString(yytext).left(i).stripWhiteSpace();
if (kw.right(5)=="_cast" && YY_START==Body)