Skip to content

Commit

Permalink
Changed state guard instead of adding pattern check+reject
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Sep 10, 2018
1 parent 4a2c647 commit 510f342
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/code.l
Original file line number Diff line number Diff line change
Expand Up @@ -2596,14 +2596,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generatePHPVariableLink(*g_code,yytext);
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;
}
<Body,TemplCast>{SCOPENAME}{B}*"<"[^\n\/\-\.\{\"\>\(]*">"("::"{ID})*/{B}* { // A<T> *pt;
int i=QCString(yytext).find('<');
QCString kw = QCString(yytext).left(i).stripWhiteSpace();
if (kw.right(5)=="_cast" && YY_START==Body)
Expand Down

0 comments on commit 510f342

Please sign in to comment.