1st full macro expander

This commit is contained in:
Michael Schimmel
2025-10-03 19:46:30 +02:00
parent bb0ecda6be
commit d9219474e0
16 changed files with 700 additions and 323 deletions
+4 -4
View File
@@ -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);