fix try/catch/finally parsing
commit688b7bfecfdea4713efbc4d24ece7cc4bf70c3cd
authorNick Gavalas <njg@fb.com>
Mon, 21 Nov 2016 22:09:58 +0000 (21 14:09 -0800)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Mon, 21 Nov 2016 22:28:36 +0000 (21 14:28 -0800)
treea2b9e03ba8d39288ae2cb983c13b49a6fa07b545
parent964614f0a5e0f944b656c4a9c8ee413290dd0807
fix try/catch/finally parsing

Summary: It is a parse error in HHVM and in the Hack spec (https://github.com/hhvm/hack-langspec/blob/master/spec/11-statements.md#the-try-statement) to not have a catch or finally after a try, but the Hack parser doesn't give an error, so you only get an error when you go to run the code.

Reviewed By: ericlippert

Differential Revision: D4207674

fbshipit-source-id: 42a6dad9aa2a0fdaea777dd01b9460dbd252a3be
hphp/hack/src/parsing/parser_hack.ml
hphp/hack/test/h2tp/convert_hack_test_inputs_base.py
hphp/hack/test/typecheck/try_catch_bad3.php [new file with mode: 0644]
hphp/hack/test/typecheck/try_catch_bad3.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/try_catch_bad3.php.no_format [new file with mode: 0644]