1st full macro expander
This commit is contained in:
@@ -26,7 +26,7 @@ type
|
||||
|
||||
protected
|
||||
// Overridden to provide the debug-specific visitor factory.
|
||||
function CreateVisitorFactory: TVisitorFactory; override;
|
||||
function CreateVisitorFactory: TEvaluatorFactory; override;
|
||||
|
||||
public
|
||||
constructor Create(const AScope: IExecutionScope; ALog: TStrings; AShowScope: Boolean; AInitialIndent: Integer = 0);
|
||||
@@ -66,13 +66,13 @@ begin
|
||||
ShowScope;
|
||||
end;
|
||||
|
||||
function TDebugEvaluatorVisitor.CreateVisitorFactory: TVisitorFactory;
|
||||
function TDebugEvaluatorVisitor.CreateVisitorFactory: TEvaluatorFactory;
|
||||
begin
|
||||
// Return a closure that creates a new Debug visitor, using the current context
|
||||
|
||||
var callingVisitor := Self as IAstVisitor;
|
||||
var callingVisitor := Self as IEvaluatorVisitor;
|
||||
Result :=
|
||||
function(const AScope: IExecutionScope): IAstVisitor
|
||||
function(const AScope: IExecutionScope): IEvaluatorVisitor
|
||||
begin
|
||||
var visitor := callingVisitor as TDebugEvaluatorVisitor;
|
||||
Result := TDebugEvaluatorVisitor.Create(AScope, visitor.FLog, visitor.FShowScope, visitor.FIndentLevel);
|
||||
|
||||
Reference in New Issue
Block a user