mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 21:55:56 +02:00
codetools: static keywords for class variables, bug #12293
git-svn-id: trunk@16880 -
This commit is contained in:
parent
ab81515aa9
commit
e417cd9cef
@ -2626,6 +2626,15 @@ begin
|
||||
RaiseCharExpectedButAtomFound(';');
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if UpAtomIs('STATIC') and (CurNode.Parent<>nil)
|
||||
and (CurNode.Parent.Desc in AllClassSections) then begin
|
||||
// 'static' is allowed for class variables
|
||||
// for example: 'a: char; static;'
|
||||
ReadNextAtom;
|
||||
if CurPos.Flag<>cafSemicolon then
|
||||
RaiseCharExpectedButAtomFound(';');
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if (CurNode.Parent.Desc=ctnVarSection)
|
||||
and (UpAtomIs('PUBLIC') or UpAtomIs('EXPORT') or UpAtomIs('EXTERNAL')) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user