Split various parser flavors to separate crates
commit5f3c635ca0c46f95d215fded3609b31691635182
authorKasper Kopec <kasper@fb.com>
Thu, 19 Sep 2019 19:53:39 +0000 (19 12:53 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 19 Sep 2019 19:55:51 +0000 (19 12:55 -0700)
tree49866391cb69464d9edafe10589973c6d147e249
parentaf1b8c448f5186b2ddf30bcb2f3072cf5486835d
Split various parser flavors to separate crates

Summary:
I think the easiest way to read this diff is to look at changes to `hphp/hack/src/parser/TARGETS`. The rest is just moving things around so that things will compile:

- various `ToOcaml` implementations are moved to the new crates now containing what they implement the trait for
- `make_syntax_tree` is moves from parser to syntax_tree, to avoid all the other parsers depending on minimal parser
- `rust_parser_ffi` is split off from `rust_to_ocaml`
- since so many things already change, I use this opportunity to change the style of imports to not repeat the path parts

Reviewed By: shiqicao

Differential Revision: D17404555

fbshipit-source-id: a83c8d0ec64cc44f1c7562684fd5c577eceab54b
53 files changed:
hphp/hack/Cargo.lock
hphp/hack/src/facts/Cargo.toml
hphp/hack/src/facts/facts_parser.rs
hphp/hack/src/facts/facts_smart_constructors.rs
hphp/hack/src/facts/facts_smart_constructors_generated.rs
hphp/hack/src/generate_full_fidelity.ml
hphp/hack/src/parser/coroutine_parser_leak_tree.rs [new file with mode: 0644]
hphp/hack/src/parser/coroutine_parser_leak_tree/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/coroutine_smart_constructors.rs
hphp/hack/src/parser/coroutine_smart_constructors/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/coroutine_smart_constructors_generated.rs
hphp/hack/src/parser/decl_mode_parser.rs [new file with mode: 0644]
hphp/hack/src/parser/decl_mode_parser/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/decl_mode_smart_constructors.rs
hphp/hack/src/parser/decl_mode_smart_constructors_generated.rs
hphp/hack/src/parser/editable_positioned_syntax_to_ocaml.rs
hphp/hack/src/parser/errors/Cargo.toml
hphp/hack/src/parser/errors/ffi/Cargo.toml
hphp/hack/src/parser/ffi/Cargo.toml
hphp/hack/src/parser/flatten_smart_constructors.rs
hphp/hack/src/parser/flatten_smart_constructors/Cargo.toml [copied from hphp/hack/src/parser/errors/Cargo.toml with 57% similarity]
hphp/hack/src/parser/lib.rs
hphp/hack/src/parser/lowerer_ffi.rs
hphp/hack/src/parser/minimal_parser.rs
hphp/hack/src/parser/minimal_parser/Cargo.toml [copied from hphp/hack/src/parser/errors/Cargo.toml with 52% similarity]
hphp/hack/src/parser/minimal_smart_constructors.rs
hphp/hack/src/parser/mode_parser.rs
hphp/hack/src/parser/ocaml_coroutine_state.rs
hphp/hack/src/parser/ocaml_syntax.rs
hphp/hack/src/parser/ocaml_syntax_generated.rs
hphp/hack/src/parser/parser.rs
hphp/hack/src/parser/parser_core_types_lib.rs
hphp/hack/src/parser/positioned_coroutine_parser.rs [new file with mode: 0644]
hphp/hack/src/parser/positioned_coroutine_parser/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/positioned_parser.rs [new file with mode: 0644]
hphp/hack/src/parser/positioned_parser/Cargo.toml [copied from hphp/hack/src/parser/errors/Cargo.toml with 51% similarity]
hphp/hack/src/parser/positioned_smart_constructors.rs
hphp/hack/src/parser/ppl/rust_ppl_class_rewriter_ffi.rs
hphp/hack/src/parser/rust_parser_errors.rs
hphp/hack/src/parser/rust_parser_errors_ffi.rs
hphp/hack/src/parser/rust_parser_ffi.rs
hphp/hack/src/parser/rust_to_ocaml.rs
hphp/hack/src/parser/rust_to_ocaml/Cargo.toml [copied from hphp/hack/src/parser/ffi/Cargo.toml with 61% similarity]
hphp/hack/src/parser/syntax_smart_constructors.rs
hphp/hack/src/parser/syntax_smart_constructors/Cargo.toml [copied from hphp/hack/src/parser/errors/Cargo.toml with 57% similarity]
hphp/hack/src/parser/syntax_smart_constructors_generated.rs
hphp/hack/src/parser/syntax_tree.rs
hphp/hack/src/parser/syntax_tree/Cargo.toml [copied from hphp/hack/src/parser/errors/Cargo.toml with 65% similarity]
hphp/hack/src/parser/verify_parser.rs [new file with mode: 0644]
hphp/hack/src/parser/verify_parser/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/verify_smart_constructors.rs
hphp/hack/src/parser/verify_smart_constructors_generated.rs
hphp/hack/test/rust/rewriter_test.rs