diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 92c4f2a246..3be1e459d2 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -2013,6 +2013,8 @@ begin RaiseSemicolonAfterPropSpecMissing('nodefault'); end else if UpAtomIs('DEPRECATED') then begin ReadNextAtom; + if AtomIsStringConstant then + ReadConstant(true,false,[]); if CurPos.Flag<>cafSemicolon then RaiseSemicolonAfterPropSpecMissing('deprecated'); end else if UpAtomIs('ENUMERATOR') then begin @@ -3500,9 +3502,17 @@ begin SaveRaiseException(ctsEndForClassNotFound); end; if CurPos.Flag=cafEND then begin + // read extra flags ReadNextAtom; - if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') or - UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY') + if CurPos.Flag=cafSemicolon then + ReadNextAtom; + if UpAtomIs('DEPRECATED') then begin + ReadNextAtom; + if AtomIsStringConstant then + ReadConstant(true,false,[]); + end else if UpAtomIs('PLATFORM') + or UpAtomIs('UNIMPLEMENTED') or UpAtomIs('EXPERIMENTAL') + or UpAtomIs('LIBRARY') then ReadNextAtom; if CurPos.Flag=cafSemicolon then @@ -3577,10 +3587,18 @@ begin end; if CurPos.Flag=cafEND then begin ReadNextAtom; - if UpAtomIs('DEPRECATED') or UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') or + if CurPos.Flag=cafSemicolon then + ReadNextAtom; + if UpAtomIs('DEPRECATED') then begin + ReadNextAtom; + if AtomIsStringConstant then + ReadConstant(true,false,[]); + end else if UpAtomIs('PLATFORM') or UpAtomIs('UNIMPLEMENTED') or UpAtomIs('EXPERIMENTAL') or UpAtomIs('LIBRARY') then ReadNextAtom; + if CurPos.Flag<>cafSemicolon then + UndoReadNextAtom; end; Result:=true; end;