Implement legacy formatting for unknown shape fields
Summary:
Supports formatting for unknown shape fields within shapes. In order to support this feature, I had to generalize `list_comma_multi_nl` slightly. I've introduced the new `list_comma_multi_nl_maybe_trail`, to follow the naming convention used with `list_comma_multi_maybe_trail`. The newly-introduced method takes a reduction function of `bool -> env -> bool` in addition to the base case `~trailing`. It uses `list_comma_multi_maybe_trail` (which itself takes a reduction function as an argument), passing in the reduction function, which is used to determine whether or not a formatted list should have a trailing comma.
For cleanliness, I've rewritten the existing `list_comma_multi_nl`, which is expressible in terms of the new `list_comma_multi_nl_maybe_trail`.
Reviewed By: eshrews
Differential Revision:
D4645959
fbshipit-source-id:
ed25fe2cba16ed3cabe8bedebfcb79eac11ac241