in codegen/syntax/ForeachStatement.hack [192:235]
public function rewriteChildren<Tret as ?Node>(
(function(Node, vec<Node>): Tret) $rewriter,
vec<Node> $parents = vec[],
): this {
$parents[] = $this;
$keyword = $rewriter($this->_keyword, $parents);
$left_paren = $rewriter($this->_left_paren, $parents);
$collection = $rewriter($this->_collection, $parents);
$await_keyword = $this->_await_keyword === null
? null
: $rewriter($this->_await_keyword, $parents);
$as = $rewriter($this->_as, $parents);
$key = $this->_key === null ? null : $rewriter($this->_key, $parents);
$arrow = $this->_arrow === null ? null : $rewriter($this->_arrow, $parents);
$value = $rewriter($this->_value, $parents);
$right_paren = $rewriter($this->_right_paren, $parents);
$body = $rewriter($this->_body, $parents);
if (
$keyword === $this->_keyword &&
$left_paren === $this->_left_paren &&
$collection === $this->_collection &&
$await_keyword === $this->_await_keyword &&
$as === $this->_as &&
$key === $this->_key &&
$arrow === $this->_arrow &&
$value === $this->_value &&
$right_paren === $this->_right_paren &&
$body === $this->_body
) {
return $this;
}
return new static(
$keyword as ForeachToken,
$left_paren as LeftParenToken,
$collection as IExpression,
$await_keyword as ?AwaitToken,
$as as AsToken,
$key as ?IExpression,
$arrow as ?EqualGreaterThanToken,
$value as IExpression,
$right_paren as RightParenToken,
$body as IStatement,
);
}