Split parser data definitions into separate crate
commit5aacec46fe4faaa9821ca2dda78637042f71cd1d
authorSean Gillespie <swgillespie@fb.com>
Mon, 19 Aug 2019 15:12:52 +0000 (19 08:12 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 19 Aug 2019 15:15:08 +0000 (19 08:15 -0700)
tree82ea4aa267c470b4778183866a0fdab93887ab3d
parent20ecb675f9b8058634a6fc19320e5938f2744cad
Split parser data definitions into separate crate

Summary:
For the sake of build times and component clarity, this commit splits out a number of data definitions out of the `parser_rust` crate into a new crate, named `parser_core_types`.

This crate is intended to be used for data definitions and not parser code. I think the ultimate goal here is to place a lot of the generated code (especially the smart constructors) into this crate so that the parser crate consists of just parser code.

For now, this commit preserves the existing library surface area as `parser_rust` by re-exporting the `parser_core_types` types. This prevents downstream consumers of the parser from having to change their code at this time. A future codemod could go and address this if this is a problem.

Reviewed By: losvald, dabek

Differential Revision: D16796993

fbshipit-source-id: cbd3b55bb48d986fe247814f5a40b6a994cf4415
33 files changed:
hphp/hack/Cargo.lock
hphp/hack/Cargo.toml
hphp/hack/src/facts/facts_smart_constructors_generated.rs
hphp/hack/src/generate_full_fidelity.ml
hphp/hack/src/parser/Cargo.toml
hphp/hack/src/parser/core_types/Cargo.toml [new file with mode: 0644]
hphp/hack/src/parser/coroutine_smart_constructors.rs
hphp/hack/src/parser/coroutine_smart_constructors_generated.rs
hphp/hack/src/parser/decl_mode_smart_constructors.rs
hphp/hack/src/parser/decl_mode_smart_constructors_generated.rs
hphp/hack/src/parser/declaration_parser.rs
hphp/hack/src/parser/expression_parser.rs
hphp/hack/src/parser/lexer.rs
hphp/hack/src/parser/lib.rs
hphp/hack/src/parser/minimal_smart_constructors.rs
hphp/hack/src/parser/mode_parser.rs
hphp/hack/src/parser/operator.rs
hphp/hack/src/parser/parser.rs
hphp/hack/src/parser/parser_core_types_lib.rs [new file with mode: 0644]
hphp/hack/src/parser/parser_trait.rs
hphp/hack/src/parser/positioned_smart_constructors.rs
hphp/hack/src/parser/positioned_syntax.rs
hphp/hack/src/parser/positioned_token.rs
hphp/hack/src/parser/positioned_trivia.rs
hphp/hack/src/parser/smart_constructors.rs
hphp/hack/src/parser/smart_constructors_generated.rs
hphp/hack/src/parser/smart_constructors_wrappers.rs
hphp/hack/src/parser/statement_parser.rs
hphp/hack/src/parser/syntax_smart_constructors.rs
hphp/hack/src/parser/syntax_smart_constructors_generated.rs
hphp/hack/src/parser/type_parser.rs
hphp/hack/src/parser/verify_smart_constructors.rs
hphp/hack/src/parser/verify_smart_constructors_generated.rs