Major refactoring, split Bound Ast from source Ast
This commit is contained in:
@@ -44,7 +44,12 @@ type
|
||||
procedure DblClick; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
procedure BuildTree(const RootNode: IAstNode; const RootScope: IExecutionScope; const Position: TPointF; AMode: TVisualizationMode);
|
||||
procedure BuildTree(
|
||||
const RootNode: IAstNode;
|
||||
const RootDescriptor: IScopeDescriptor;
|
||||
const Position: TPointF;
|
||||
AMode: TVisualizationMode
|
||||
);
|
||||
function GetChildrenMatrix(var Matrix: TMatrix; var Simple: Boolean): Boolean; override;
|
||||
function Zoom(Factor: Single): Boolean;
|
||||
|
||||
@@ -109,19 +114,17 @@ end;
|
||||
|
||||
procedure TAuraWorkspace.BuildTree(
|
||||
const RootNode: IAstNode;
|
||||
const RootScope: IExecutionScope;
|
||||
const RootDescriptor: IScopeDescriptor;
|
||||
const Position: TPointF;
|
||||
AMode: TVisualizationMode
|
||||
);
|
||||
var
|
||||
connections: TList<TPinConnection>;
|
||||
rootDescriptor: IScopeDescriptor;
|
||||
begin
|
||||
connections := TList<TPinConnection>.Create;
|
||||
try
|
||||
// Create the scope descriptor from the execution scope provided by the binder.
|
||||
rootDescriptor := TAstBinder.CreateDescriptor(RootScope);
|
||||
RootNode.Accept(TAstToAuraNodeVisitor.Create(Self, Self, Position, connections, nil, AMode, nil, nil, rootDescriptor));
|
||||
RootNode.Accept(TAstToAuraNodeVisitor.Create(Self, Self, Position, connections, nil, AMode, nil, nil, RootDescriptor));
|
||||
FConnections := FConnections + connections.ToArray;
|
||||
finally
|
||||
connections.Free;
|
||||
|
||||
Reference in New Issue
Block a user