Pull rust_parser_ffi parse function out of macro
commit639d5287431e05c0c94292d4066eb7150842f210
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Fri, 25 Oct 2019 16:06:52 +0000 (25 09:06 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 25 Oct 2019 16:09:42 +0000 (25 09:09 -0700)
treeb5a44e68ff7a8ec74060bc6a6ff9d2ade87c9b68
parentccc7b27be16b98ee24f715d0e8d09579cb5dec53
Pull rust_parser_ffi parse function out of macro

Summary:
Having lots of logic in a macro context is inconvenient. We don't get formatting, linting, or proper IDE services within `macro_rules!`. Since this function is particularly long, it would be nice to get it out of the `parse!` macro.

To do this, I think it needs to be generic over the smart-constructors and smart-constructors-state types, so I exposed those types from each parser module.

Reviewed By: losvald

Differential Revision: D18052360

fbshipit-source-id: 61979907ae1a0f5a163c5056310f9574eddd4e93
14 files changed:
hphp/hack/src/parser/coroutine_parser_leak_tree.rs
hphp/hack/src/parser/coroutine_parser_leak_tree_ffi.rs
hphp/hack/src/parser/decl_mode_parser.rs
hphp/hack/src/parser/decl_mode_parser_ffi.rs
hphp/hack/src/parser/minimal_parser.rs
hphp/hack/src/parser/minimal_parser_ffi.rs
hphp/hack/src/parser/parser.rs
hphp/hack/src/parser/positioned_coroutine_parser.rs
hphp/hack/src/parser/positioned_coroutine_parser_ffi.rs [copied from hphp/hack/src/parser/verify_parser_ffi.rs with 55% similarity]
hphp/hack/src/parser/positioned_parser.rs
hphp/hack/src/parser/positioned_parser_ffi.rs
hphp/hack/src/parser/rust_parser_ffi.rs
hphp/hack/src/parser/verify_parser.rs
hphp/hack/src/parser/verify_parser_ffi.rs