in codegen/syntax/ContextAliasDeclaration.hack [49:144]
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['ctx_alias_attribute_spec'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'Node',
);
$offset += $attribute_spec?->getWidth() ?? 0;
$keyword = Node::fromJSON(
($json['ctx_alias_keyword']) as dict<_, _>,
$file,
$offset,
$source,
'NewctxToken',
);
$keyword = $keyword as nonnull;
$offset += $keyword->getWidth();
$name = Node::fromJSON(
($json['ctx_alias_name']) as dict<_, _>,
$file,
$offset,
$source,
'NameToken',
);
$name = $name as nonnull;
$offset += $name->getWidth();
$generic_parameter = Node::fromJSON(
($json['ctx_alias_generic_parameter'] ?? dict['kind' => 'missing'])
as dict<_, _>,
$file,
$offset,
$source,
'Node',
);
$offset += $generic_parameter?->getWidth() ?? 0;
$as_constraint = Node::fromJSON(
($json['ctx_alias_as_constraint']) as dict<_, _>,
$file,
$offset,
$source,
'NodeList<ContextConstraint>',
);
$as_constraint = $as_constraint as nonnull;
$offset += $as_constraint->getWidth();
$equal = Node::fromJSON(
($json['ctx_alias_equal'] ?? dict['kind' => 'missing']) as dict<_, _>,
$file,
$offset,
$source,
'Node',
);
$offset += $equal?->getWidth() ?? 0;
$context = Node::fromJSON(
($json['ctx_alias_context'] ?? dict['kind' => 'missing']) as dict<_, _>,
$file,
$offset,
$source,
'Node',
);
$offset += $context?->getWidth() ?? 0;
$semicolon = Node::fromJSON(
($json['ctx_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] */ $as_constraint,
/* HH_IGNORE_ERROR[4110] */ $equal,
/* HH_IGNORE_ERROR[4110] */ $context,
/* HH_IGNORE_ERROR[4110] */ $semicolon,
$source_ref,
);
}