* correctly handle directives for anonymous functions

This commit is contained in:
Sven/Sarah Barth 2022-01-27 23:11:33 +01:00
parent e8b0fc88e3
commit 92082ab28f

View File

@ -3434,8 +3434,13 @@ const
begin
{ support "record p : procedure stdcall end;" and
"var p : procedure stdcall = nil;" }
if (pd_procvar in pdflags) and
(token in [_END,_RKLAMMER,_EQ]) then
if (
(pd_procvar in pdflags) and
(token in [_END,_RKLAMMER,_EQ])
) or (
(po_anonymous in pd.procoptions) and
(token in [_BEGIN,_VAR,_CONST,_TYPE,_LABEL,_FUNCTION,_PROCEDURE,_OPERATOR])
) then
break
else
begin