in codegen/syntax/AliasDeclaration.hack [49:145]
public static function fromJSON(
dict<arraykey, mixed> $json,
string $file,
int $initial_offset,
string $source,
string $_type_hint,
): this {
$offset = $initial_offset;
$attribute_spec = Node::fromJSON(
($json['alias_attribute_spec'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'OldAttributeSpecification',
);
$offset += $attribute_spec?->getWidth() ?? 0;
$keyword = Node::fromJSON(
($json['alias_keyword']) as dict<_, _>,
$file,
$offset,
$source,
'Token',
);
$keyword = $keyword as nonnull;
$offset += $keyword->getWidth();
$name = Node::fromJSON(
($json['alias_name']) as dict<_, _>,
$file,
$offset,
$source,
'NameToken',
);
$name = $name as nonnull;
$offset += $name->getWidth();
$generic_parameter = Node::fromJSON(
($json['alias_generic_parameter'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'TypeParameters',
);
$offset += $generic_parameter?->getWidth() ?? 0;
$constraint = Node::fromJSON(
($json['alias_constraint'] ?? dict['kind' => 'missing']) as dict<_, _>,
$file,
$offset,
$source,
'TypeConstraint',
);
$offset += $constraint?->getWidth() ?? 0;
$equal = Node::fromJSON(
($json['alias_equal']) as dict<_, _>,
$file,
$offset,
$source,
'EqualToken',
);
$equal = $equal as nonnull;
$offset += $equal->getWidth();
$type = Node::fromJSON(
($json['alias_type']) as dict<_, _>,
$file,
$offset,
$source,
'ITypeSpecifier',
);
$type = $type as nonnull;
$offset += $type->getWidth();
$semicolon = Node::fromJSON(
($json['alias_semicolon']) as dict<_, _>,
$file,
$offset,
$source,
'SemicolonToken',
);
$semicolon = $semicolon as nonnull;
$offset += $semicolon->getWidth();
$source_ref = shape(
'file' => $file,
'source' => $source,
'offset' => $initial_offset,
'width' => $offset - $initial_offset,
);
return new static(
/* HH_IGNORE_ERROR[4110] */ $attribute_spec,
/* HH_IGNORE_ERROR[4110] */ $keyword,
/* HH_IGNORE_ERROR[4110] */ $name,
/* HH_IGNORE_ERROR[4110] */ $generic_parameter,
/* HH_IGNORE_ERROR[4110] */ $constraint,
/* HH_IGNORE_ERROR[4110] */ $equal,
/* HH_IGNORE_ERROR[4110] */ $type,
/* HH_IGNORE_ERROR[4110] */ $semicolon,
$source_ref,
);
}