codetools: identifier completion: fixed IsReadOnly

git-svn-id: trunk@44498 -
This commit is contained in:
mattias 2014-03-23 19:16:29 +00:00
parent a46b9d6e39
commit 272765465b
2 changed files with 7 additions and 5 deletions

View File

@ -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}

View File

@ -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;