in codegen/syntax/FunctionDeclarationHeader.hack [216:274]
public function rewriteChildren<Tret as ?Node>(
(function(Node, vec<Node>): Tret) $rewriter,
vec<Node> $parents = vec[],
): this {
$parents[] = $this;
$modifiers = $this->_modifiers === null
? null
: $rewriter($this->_modifiers, $parents);
$keyword = $rewriter($this->_keyword, $parents);
$name = $rewriter($this->_name, $parents);
$type_parameter_list = $this->_type_parameter_list === null
? null
: $rewriter($this->_type_parameter_list, $parents);
$left_paren = $rewriter($this->_left_paren, $parents);
$parameter_list = $this->_parameter_list === null
? null
: $rewriter($this->_parameter_list, $parents);
$right_paren = $rewriter($this->_right_paren, $parents);
$contexts =
$this->_contexts === null ? null : $rewriter($this->_contexts, $parents);
$colon = $this->_colon === null ? null : $rewriter($this->_colon, $parents);
$readonly_return = $this->_readonly_return === null
? null
: $rewriter($this->_readonly_return, $parents);
$type = $this->_type === null ? null : $rewriter($this->_type, $parents);
$where_clause = $this->_where_clause === null
? null
: $rewriter($this->_where_clause, $parents);
if (
$modifiers === $this->_modifiers &&
$keyword === $this->_keyword &&
$name === $this->_name &&
$type_parameter_list === $this->_type_parameter_list &&
$left_paren === $this->_left_paren &&
$parameter_list === $this->_parameter_list &&
$right_paren === $this->_right_paren &&
$contexts === $this->_contexts &&
$colon === $this->_colon &&
$readonly_return === $this->_readonly_return &&
$type === $this->_type &&
$where_clause === $this->_where_clause
) {
return $this;
}
return new static(
/* HH_FIXME[4110] ?NodeList<Token> may not be enforceable */ $modifiers,
$keyword as FunctionToken,
$name as Token,
$type_parameter_list as ?TypeParameters,
$left_paren as LeftParenToken,
/* HH_FIXME[4110] ?NodeList<ListItem<IParameter>> may not be enforceable */ $parameter_list,
$right_paren as RightParenToken,
$contexts as ?Contexts,
$colon as ?ColonToken,
$readonly_return as ?ReadonlyToken,
$type as ?ITypeSpecifier,
$where_clause as ?WhereClause,
);
}