Generic Visitors
This commit is contained in:
@@ -23,9 +23,6 @@ type
|
||||
FScope: IExecutionScope;
|
||||
|
||||
protected
|
||||
// Setup the registry-based handlers
|
||||
procedure SetupHandlers; override;
|
||||
|
||||
// --- Core Logic Implementation (Legacy Virtual Overrides) ---
|
||||
// These are kept as virtual methods so TDebugEvaluatorVisitor can still override them.
|
||||
function VisitConstant(const Node: IConstantNode): TDataValue; override;
|
||||
@@ -117,17 +114,6 @@ begin
|
||||
Assert(Assigned(AScope));
|
||||
end;
|
||||
|
||||
procedure TEvaluatorVisitor.SetupHandlers;
|
||||
begin
|
||||
// The base SetupHandlers registers delegates that call the virtual methods (VisitConstant, etc.).
|
||||
// Since TEvaluatorVisitor still implements its logic by overriding these virtual methods (for now),
|
||||
// we just call inherited.
|
||||
//
|
||||
// In Phase 2/3 of refactoring, we would move the logic from VisitConstant directly into
|
||||
// anonymous methods or separate handler functions registered here, bypassing the virtual table.
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TEvaluatorVisitor.Execute(const RootNode: IAstNode): TDataValue;
|
||||
begin
|
||||
if not Assigned(RootNode) then
|
||||
|
||||
Reference in New Issue
Block a user