summaryrefslogtreecommitdiffstats
path: root/src/code.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-03-11 20:59:44 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-03-11 21:06:01 (GMT)
commita825e8dc7bf8a3fc8fac24d601a4107f552fa5db (patch)
tree7be3acaa16d5f717d026135da671fa8b5b81b52a /src/code.l
parent30887ace1d06cc76bdd1b5aa3895e21dc39fddab (diff)
downloadDoxygen-a825e8dc7bf8a3fc8fac24d601a4107f552fa5db.zip
Doxygen-a825e8dc7bf8a3fc8fac24d601a4107f552fa5db.tar.gz
Doxygen-a825e8dc7bf8a3fc8fac24d601a4107f552fa5db.tar.bz2
Fixed sig11 regression while parsing cast to function pointer
Diffstat (limited to 'src/code.l')
-rw-r--r--src/code.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/code.l b/src/code.l
index c1350e3..0754db6 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1199,10 +1199,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
yyextra->name+=yytext;
}
-<Body>"("{B}*("*"{B}*)+{SCOPENAME}*{B}*")"/{B}* { // (*p)->func() but not "if (p) ..."
+<Body>"("{B}*("*"{B}*)+{SCOPENAME}+{B}*")"/{B}* { // (*p)->func() but not "if (p) ..."
yyextra->code->codify(yytext);
uint s=0;while (s<(uint)yyleng && !isId(yytext[s])) s++;
- uint e=(uint)yyleng-1;while (!isId(yytext[e])) e--;
+ uint e=(uint)yyleng-1;while (e>1 && !isId(yytext[e])) e--;
QCString varname = ((QCString)yytext).mid(s,e-s+1);
addType(yyscanner);
yyextra->name=varname;
@@ -1896,10 +1896,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext);
BEGIN( MemberCall2 );
}
-<FuncCall,MemberCall2>("("{B}*("*"{B}*)+{ID}*{B}*")"{B}*)/("."|"->") {
+<FuncCall,MemberCall2>("("{B}*("*"{B}*)+{ID}+{B}*")"{B}*)/("."|"->") {
yyextra->code->codify(yytext);
uint s=0;while (!isId(yytext[s])) s++;
- uint e=(uint)yyleng-1;while (!isId(yytext[e])) e--;
+ uint e=(uint)yyleng-1;while (e>1 && !isId(yytext[e])) e--;
yyextra->name=((QCString)yytext).mid(s,e-s+1);
BEGIN( MemberCall2 );
}