Skip to content

Commit f396c2f

Browse files
committed
issue #10962 std:: hypertext link if a class documents std() function
1 parent 997d86f commit f396c2f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/code.l

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,10 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
10791079
{
10801080
yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
10811081
yyextra->bracketCount--;
1082-
BEGIN(FuncCall);
1082+
if (yyextra->bracketCount<=0)
1083+
{
1084+
BEGIN(FuncCall);
1085+
}
10831086
}
10841087
}
10851088
<Body,TemplDecl,ObjCMethod>{TYPEKW}/{B}* {
@@ -1724,8 +1727,11 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
17241727
}
17251728
}
17261729
<MemberCall,MemberCall2,FuncCall>[;:] { // recover from unexpected end of call
1727-
unput(*yytext);
1728-
BEGIN(CallEnd);
1730+
if (yytext[0]==';' || yyextra->bracketCount<=0)
1731+
{
1732+
unput(*yytext);
1733+
BEGIN(CallEnd);
1734+
}
17291735
}
17301736
<CallEnd>[ \t\n]* { codifyLines(yyscanner,yytext); }
17311737
<CallEnd>[;:] {
@@ -2242,10 +2248,12 @@ ENDQopt ("const"|"volatile"|"sealed"|"override")({BN}+("const"|"volatile"|"seale
22422248
BEGIN( SkipCxxComment ) ;
22432249
}
22442250
<*>"("|"[" {
2251+
if (yytext[0]=='(') yyextra->bracketCount++;
22452252
yyextra->code->codify(yytext);
22462253
yyextra->theCallContext.pushScope(yyextra->name, yyextra->type);
22472254
}
22482255
<*>")"|"]" {
2256+
if (yytext[0]=='(') yyextra->bracketCount--;
22492257
yyextra->code->codify(yytext);
22502258
yyextra->theCallContext.popScope(yyextra->name, yyextra->type);
22512259
}

0 commit comments

Comments
 (0)