mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-20 03:42:11 +02:00
codetools: added TCodeContextInfoItem.AsDebugString
git-svn-id: trunk@56506 -
This commit is contained in:
parent
0d87d46948
commit
c43215a213
@ -497,7 +497,7 @@ type
|
||||
Allowed: TFindFileAtCursorFlags = DefaultFindFileAtCursorAllowed;
|
||||
StartPos: PCodeXYPosition = nil): boolean;
|
||||
|
||||
// get code context
|
||||
// get code context (aka parameter hints)
|
||||
function FindCodeContext(Code: TCodeBuffer; X,Y: integer;
|
||||
out CodeContexts: TCodeContextInfo): boolean;
|
||||
function ExtractProcedureHeader(Code: TCodeBuffer; X,Y: integer;
|
||||
|
@ -338,6 +338,7 @@ type
|
||||
Params: TStringList;
|
||||
ResultType: string;
|
||||
destructor Destroy; override;
|
||||
function AsDebugString(WithExpr: boolean): string;
|
||||
end;
|
||||
|
||||
{ TCodeContextInfo }
|
||||
@ -4357,5 +4358,21 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TCodeContextInfoItem.AsDebugString(WithExpr: boolean): string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
Result:=ProcName+'(';
|
||||
if Params<>nil then
|
||||
for i:=0 to Params.Count-1 do begin
|
||||
if i>0 then Result+=',';
|
||||
Result+=Params[i];
|
||||
end;
|
||||
Result+=')';
|
||||
if ResultType<>'' then Result+=':'+ResultType;
|
||||
if WithExpr then
|
||||
Result+=' '+ExprTypeToString(Expr);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user