From be91d94a0db594c640f0480329224e2bafc1cb0b Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 22 Nov 2011 01:01:09 +0000 Subject: [PATCH] codetools: correct ObjCProtocol external block parse git-svn-id: trunk@33682 - --- components/codetools/pascalparsertool.pas | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 85904aeb0e..c7c39f40f4 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -3846,7 +3846,7 @@ begin ReadNextAtom; end; end - else if UpAtomIs('EXTERNAL') and (ClassDesc in [ctnObjCClass,ctnObjCCategory,ctnObjCProtocol]) then + else if UpAtomIs('EXTERNAL') and (ClassDesc in [ctnObjCClass,ctnObjCCategory]) then begin CreateChildNode; CurNode.Desc:=ctnClassExternal; @@ -3960,6 +3960,20 @@ begin // find end of interface ReadNextAtom; if (CurPos.Flag<>cafSemicolon) then begin + if CurPos.Flag=cafWord then begin + if UpAtomIs('EXTERNAL') and (IntfDesc=ctnObjCProtocol) then + begin + CreateChildNode; + CurNode.Desc:=ctnClassExternal; + ReadNextAtom; + if UpAtomIs('NAME') then begin + ReadNextAtom; + ReadConstant(true,false,[]); + end; + CurNode.EndPos:=CurPos.StartPos; + EndChildNode; + end; + end; if (CurPos.Flag=cafRoundBracketOpen) then begin // read inheritage brackets ReadClassInheritance(true);