Refactor SwitchStatement handling
commitd886a3d40d46a6eeacad67aab5f065171f8f31df
authorJake Bailey <jakebailey@fb.com>
Fri, 11 Aug 2017 18:27:27 +0000 (11 11:27 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 11 Aug 2017 18:52:59 +0000 (11 11:52 -0700)
treee9a3b50b0776133cd76c7fae6ac0988f82098369
parent60ac07103043f5c658b9b341849c2ccad9b110b3
Refactor SwitchStatement handling

Summary: This handling was needlessly factored out into a helper function, which meant that we needed to throw exceptions when encountering SwitchStatement children under other circumstances. I don't see any reason not to just inline this handling into our main transform function.

Differential Revision: D5567179

fbshipit-source-id: 4decd93867abe51874c48a5e38ee34698b12d3b1
hphp/hack/src/hackfmt/hack_format.ml
hphp/hack/test/hackfmt/tests/switch_statement.php [new file with mode: 0644]
hphp/hack/test/hackfmt/tests/switch_statement.php.exp [new file with mode: 0644]