mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-20 03:48:18 +02:00
codetools: class sections required, optional only for objcprotocol
git-svn-id: trunk@33703 -
This commit is contained in:
parent
9e1b15afaf
commit
2e0870f4d0
@ -462,14 +462,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
'R':
|
'R':
|
||||||
if CompareSrcIdentifiers(p,'REQUIRED') then exit(KeyWordFuncClassSection);
|
if CompareSrcIdentifiers(p,'REQUIRED')
|
||||||
|
and (CurNode.Parent.Desc=ctnObjCProtocol)
|
||||||
|
and ([cmsObjectiveC1,cmsObjectiveC2]*Scanner.CompilerModeSwitches<>[])
|
||||||
|
then exit(KeyWordFuncClassSection);
|
||||||
'S':
|
'S':
|
||||||
if CompareSrcIdentifiers(p,'STATIC') then exit(KeyWordFuncClassMethod)
|
if CompareSrcIdentifiers(p,'STATIC') then exit(KeyWordFuncClassMethod)
|
||||||
else if CompareSrcIdentifiers(p,'STRICT') then exit(KeyWordFuncClassSection);
|
else if CompareSrcIdentifiers(p,'STRICT') then exit(KeyWordFuncClassSection);
|
||||||
'T':
|
'T':
|
||||||
if CompareSrcIdentifiers(p,'TYPE') then exit(KeyWordFuncClassTypeSection);
|
if CompareSrcIdentifiers(p,'TYPE') then exit(KeyWordFuncClassTypeSection);
|
||||||
'O':
|
'O':
|
||||||
if CompareSrcIdentifiers(p,'OPTIONAL') then exit(KeyWordFuncClassSection);
|
if CompareSrcIdentifiers(p,'OPTIONAL')
|
||||||
|
and (CurNode.Parent.Desc=ctnObjCProtocol)
|
||||||
|
and ([cmsObjectiveC1,cmsObjectiveC2]*Scanner.CompilerModeSwitches<>[])
|
||||||
|
then exit(KeyWordFuncClassSection);
|
||||||
'V':
|
'V':
|
||||||
if CompareSrcIdentifiers(p,'VAR') then exit(KeyWordFuncClassVarSection);
|
if CompareSrcIdentifiers(p,'VAR') then exit(KeyWordFuncClassVarSection);
|
||||||
'(','[':
|
'(','[':
|
||||||
@ -968,15 +974,11 @@ begin
|
|||||||
NewSubSection:=ctnClassProtected
|
NewSubSection:=ctnClassProtected
|
||||||
else if UpAtomIs('PUBLISHED') then
|
else if UpAtomIs('PUBLISHED') then
|
||||||
NewSubSection:=ctnClassPublished
|
NewSubSection:=ctnClassPublished
|
||||||
else if UpAtomIs('REQUIRED') then begin
|
else if UpAtomIs('REQUIRED') then
|
||||||
if [cmsObjectiveC1,cmsObjectiveC2]*Scanner.CompilerModeSwitches=[] then
|
NewSubSection:=ctnClassRequired
|
||||||
exit(false);
|
else if UpAtomIs('OPTIONAL') then
|
||||||
NewSubSection:=ctnClassRequired;
|
NewSubSection:=ctnClassOptional
|
||||||
end else if UpAtomIs('OPTIONAL') then begin
|
else
|
||||||
if [cmsObjectiveC1,cmsObjectiveC2]*Scanner.CompilerModeSwitches=[] then
|
|
||||||
exit(false);
|
|
||||||
NewSubSection:=ctnClassOptional;
|
|
||||||
end else
|
|
||||||
RaiseStringExpectedButAtomFound('public');
|
RaiseStringExpectedButAtomFound('public');
|
||||||
OldSubSection:=ctnNone;
|
OldSubSection:=ctnNone;
|
||||||
if CurNode.Desc in AllClassSubSections then begin
|
if CurNode.Desc in AllClassSubSections then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user