Refactoring

This commit is contained in:
Michael Schimmel
2025-11-02 22:44:01 +01:00
parent 92cfe94463
commit eb42a4ef3b
6 changed files with 29 additions and 23 deletions
+3 -3
View File
@@ -197,7 +197,7 @@ begin
// Arguments are not in tail position
FNextIsTail := False;
N.Arguments := AcceptNodes<IAstNode>(N.Arguments, function(Node: IAstNode): IAstNode begin exit(Node) end);
N.Arguments := AcceptNodes(N.Arguments);
Result := N;
end;
@@ -215,7 +215,7 @@ begin
// Also visit the original call nodes, though they are not in tail pos
FNextIsTail := False;
N.Callee := Accept(N.Callee);
N.Arguments := AcceptNodes<IAstNode>(N.Arguments, function(Node: IAstNode): IAstNode begin exit(Node) end);
N.Arguments := AcceptNodes(N.Arguments);
Result := N;
end;
@@ -231,7 +231,7 @@ begin
// Arguments are not in tail position
FNextIsTail := False;
N.Callee := Accept(N.Callee);
N.Arguments := AcceptNodes<IAstNode>(N.Arguments, function(Node: IAstNode): IAstNode begin exit(Node) end);
N.Arguments := AcceptNodes(N.Arguments);
// Mutate the node with the TCO status
N.IsTailCall := isTailCall;