ITupleNode signature change

This commit is contained in:
Michael Schimmel
2026-01-06 11:37:18 +01:00
parent 264314cd93
commit 40ed51aef8
23 changed files with 340 additions and 270 deletions
+10 -5
View File
@@ -335,6 +335,7 @@ var
i: Integer;
argView: TAstViewNode;
opLabel: TTextNode;
argsElements: TArray<IAstNode>;
begin
visu := OwnerNode.Visualizer.Clone(OwnerNode, OwnerNode.Visualizer.ExprDepth + 1);
@@ -342,19 +343,23 @@ begin
OwnerNode.Orientation := loHorizontal;
OwnerNode.Alignment := laCenter;
if FNode.Arguments.Count = 1 then
// Optimization: Access Elements directly
argsElements := FNode.Arguments.Elements;
var argCount := Length(argsElements);
if argCount = 1 then
begin
opLabel := OwnerNode.AddLabel(OwnerNode, FCalleeName);
opLabel.FontSettings.Font.Style := [TFontStyle.fsBold];
opLabel.Color := TAlphaColors.Darkorange;
opLabel.Margins := TMarginRect.Create(2, 0, 2, 0);
argView := visu.CallAccept(FNode.Arguments.Items[0]);
argView := visu.CallAccept(argsElements[0]);
FArgumentNodes.Add(argView);
end
else
begin
for i := 0 to FNode.Arguments.Count - 1 do
for i := 0 to argCount - 1 do
begin
if i > 0 then
begin
@@ -365,12 +370,12 @@ begin
opLabel.Margins := TMarginRect.Create(0, 0, 0, 0);
end;
argView := visu.CallAccept(FNode.Arguments.Items[i]);
argView := visu.CallAccept(argsElements[i]);
FArgumentNodes.Add(argView);
end;
end;
if FNode.Arguments.Count = 0 then
if argCount = 0 then
begin
opLabel := OwnerNode.AddLabel(OwnerNode, FCalleeName);
opLabel.FontSettings.Font.Style := [TFontStyle.fsBold];