Fixed macro def expansion

This commit is contained in:
Michael Schimmel
2025-11-05 10:39:15 +01:00
parent edd3e83377
commit 60358365cd
6 changed files with 11 additions and 53 deletions
+4 -4
View File
@@ -249,10 +249,10 @@ end;
function TEvaluatorVisitor.VisitMacroDefinition(const Node: IMacroDefinitionNode): TDataValue;
begin
// Macro definitions are compile-time constructs and should have been
// processed and removed from the AST by the TMacroExpander.
// If we encounter one here, it's a compiler pipeline error.
raise Exception.Create('Macro definitions cannot be evaluated at runtime.');
// Macro definitions are compile-time constructs.
// The MacroExpander leaves them in the AST for the Visualizer.
// The Evaluator must simply ignore them.
Result := TDataValue.Void;
end;
function TEvaluatorVisitor.VisitQuasiquote(const Node: IQuasiquoteNode): TDataValue;