diff --git a/components/codetools/customcodetool.pas b/components/codetools/customcodetool.pas index b0f3cc6c50..abb2835568 100644 --- a/components/codetools/customcodetool.pas +++ b/components/codetools/customcodetool.pas @@ -228,8 +228,8 @@ type procedure ReadTillCommentEnd; // read atoms - function AtomIs(const AnAtom: shortstring): boolean; - function UpAtomIs(const AnAtom: shortstring): boolean; + function AtomIs(const AnAtom: shortstring): boolean; // case sensitive + function UpAtomIs(const AnAtom: shortstring): boolean; // compare to uppercase function UpAtomIs(const AtomPos: TAtomPosition; const AnAtom: shortstring): boolean; overload; function ReadNextAtomIs(const AnAtom: shortstring): boolean; {$IFDEF UseInline}inline;{$ENDIF} function ReadNextAtomIsIdentifier(Identifier: PChar): boolean; {$IFDEF UseInline}inline;{$ENDIF} diff --git a/components/codetools/pascalreadertool.pas b/components/codetools/pascalreadertool.pas index 30181d9393..8a41cfd535 100644 --- a/components/codetools/pascalreadertool.pas +++ b/components/codetools/pascalreadertool.pas @@ -112,7 +112,7 @@ type function PropertyNodeHasParamList(PropNode: TCodeTreeNode): boolean; function PropNodeIsTypeLess(PropNode: TCodeTreeNode): boolean; function PropertyHasSpecifier(PropNode: TCodeTreeNode; - const s: string; ExceptionOnNotFound: boolean = true): boolean; + s: string; ExceptionOnNotFound: boolean = true): boolean; // procs function ExtractProcName(ProcNode: TCodeTreeNode; @@ -2867,7 +2867,7 @@ begin end; function TPascalReaderTool.PropertyHasSpecifier(PropNode: TCodeTreeNode; - const s: string; ExceptionOnNotFound: boolean): boolean; + s: string; ExceptionOnNotFound: boolean): boolean; begin // ToDo: ppu, dcu @@ -2891,11 +2891,13 @@ begin ReadNextAtom; end; end; + + s:=UpperCaseStr(s); // read specifiers while not (CurPos.Flag in [cafSemicolon,cafNone]) do begin if WordIsPropertySpecifier.DoIdentifier(@Src[CurPos.StartPos]) then begin - if AtomIs(s) then exit(true); + if UpAtomIs(s) then exit(true); end else if CurPos.Flag=cafEdgedBracketOpen then begin if not ReadTilBracketClose(ExceptionOnNotFound) then exit; ReadNextAtom;