TDataValue as new global variant type
This commit is contained in:
@@ -6,6 +6,7 @@ uses
|
||||
System.SysUtils,
|
||||
System.Generics.Collections,
|
||||
System.Classes,
|
||||
Myc.Data.Value,
|
||||
Myc.Ast.Nodes;
|
||||
|
||||
type
|
||||
@@ -28,7 +29,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure Clear;
|
||||
function Dump: string;
|
||||
procedure Define(const Name: string; const Value: TAstValue);
|
||||
procedure Define(const Name: string; const Value: TDataValue);
|
||||
property NameToIndex: TDictionary<string, Integer> read FNameToIndex;
|
||||
property Parent: IExecutionScope read FParent;
|
||||
property Values: TArray<IValueCell> read FValues;
|
||||
@@ -42,19 +43,19 @@ uses
|
||||
type
|
||||
TValueCell = class(TInterfacedObject, IValueCell)
|
||||
private
|
||||
FValue: TAstValue;
|
||||
function GetValue: TAstValue;
|
||||
procedure SetValue(const AValue: TAstValue);
|
||||
FValue: TDataValue; // <-- Changed from TAstValue
|
||||
function GetValue: TDataValue; // <-- Changed from TAstValue
|
||||
procedure SetValue(const AValue: TDataValue); // <-- Changed from TAstValue
|
||||
end;
|
||||
|
||||
{ TValueCell }
|
||||
|
||||
function TValueCell.GetValue: TAstValue;
|
||||
function TValueCell.GetValue: TDataValue;
|
||||
begin
|
||||
Result := FValue;
|
||||
end;
|
||||
|
||||
procedure TValueCell.SetValue(const AValue: TAstValue);
|
||||
procedure TValueCell.SetValue(const AValue: TDataValue);
|
||||
begin
|
||||
FValue := AValue;
|
||||
end;
|
||||
@@ -136,7 +137,7 @@ begin
|
||||
FNameToIndex.Clear;
|
||||
end;
|
||||
|
||||
procedure TExecutionScope.Define(const Name: string; const Value: TAstValue);
|
||||
procedure TExecutionScope.Define(const Name: string; const Value: TDataValue); // <-- Changed from TAstValue
|
||||
var
|
||||
index: Integer;
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user