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
+3 -2
View File
@@ -259,8 +259,9 @@ function TMacroExpander.VisitMacroDefinition(const Node: IMacroDefinitionNode):
begin
// Register the macro in the current descriptor
FCurrentDescriptor.DefineMacro(Node.Name.Name, Node);
// Remove the (defmacro ...) node from the AST; it's compile-time only.
Result := nil;
// Keep the node in the AST (for the visualizer).
Result := Node;
end;
function TMacroExpander.VisitFunctionCall(const Node: IFunctionCallNode): IAstNode;