Refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user