Visual AST editing with drag'n'drop 1s Version

This commit is contained in:
Michael Schimmel
2025-11-30 16:00:00 +01:00
parent cd0f2ffde3
commit 438baa3609
10 changed files with 917 additions and 565 deletions
+6 -6
View File
@@ -19,11 +19,11 @@ type
private
FExprDepth: Integer;
FParentControl: TControl;
FWorkspace: TAstWorkspace;
FWorkspace: TWorkspace; // Changed from TAstWorkspace to TWorkspace
function CallAccept(const Node: IAstNode): TAstViewNode;
function GetExprDepth: Integer;
function GetParentControl: TControl;
function GetWorkspace: TAstWorkspace;
function GetWorkspace: TWorkspace; // Changed signature
procedure SetExprDepth(const Value: Integer);
procedure SetParentControl(const Value: TControl);
protected
@@ -61,21 +61,21 @@ type
function VisitNop(const Node: INopNode): TAstViewNode; override;
public
constructor Create(AWorkspace: TAstWorkspace; AParentControl: TControl; AExprDepth: Integer);
constructor Create(AWorkspace: TWorkspace; AParentControl: TControl; AExprDepth: Integer);
destructor Destroy; override;
function Clone(ParentControl: TControl; ExprDepth: Integer): IAstVisualizer;
property ExprDepth: Integer read GetExprDepth write SetExprDepth;
property ParentControl: TControl read GetParentControl write SetParentControl;
property Workspace: TAstWorkspace read GetWorkspace;
property Workspace: TWorkspace read GetWorkspace;
end;
implementation
{ TAstVisualizer }
constructor TAstVisualizer.Create(AWorkspace: TAstWorkspace; AParentControl: TControl; AExprDepth: Integer);
constructor TAstVisualizer.Create(AWorkspace: TWorkspace; AParentControl: TControl; AExprDepth: Integer);
begin
inherited Create;
FWorkspace := AWorkspace;
@@ -122,7 +122,7 @@ begin
Result := FParentControl;
end;
function TAstVisualizer.GetWorkspace: TAstWorkspace;
function TAstVisualizer.GetWorkspace: TWorkspace;
begin
Result := FWorkspace;
end;