Fixed macro expansion
This commit is contained in:
@@ -503,12 +503,14 @@ var
|
||||
N: TMacroExpansionNode;
|
||||
begin
|
||||
N := (Node as TMacroExpansionNode);
|
||||
// Visit original call parts
|
||||
N.Callee := Accept(N.Callee);
|
||||
N.Arguments := AcceptNodes(N.Arguments);
|
||||
// Visit expanded body
|
||||
|
||||
// ONLY visit the expanded body, as this is the "real" AST node.
|
||||
N.ExpandedBody := Accept(N.ExpandedBody);
|
||||
Result := Node;
|
||||
|
||||
// Callee and Arguments are metadata for the visualizer and must NOT be visited
|
||||
// by subsequent phases (Binder, TypeChecker, etc.).
|
||||
|
||||
Result := Node; // Return the (mutated) wrapper
|
||||
end;
|
||||
|
||||
function TAstTransformer.VisitBlockExpression(const Node: IBlockExpressionNode): IAstNode;
|
||||
|
||||
Reference in New Issue
Block a user