diff options
author | albert-github <albert.tests@gmail.com> | 2018-08-11 14:28:18 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-08-11 14:28:18 (GMT) |
commit | 7508151230301113cf6531bfe631472fa4513d19 (patch) | |
tree | f2b30a9ae028f21624081fb504018a23c6784cb3 /src | |
parent | c82abe1f23ec55aa1d05f118c2bae3aac3b68296 (diff) | |
download | Doxygen-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/code.l | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |