fixed ct nodes for proc param type array of

git-svn-id: trunk@5740 -
This commit is contained in:
mattias 2004-08-04 17:35:40 +00:00
parent e8ec5bd600
commit 79f1d1940b
3 changed files with 18 additions and 11 deletions

View File

@ -1924,6 +1924,7 @@ var
// false if search should continue
begin
Result:=false;
//DebugLn(' Definition Identifier "',GetIdentifier(Params.Identifier),'" ',GetIdentifier(@UpperSrc[ContextNode.StartPos]));
if (fdfCollect in Params.Flags)
or CompareSrcIdentifiers(ContextNode.StartPos,Params.Identifier)
then begin
@ -2164,10 +2165,10 @@ begin
{$IFDEF ShowTriedContexts}
DebugLn('[TFindDeclarationTool.FindIdentifierInContext] Start Ident=',
'"',GetIdentifier(Params.Identifier),'"',
' Context="',ContextNode.DescAsString,'" "',StringToPascalConst(copy(Src,ContextNode.StartPos,20)),'"',
' File="',ExtractFilename(MainFilename)+'"',
' Flags=[',FindDeclarationFlagsAsString(Params.Flags),']'
'"'+GetIdentifier(Params.Identifier)+'"',
' Context="'+ContextNode.DescAsString+'" "'+StringToPascalConst(copy(Src,ContextNode.StartPos,20)),'"',
' File="'+ExtractFilename(MainFilename)+'"',
' Flags=['+FindDeclarationFlagsAsString(Params.Flags)+']'
);
{$ELSE}
{$IFDEF ShowCollect}
@ -3400,7 +3401,7 @@ begin
DebugLn({$IFDEF DebugPrefix}DebugPrefix,{$ENDIF}
'TFindDeclarationTool.FindIdentifierInInterface',
' Ident="',GetIdentifier(Params.Identifier),'"',
' IgnoreUsedUnits=',fdfIgnoreUsedUnits in Params.Flags,
' IgnoreUsedUnits=',dbgs(fdfIgnoreUsedUnits in Params.Flags),
' Self=',TCodeBuffer(Scanner.MainCode).Filename
);
{$ENDIF}
@ -3544,7 +3545,7 @@ begin
{$IFDEF ShowTriedContexts}
DebugLn('[TFindDeclarationTool.FindIdentifierInUsedUnit] ',
' This source is=',TCodeBuffer(Scanner.MainCode).Filename,
' NewCode=',NewCode.Filename,' IgnoreUsedUnits=',fdfIgnoreUsedUnits in Params.Flags);
' NewCode=',NewCode.Filename,' IgnoreUsedUnits=',dbgs(fdfIgnoreUsedUnits in Params.Flags));
{$ENDIF}
if Assigned(FOnGetCodeToolForBuffer) then begin
NewCodeTool:=FOnGetCodeToolForBuffer(Self,NewCode);
@ -3629,7 +3630,7 @@ begin
Result:=false;
{$IFDEF ShowTriedContexts}
DebugLn('[TFindDeclarationTool.FindIdentifierInHiddenUsedUnits] ',
'"',GetIdentifier(Params.Identifier),'" IgnoreUsedUnits=',fdfIgnoreUsedUnits in Params.Flags);
'"',GetIdentifier(Params.Identifier),'" IgnoreUsedUnits=',dbgs(fdfIgnoreUsedUnits in Params.Flags));
{$ENDIF}
if (Tree.Root<>nil) and (not (fdfIgnoreUsedUnits in Params.Flags)) then begin
// check, if this is a special unit
@ -5521,7 +5522,7 @@ begin
// List1 is better, if first difference is better for List1
Result:=(i>=0) and (List1[i]=tcExact);
{$IFDEF ShowFoundIdentifier}
DebugLn('[TFindDeclarationTool.CompatibilityList1IsBetter] END i=',i);
DebugLn('[TFindDeclarationTool.CompatibilityList1IsBetter] END i=',dbgs(i));
{$ENDIF}
end;

View File

@ -1098,11 +1098,13 @@ function TPascalParserTool.ReadParamType(ExceptionOnError, Extract: boolean;
const Attr: TProcHeadAttributes): boolean;
var
copying: boolean;
IsArrayType: Boolean;
begin
copying:=[phpWithoutParamList,phpWithoutParamTypes]*Attr=[];
Result:=false;
if CurPos.Flag in AllCommonAtomWords then begin
if UpAtomIs('ARRAY') then begin
IsArrayType:=UpAtomIs('ARRAY');
if IsArrayType then begin
if (phpCreateNodes in Attr) then begin
CreateChildNode;
CurNode.Desc:=ctnOpenArrayType;
@ -1153,6 +1155,8 @@ begin
end;
if (phpCreateNodes in Attr) then begin
EndChildNode;
if IsArrayType then
EndChildNode;
end;
end else begin
if ExceptionOnError then

View File

@ -240,8 +240,10 @@ begin
Dest.ImageIndex:=Src.ImageIndex;
Dest.ShortCut:=Src.ShortCut;
Dest.Visible:=Src.Visible;
if (Dest is TContainedAction) and (Dest.ImageIndex>=0) then begin
if (Dest is TContainedAction) and (Dest.ImageIndex>=0)
and (Src is TContainedAction) then begin
// ToDo: copy image
end;
end;
finally