Implement full-fidelity formatting for optional field types
commit0c9cb31497ae51a9ab1f7be61a194ef26f8cf583
authorMichael Tingley <tingley@fb.com>
Mon, 27 Mar 2017 21:26:31 +0000 (27 14:26 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 27 Mar 2017 21:45:22 +0000 (27 14:45 -0700)
treeb1666347a90f883075b6558d22efbe07464c9e23
parentda3931c984989802c2cb7efac445d3eac240a44c
Implement full-fidelity formatting for optional field types

Summary: `transform_mapish_entry` now receives an optional `prefix` argument. If provided, it will transform the formatted output according to the prefix node before the rest of the mapish entry.

Reviewed By: eshrews

Differential Revision: D4599743

fbshipit-source-id: 01f0d9e59823021f680001e0cfd20573010d13ad
hphp/hack/src/hackfmt/hack_format.ml
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_and_non_optional_types.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_and_non_optional_types.php.exp [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_type.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_type.php.exp [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_type_and_extra_types.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_structural_subtyping_with_optional_type_and_extra_types.php.exp [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_typedef_with_many_optional_fields.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_typedef_with_many_optional_fields.php.exp [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_typedef_with_optional_field.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/shape_typedef_with_optional_field.php.exp [new file with mode: 0644]