mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 15:27:10 +02:00
codetools: class sections required, optional only for objcprotocol
git-svn-id: trunk@33704 -
This commit is contained in:
parent
2e0870f4d0
commit
3bcc8975d1
@ -3900,8 +3900,6 @@ begin
|
|||||||
CreateChildNode;
|
CreateChildNode;
|
||||||
if ClassDesc=ctnClass then
|
if ClassDesc=ctnClass then
|
||||||
CurNode.Desc:=ctnClassPublished
|
CurNode.Desc:=ctnClassPublished
|
||||||
else if ClassDesc=ctnObjCProtocol then
|
|
||||||
CurNode.Desc:=ctnClassRequired
|
|
||||||
else
|
else
|
||||||
CurNode.Desc:=ctnClassPublic;
|
CurNode.Desc:=ctnClassPublic;
|
||||||
CurNode.StartPos:=LastAtoms.GetValueAt(0).EndPos;
|
CurNode.StartPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||||
@ -3978,7 +3976,8 @@ begin
|
|||||||
CreateChildNode;
|
CreateChildNode;
|
||||||
CurNode.Desc:=IntfDesc;
|
CurNode.Desc:=IntfDesc;
|
||||||
CurNode.StartPos:=IntfAtomPos.StartPos;
|
CurNode.StartPos:=IntfAtomPos.StartPos;
|
||||||
// find end of interface
|
|
||||||
|
// read content
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
if (CurPos.Flag<>cafSemicolon) then begin
|
if (CurPos.Flag<>cafSemicolon) then begin
|
||||||
if CurPos.Flag=cafWord then begin
|
if CurPos.Flag=cafWord then begin
|
||||||
@ -4001,11 +4000,15 @@ begin
|
|||||||
end else
|
end else
|
||||||
UndoReadNextAtom;
|
UndoReadNextAtom;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
|
if IntfDesc=ctnObjCProtocol then begin
|
||||||
|
// start the first class section (the one without a keyword)
|
||||||
|
CreateChildNode;
|
||||||
|
CurNode.Desc:=ctnClassRequired;
|
||||||
|
end;
|
||||||
if CurPos.Flag=cafEdgedBracketOpen then
|
if CurPos.Flag=cafEdgedBracketOpen then
|
||||||
ReadGUID;
|
ReadGUID;
|
||||||
// parse till "end" of interface
|
// parse till "end" of interface
|
||||||
repeat
|
repeat
|
||||||
// ObjCProtocol can have 'OPTIONAL' and 'REQUIRED' sections
|
|
||||||
if not ParseInnerClass(CurPos.StartPos,CurPos.EndPos-CurPos.StartPos) then
|
if not ParseInnerClass(CurPos.StartPos,CurPos.EndPos-CurPos.StartPos) then
|
||||||
begin
|
begin
|
||||||
if CurPos.Flag<>cafEnd then
|
if CurPos.Flag<>cafEnd then
|
||||||
@ -4014,6 +4017,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
ReadNextAtom;
|
ReadNextAtom;
|
||||||
until false;
|
until false;
|
||||||
|
// end last sub section
|
||||||
|
if CurNode.Desc in AllClassSubSections then begin
|
||||||
|
CurNode.EndPos:=CurPos.StartPos;
|
||||||
|
EndChildNode;
|
||||||
|
end;
|
||||||
|
// end last class section (public, private, ...)
|
||||||
|
CurNode.EndPos:=CurPos.StartPos;
|
||||||
|
EndChildNode;
|
||||||
end else begin
|
end else begin
|
||||||
// forward definition
|
// forward definition
|
||||||
CurNode.SubDesc:=CurNode.SubDesc+ctnsForwardDeclaration;
|
CurNode.SubDesc:=CurNode.SubDesc+ctnsForwardDeclaration;
|
||||||
|
Loading…
Reference in New Issue
Block a user