From 80722bc5070b7a4cb8724aed84d82679dd939612 Mon Sep 17 00:00:00 2001 From: juha Date: Mon, 4 Sep 2017 08:46:56 +0000 Subject: [PATCH] jcf2: Support "static" keyword better. Issue #32267, patch from delfion. git-svn-id: trunk@55784 - --- components/jcf2/Process/Returns/ReturnAfter.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/jcf2/Process/Returns/ReturnAfter.pas b/components/jcf2/Process/Returns/ReturnAfter.pas index 326eae4178..408ef190a1 100644 --- a/components/jcf2/Process/Returns/ReturnAfter.pas +++ b/components/jcf2/Process/Returns/ReturnAfter.pas @@ -85,6 +85,14 @@ begin exit; end; + { point 1b } + if (ptNext.HasParentNode(nHintDirectives)) then + begin + Result := False; + exit; + end; + + { point 2. to avoid the return, the next token must still be in the same property} if ptNext.HasParentNode(nProperty) and (ptNext.TokenType <> ttProperty) then