codetools: allow "helper" variable in object

git-svn-id: trunk@49645 -
This commit is contained in:
mattias 2015-08-11 12:13:32 +00:00
parent 410d77a990
commit 348bc7ef4c
2 changed files with 3 additions and 2 deletions

View File

@ -7046,7 +7046,7 @@ function TFindDeclarationTool.BuildInterfaceIdentifierCache(
FInterfaceIdentifierCache.Add(@Src[Node.StartPos],Node,Node.StartPos);
ScanForEnums(Node);
if (Node.Desc = ctnTypeDefinition) and
Assigned(Node.FirstChild) and (Node.FirstChild.Desc in [ctnClassHelper, ctnRecordHelper, ctnTypeHelper])
Assigned(Node.FirstChild) and (Node.FirstChild.Desc in [ctnClassHelper, ctnRecordHelper, ctnTypeHelper])
then
FInterfaceHelperCache.AddFromHelperNode(Node.FirstChild, Self, True);
end;

View File

@ -4322,7 +4322,8 @@ begin
EndChildNode;
IsForward:=false;
end;
end else if UpAtomIs('HELPER') then begin
end else if UpAtomIs('HELPER')
and (ClassDesc in [ctnClass,ctnRecordType,ctnTypeType]) then begin
IsHelper:=true;
case ClassDesc of
ctnClass: CurNode.Desc:=ctnClassHelper;