in codegen/syntax/ModuleDeclaration.hack [122:155]
public function rewriteChildren<Tret as ?Node>(
(function(Node, vec<Node>): Tret) $rewriter,
vec<Node> $parents = vec[],
): this {
$parents[] = $this;
$attribute_spec = $this->_attribute_spec === null
? null
: $rewriter($this->_attribute_spec, $parents);
$keyword =
$this->_keyword === null ? null : $rewriter($this->_keyword, $parents);
$name = $this->_name === null ? null : $rewriter($this->_name, $parents);
$left_brace = $this->_left_brace === null
? null
: $rewriter($this->_left_brace, $parents);
$right_brace = $this->_right_brace === null
? null
: $rewriter($this->_right_brace, $parents);
if (
$attribute_spec === $this->_attribute_spec &&
$keyword === $this->_keyword &&
$name === $this->_name &&
$left_brace === $this->_left_brace &&
$right_brace === $this->_right_brace
) {
return $this;
}
return new static(
$attribute_spec as ?Node,
$keyword as ?Node,
$name as ?Node,
$left_brace as ?Node,
$right_brace as ?Node,
);
}