Keyword mapping refactoring

This commit is contained in:
Michael Schimmel
2025-12-09 13:12:37 +01:00
parent f8dc5b945c
commit 76c92fa355
6 changed files with 62 additions and 81 deletions
+2 -4
View File
@@ -78,8 +78,7 @@ uses
Myc.Data.Decimal,
Myc.Data.Series,
Myc.Data.Scalar.JSON,
Myc.Ast.Types,
Myc.Data.Records;
Myc.Ast.Types;
// Helper type for TCO via trampolining.
type
@@ -499,8 +498,7 @@ begin
genFields[i] := TPair<IKeyword, TDataValue>.Create(field.Key.Value, field.Value.Accept(Self));
end;
var dynRec := TDynamicRecord.Create(genFields);
Result := TDataValue.FromGenericRecord(dynRec);
Result := TDataValue.FromGenericRecord(TKeywordMapping<TDataValue>.Create(genFields));
end
else if Assigned(Node.ScalarDefinition) then
begin