Skip to content

Commit

Permalink
[parser] fix patterned catch
Browse files Browse the repository at this point in the history
Reviewed By: gabelevi

Differential Revision: D5725431

fbshipit-source-id: 8ed21e7322b1f3153fe0fba6762b8fa9c76c5525
  • Loading branch information
mroch authored and facebook-github-bot committed Aug 29, 2017
1 parent 1e4f3e5 commit d2b8633
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 396 deletions.
7 changes: 1 addition & 6 deletions src/parser/statement_parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,7 @@ module Statement
let catch = with_loc (fun env ->
Expect.token env T_CATCH;
Expect.token env T_LPAREN;
let id = Parse.identifier ~restricted_error:Error.StrictCatchVariable env in
let param = fst id, Pattern.Identifier { Pattern.Identifier.
name = id;
typeAnnotation = None;
optional = false;
} in
let param = Parse.pattern env Error.StrictCatchVariable in
Expect.token env T_RPAREN;
let body = Parse.block_body env in
{ Ast.Statement.Try.CatchClause.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d2b8633

Please sign in to comment.