From 8838a2c5fd95e6a84fb19613ec6b68c5d1d9d1af Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 7 Nov 2009 15:10:19 +0000 Subject: [PATCH] codetools: parsing procedure deprecated without comment git-svn-id: trunk@22478 - --- components/codetools/pascalparsertool.pas | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 890bcad301..41f5068852 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -1596,7 +1596,8 @@ begin or UpAtomIs('DEPRECATED') then begin ReadNextAtom; - ReadConstant(true,false,[]); + if AtomIsStringConstant then + ReadConstant(true,false,[]); end else if UpAtomIs('EXTERNAL') or UpAtomIs('PUBLIC') then begin HasForwardModifier:=UpAtomIs('EXTERNAL'); ReadNextAtom; @@ -2748,6 +2749,11 @@ begin ReadNextAtom; ReadConstant(true,false,[]); end; + if UpAtomIs('DEPRECATED') then begin + ReadNextAtom; + if AtomIsStringConstant then + ReadConstant(true,false,[]); + end; if CurPos.Flag=cafEqual then begin // read constant repeat @@ -2809,14 +2815,8 @@ begin if CurPos.Flag<>cafSemicolon then RaiseCharExpectedButAtomFound(';'); ReadNextAtom; - end; - if UpAtomIs('DEPRECATED') then begin - ReadNextAtom; - if AtomIsStringConstant then - ReadConstant(true,false,[]); - ReadNextAtom; - end; - UndoReadNextAtom; + end else + UndoReadNextAtom; CurNode.EndPos:=CurPos.EndPos; EndChildNode; end; @@ -3139,8 +3139,10 @@ begin if not AtomIsStringConstant then RaiseStringExpectedButAtomFound(ctsStringConstant); ReadConstant(true,false,[]); - if UpAtomIs('DEPRECATED') then + if UpAtomIs('DEPRECATED') then begin ReadNextAtom; + if AtomIsStringConstant then ReadConstant(true,false,[]); + end; // read ; if CurPos.Flag<>cafSemicolon then RaiseCharExpectedButAtomFound(';');