Fix in Scripting
This commit is contained in:
@@ -39,8 +39,8 @@ type
|
||||
|
||||
procedure EnterScope;
|
||||
procedure ExitScope;
|
||||
function GetCurrentDescriptor: IScopeDescriptor;
|
||||
function IsValidIdentifier(const Name: string): Boolean;
|
||||
|
||||
protected
|
||||
// Stack management for tail-call state is centralized here.
|
||||
function Accept(const Node: IAstNode): TDataValue; override;
|
||||
@@ -65,8 +65,6 @@ type
|
||||
function TransformTernaryExpression(const Node: ITernaryExpressionNode): ITernaryExpressionNode; override;
|
||||
function TransformBinaryExpression(const Node: IBinaryExpressionNode): IBinaryExpressionNode; override;
|
||||
function TransformUnaryExpression(const Node: IUnaryExpressionNode): IUnaryExpressionNode; override;
|
||||
|
||||
property CurrentDescriptor: IScopeDescriptor read GetCurrentDescriptor;
|
||||
end;
|
||||
|
||||
TBoundIdentifierNode = class(TIdentifierNode)
|
||||
@@ -251,11 +249,6 @@ begin
|
||||
FCurrentDescriptor := FCurrentDescriptor.Parent;
|
||||
end;
|
||||
|
||||
function TAstBinder.GetCurrentDescriptor: IScopeDescriptor;
|
||||
begin
|
||||
Result := FCurrentDescriptor;
|
||||
end;
|
||||
|
||||
function TAstBinder.IsValidIdentifier(const Name: string): Boolean;
|
||||
var
|
||||
c: Char;
|
||||
|
||||
@@ -25,14 +25,14 @@ type
|
||||
TEvaluatorVisitor = class(TAstVisitor, IEvaluatorVisitor)
|
||||
private
|
||||
FScope: IExecutionScope;
|
||||
procedure HandleTCO(var ResultValue: TDataValue);
|
||||
|
||||
protected
|
||||
function IsTruthy(const AValue: TDataValue): Boolean; inline;
|
||||
|
||||
// Returns a closure that can create the correct type of visitor for a lambda's body.
|
||||
function CreateVisitorFactory: TVisitorFactory; virtual;
|
||||
|
||||
procedure HandleTCO(var ResultValue: TDataValue);
|
||||
|
||||
property Scope: IExecutionScope read FScope;
|
||||
public
|
||||
constructor Create(const AScope: IExecutionScope);
|
||||
|
||||
Reference in New Issue
Block a user