Beginning Editor
This commit is contained in:
@@ -90,11 +90,11 @@ type
|
||||
|
||||
TClosureValue = class(TInterfacedObject, TAstValue.IClosure)
|
||||
private
|
||||
FBody: IExpressionNode;
|
||||
FBody: IAstNode;
|
||||
FClosureScope: IExecutionScope;
|
||||
FLambdaNode: ILambdaExpressionNode;
|
||||
FUpvalues: TArray<IValueCell>;
|
||||
function GetBody: IExpressionNode;
|
||||
function GetBody: IAstNode;
|
||||
function GetParameters: TArray<IIdentifierNode>;
|
||||
function GetClosureScope: IExecutionScope;
|
||||
function GetUpvalues: TArray<IValueCell>;
|
||||
@@ -113,7 +113,7 @@ type
|
||||
TNativeClosure = class(TInterfacedObject, TAstValue.IClosure)
|
||||
private
|
||||
FMethod: TNativeFunction;
|
||||
function GetBody: IExpressionNode;
|
||||
function GetBody: IAstNode;
|
||||
function GetParameters: TArray<IIdentifierNode>;
|
||||
function GetClosureScope: IExecutionScope;
|
||||
function GetUpvalues: TArray<IValueCell>;
|
||||
@@ -167,7 +167,7 @@ begin
|
||||
FUpvalues := AUpvalues; // Store the captured cells
|
||||
end;
|
||||
|
||||
function TClosureValue.GetBody: IExpressionNode;
|
||||
function TClosureValue.GetBody: IAstNode;
|
||||
begin
|
||||
Result := FBody;
|
||||
end;
|
||||
@@ -195,7 +195,7 @@ begin
|
||||
FMethod := AMethod;
|
||||
end;
|
||||
|
||||
function TNativeClosure.GetBody: IExpressionNode;
|
||||
function TNativeClosure.GetBody: IAstNode;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
@@ -639,7 +639,7 @@ end;
|
||||
|
||||
function TEvaluatorVisitor.VisitBlockExpression(const Node: IBlockExpressionNode): TAstValue;
|
||||
var
|
||||
expression: IExpressionNode;
|
||||
expression: IAstNode;
|
||||
begin
|
||||
// The result of a block is the result of its last expression.
|
||||
Result := TAstValue.Void;
|
||||
|
||||
Reference in New Issue
Block a user