New visualizer
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user