mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 13:19:49 +01:00
codetools: skip 'OPTIONAL' and 'REQUIRED' sections in objcprotocol
git-svn-id: trunk@33683 -
This commit is contained in:
parent
be91d94a0d
commit
2aaf758a1e
@ -35,9 +35,11 @@ type
|
||||
private
|
||||
end;
|
||||
|
||||
NSAlertDelegateProtocol = objcprotocol external name 'NSAlertDelegate'
|
||||
NSDockTilePlugInProtocol = objcprotocol external name 'NSDockTilePlugIn'
|
||||
required
|
||||
procedure setDockTile(dockTile: NSDockTile); message 'setDockTile:';
|
||||
optional
|
||||
function alertShowHelp(alert: NSAlert): Boolean; message 'alertShowHelp:';
|
||||
function dockMenu: NSMenu; message 'dockMenu';
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
@ -422,7 +422,7 @@ end;
|
||||
|
||||
function TPascalParserTool.ParseInnerClass(StartPos, WordLen: integer
|
||||
): boolean;
|
||||
// KeyWordFunctions for parsing in a class/object/record
|
||||
// KeyWordFunctions for parsing in a class/object/record/interface
|
||||
var
|
||||
p: PChar;
|
||||
begin
|
||||
@ -3984,6 +3984,14 @@ begin
|
||||
ReadGUID;
|
||||
// parse till "end" of interface
|
||||
repeat
|
||||
// ObjCProtocol can have 'OPTIONAL' and 'REQUIRED' sections
|
||||
if (IntfDesc=ctnObjCProtocol) and (CurPos.Flag=cafWord) then begin
|
||||
if UpAtomIs('OPTIONAL') then
|
||||
ReadNextAtom
|
||||
else
|
||||
if UpAtomIs('REQUIRED') then
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if not ParseInnerClass(CurPos.StartPos,CurPos.EndPos-CurPos.StartPos) then
|
||||
begin
|
||||
if CurPos.Flag<>cafEnd then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user