New visualizer

This commit is contained in:
Michael Schimmel
2025-10-30 13:26:50 +01:00
parent f1735e2678
commit b0d87fdc69
5 changed files with 104 additions and 75 deletions
+21 -1
View File
@@ -306,7 +306,27 @@ begin
smaScope := smaDescriptor.CreateScope(Scope);
smaVisitor := CreateEvaluator(smaScope);
Scope.Define('CreateSMA', smaVisitor.Execute(boundSmaAst));
Scope.Define(
'print',
TDataValue(
function(const Args: TArray<TDataValue>): TDataValue
begin
var str := TStringBuilder.Create;
try
for var i := 0 to High(Args) do
begin
if Args[i].Kind = vkText then
str.Append(Args[i].AsText)
else
str.Append(Args[i].ToString);
end;
Memo1.Lines.Add(str.ToString);
finally
str.Free;
end;
end
)
);
end
);