diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 60c68e0cf9..c1061e5b45 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -1596,7 +1596,7 @@ begin or UpAtomIs('DEPRECATED') then begin ReadNextAtom; - if AtomIsStringConstant then + if not (CurPos.Flag in [cafSemicolon,cafEND]) then ReadConstant(true,false,[]); end else if UpAtomIs('EXTERNAL') or UpAtomIs('PUBLIC') then begin HasForwardModifier:=UpAtomIs('EXTERNAL');