in codegen/syntax/EnumDeclaration.hack [188:235]
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 = $rewriter($this->_keyword, $parents);
$name = $rewriter($this->_name, $parents);
$colon = $rewriter($this->_colon, $parents);
$base = $rewriter($this->_base, $parents);
$type = $this->_type === null ? null : $rewriter($this->_type, $parents);
$left_brace = $rewriter($this->_left_brace, $parents);
$use_clauses = $this->_use_clauses === null
? null
: $rewriter($this->_use_clauses, $parents);
$enumerators = $this->_enumerators === null
? null
: $rewriter($this->_enumerators, $parents);
$right_brace = $rewriter($this->_right_brace, $parents);
if (
$attribute_spec === $this->_attribute_spec &&
$keyword === $this->_keyword &&
$name === $this->_name &&
$colon === $this->_colon &&
$base === $this->_base &&
$type === $this->_type &&
$left_brace === $this->_left_brace &&
$use_clauses === $this->_use_clauses &&
$enumerators === $this->_enumerators &&
$right_brace === $this->_right_brace
) {
return $this;
}
return new static(
$attribute_spec as ?OldAttributeSpecification,
$keyword as EnumToken,
$name as NameToken,
$colon as ColonToken,
$base as ITypeSpecifier,
$type as ?TypeConstraint,
$left_brace as LeftBraceToken,
/* HH_FIXME[4110] ?NodeList<EnumUse> may not be enforceable */ $use_clauses,
/* HH_FIXME[4110] ?NodeList<Enumerator> may not be enforceable */ $enumerators,
$right_brace as RightBraceToken,
);
}