in codegen/syntax/DarrayTypeSpecifier.hack [46:133]
public static function fromJSON(
dict<arraykey, mixed> $json,
string $file,
int $initial_offset,
string $source,
string $_type_hint,
): this {
$offset = $initial_offset;
$keyword = Node::fromJSON(
($json['darray_keyword']) as dict<_, _>,
$file,
$offset,
$source,
'DarrayToken',
);
$keyword = $keyword as nonnull;
$offset += $keyword->getWidth();
$left_angle = Node::fromJSON(
($json['darray_left_angle']) as dict<_, _>,
$file,
$offset,
$source,
'LessThanToken',
);
$left_angle = $left_angle as nonnull;
$offset += $left_angle->getWidth();
$key = Node::fromJSON(
($json['darray_key']) as dict<_, _>,
$file,
$offset,
$source,
'ITypeSpecifier',
);
$key = $key as nonnull;
$offset += $key->getWidth();
$comma = Node::fromJSON(
($json['darray_comma']) as dict<_, _>,
$file,
$offset,
$source,
'CommaToken',
);
$comma = $comma as nonnull;
$offset += $comma->getWidth();
$value = Node::fromJSON(
($json['darray_value']) as dict<_, _>,
$file,
$offset,
$source,
'ITypeSpecifier',
);
$value = $value as nonnull;
$offset += $value->getWidth();
$trailing_comma = Node::fromJSON(
($json['darray_trailing_comma'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'Node',
);
$offset += $trailing_comma?->getWidth() ?? 0;
$right_angle = Node::fromJSON(
($json['darray_right_angle']) as dict<_, _>,
$file,
$offset,
$source,
'GreaterThanToken',
);
$right_angle = $right_angle as nonnull;
$offset += $right_angle->getWidth();
$source_ref = shape(
'file' => $file,
'source' => $source,
'offset' => $initial_offset,
'width' => $offset - $initial_offset,
);
return new static(
/* HH_IGNORE_ERROR[4110] */ $keyword,
/* HH_IGNORE_ERROR[4110] */ $left_angle,
/* HH_IGNORE_ERROR[4110] */ $key,
/* HH_IGNORE_ERROR[4110] */ $comma,
/* HH_IGNORE_ERROR[4110] */ $value,
/* HH_IGNORE_ERROR[4110] */ $trailing_comma,
/* HH_IGNORE_ERROR[4110] */ $right_angle,
$source_ref,
);
}