From 7c617e4023906fbcfcb0dd90c91c748fb5425413 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 9 Dec 2015 17:02:24 +0000 Subject: [PATCH] codetools: fixed parsing variable hint modifiers not behind semicolon git-svn-id: branches/fixes_1_6@50722 - --- components/codetools/pascalparsertool.pas | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 8d8d34dedb..0cdd723661 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -3358,7 +3358,8 @@ begin end; // optional: hint modifier - ReadHintModifiers([cafSemicolon,cafEqual]); + if CurPos.Flag<>cafSemicolon then + ReadHintModifiers([cafSemicolon,cafEqual]); if (ParentNode.Desc=ctnVarSection) then begin // optional: initial value @@ -3762,7 +3763,8 @@ begin SaveRaiseStringExpectedButAtomFound(ctsStringConstant); ReadConstant(true,false,[]); // read hint modifier - ReadHintModifiers; + if CurPos.Flag<>cafSemicolon then + ReadHintModifiers; // read ; if CurPos.Flag<>cafSemicolon then SaveRaiseCharExpectedButAtomFound(';'); @@ -3903,7 +3905,8 @@ begin end; ReadConstExpr; // optional: hint modifier - ReadHintModifiers; + if CurPos.Flag<>cafSemicolon then + ReadHintModifiers; if CurPos.Flag=cafSemicolon then begin if (CurNode.Parent.Desc=ctnConstSection) and (CurNode.Parent.Parent.Desc in AllCodeSections) then begin @@ -3993,7 +3996,8 @@ begin ReadNextAtom; ParseType(CurPos.StartPos); // read hint modifier - ReadHintModifiers; + if CurPos.Flag<>cafSemicolon then + ReadHintModifiers; // read ; if CurPos.Flag<>cafSemicolon then SaveRaiseCharExpectedButAtomFound(';');