codetools: static keywords for class variables, bug #12293

git-svn-id: trunk@16880 -
This commit is contained in:
mattias 2008-10-05 09:33:46 +00:00
parent ab81515aa9
commit e417cd9cef

View File

@ -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