diff --git a/Src/AST/Myc.Ast.Analyzer.pas b/Src/AST/Myc.Ast.Analyzer.pas index 2bbf228..d45c8ef 100644 --- a/Src/AST/Myc.Ast.Analyzer.pas +++ b/Src/AST/Myc.Ast.Analyzer.pas @@ -34,7 +34,7 @@ type implementation uses - Myc.Ast.Types; // Added for TTypes.Unknown + Myc.Ast.Types; { TUpvalueAnalyzer } diff --git a/Src/AST/Myc.Ast.Binding.pas b/Src/AST/Myc.Ast.Binding.pas index fa4d132..57fad27 100644 --- a/Src/AST/Myc.Ast.Binding.pas +++ b/Src/AST/Myc.Ast.Binding.pas @@ -993,12 +993,12 @@ var valNode: IAstNode; valType: IStaticType; scalarKind: TScalar.TKind; - allScalar: Boolean; // Added + allScalar: Boolean; begin FNextIsTail := False; SetLength(boundFields, Length(Node.Fields)); SetLength(scalarDefFields, Length(Node.Fields)); // Renamed - allScalar := True; // Added + allScalar := True; for i := 0 to High(Node.Fields) do begin diff --git a/Src/AST/Myc.Ast.JSON.pas b/Src/AST/Myc.Ast.JSON.pas index e978ca0..af963f8 100644 --- a/Src/AST/Myc.Ast.JSON.pas +++ b/Src/AST/Myc.Ast.JSON.pas @@ -780,7 +780,7 @@ var paramArray: TJSONArray; i: Integer; begin - // Added deserialization for macro definitions. + name := JsonToIdentifierNode(AObj.GetValue('Name') as TJSONObject); paramArray := AObj.GetValue('Parameters'); diff --git a/Src/AST/Myc.Ast.Types.pas b/Src/AST/Myc.Ast.Types.pas index 68e2e93..9cefd92 100644 --- a/Src/AST/Myc.Ast.Types.pas +++ b/Src/AST/Myc.Ast.Types.pas @@ -143,7 +143,7 @@ begin stSeries: Result := 'Series'; stRecord: Result := 'Record'; stRecordSeries: Result := 'RecordSeries'; - stGenericRecord: Result := 'GenericRecord'; // Added + stGenericRecord: Result := 'GenericRecord'; else Result := 'ErrorType'; end; @@ -159,7 +159,7 @@ type function GetElementType: IStaticType; virtual; function GetSignature: IMethodSignature; virtual; function GetDefinition: IScalarRecordDefinition; virtual; - function GetGenericDefinition: IGenericRecordDefinition; virtual; // Added + function GetGenericDefinition: IGenericRecordDefinition; virtual; function IsEqual(const Other: IStaticType): Boolean; virtual; function ToString: string; override; end; @@ -180,7 +180,6 @@ begin Result := Default(IScalarRecordDefinition); end; -// Added function TAbstractStaticType.GetGenericDefinition: IGenericRecordDefinition; begin Result := nil; @@ -433,7 +432,6 @@ begin end; // --- -// Added: Represents stGenericRecord type TGenericRecordType = class(TAbstractStaticType) private @@ -532,7 +530,6 @@ begin Result := TRecordType.Create(stRecordSeries, ADef); end; -// Added class function TTypes.CreateGenericRecord(const ADef: IGenericRecordDefinition): IStaticType; begin Result := TGenericRecordType.Create(ADef); diff --git a/Src/Data/Myc.Data.Types.pas b/Src/Data/Myc.Data.Types.pas index 2e1858f..d5fa7b1 100644 --- a/Src/Data/Myc.Data.Types.pas +++ b/Src/Data/Myc.Data.Types.pas @@ -633,7 +633,7 @@ type implementation uses - System.Math, // Added for Power function + System.Math, Myc.Data.Types.Void, Myc.Data.Types.Ordinal, Myc.Data.Types.Float, diff --git a/Src/Data/Myc.Data.Value.pas b/Src/Data/Myc.Data.Value.pas index 9e11ba8..dca5297 100644 --- a/Src/Data/Myc.Data.Value.pas +++ b/Src/Data/Myc.Data.Value.pas @@ -5,7 +5,7 @@ interface uses System.SysUtils, System.SyncObjs, - System.Generics.Collections, // Added for TDictionary + System.Generics.Collections, Myc.Utils, Myc.Data.Scalar, Myc.Data.Series, @@ -19,7 +19,7 @@ type vkSeries, vkRecordSeries, vkRecord, - vkGenericRecord, // Added + vkGenericRecord, vkManagedObject, vkMethod, vkInterface, @@ -194,7 +194,6 @@ begin Result := (FInterface as TVal).Value; end; -// Added function TDataValue.AsGenericRecord: IKeywordMapping; begin if (FKind <> vkGenericRecord) then @@ -265,7 +264,6 @@ begin TInterlocked.CompareExchange(FScalar.Value.AsInt64, NewValue.AsScalar.Value.AsInt64, Expected.AsScalar.Value.AsInt64) = Expected.AsScalar.Value.AsInt64; - // Added vkGenericRecord vkText, vkSeries, vkRecordSeries, vkRecord, vkGenericRecord, vkManagedObject, vkMethod, vkInterface, vkGeneric: Result := IntfCompareExchange(FInterface, NewValue.FInterface, Expected.FInterface) = Expected.FInterface; end; @@ -302,7 +300,6 @@ begin Result.FInterface := TVal.Create(AValue); end; -// Added class function TDataValue.FromGenericRecord(const AValue: IKeywordMapping): TDataValue; begin Result.FKind := vkGenericRecord; @@ -367,7 +364,6 @@ begin end; vkPointer: Result := TInterlocked.Exchange(FScalar.Value.AsInt64, NewValue.AsScalar.Value.AsInt64); - // Added vkGenericRecord vkText, vkSeries, vkRecordSeries, vkRecord, vkGenericRecord, vkManagedObject, vkMethod, vkInterface, vkGeneric: begin Result.FKind := FKind; @@ -380,7 +376,7 @@ function TDataValue.ToString: String; var sb: TStringBuilder; field: TScalarRecordField; - genField: TPair; // Added + genField: TPair; first: Boolean; begin case FKind of @@ -434,7 +430,7 @@ begin sb.Free; end; end; - // Added + vkGenericRecord: begin var rec := AsGenericRecord; @@ -513,7 +509,7 @@ begin vkSeries: Result := 'Series'; vkRecordSeries: Result := 'RecordSeries'; vkRecord: Result := 'Record'; - vkGenericRecord: Result := 'GenericRecord'; // Added + vkGenericRecord: Result := 'GenericRecord'; vkMethod: Result := 'Method'; vkInterface: Result := 'Interface'; vkPointer: Result := 'Pointer'; diff --git a/Test/TestCoreFutures.pas b/Test/TestCoreFutures.pas index 660e1d1..11dc603 100644 --- a/Test/TestCoreFutures.pas +++ b/Test/TestCoreFutures.pas @@ -5,7 +5,7 @@ interface uses DUnitX.TestFramework, System.SysUtils, - System.Generics.Collections, // Added for TObjectList if needed, not strictly for this + System.Generics.Collections, System.SyncObjs, Myc.Signals, // For IMycLatch, TMycLatch, IMycState, IMycSubscriber [cite: 62, 68, 53, 45] Myc.Core.Tasks, // For IMycTaskFactory, TMycTaskFactory [cite: 97, 113]