Cleaning up and abstracting the (FFP to AST) lowerer
commit8e04ff14133486d9c8d70a65afc68b7b1407dea2
authorPhilip Hölzenspies <drphil@fb.com>
Wed, 14 Feb 2018 20:06:38 +0000 (14 12:06 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Wed, 14 Feb 2018 20:14:44 +0000 (14 12:14 -0800)
tree3aafd8eff75adb9122d6a44727b385137d03114e
parent0ac36edd589fe56756ad8a833847e410a603eba6
Cleaning up and abstracting the (FFP to AST) lowerer

Summary:
The lowerer (to produce an `Ast.program` using the Full Fidelity Parser) has long been due a cleanup and an API spec. This diff does this cleanup and adds an `.mli` file.

For ease of landing, this diff also cherry picks bug fixes and legacy parser parity diffs from previously prepared diffs. The list is as follows:
  * D6801930 Legacy compliance; lambda bodies should be ignored for toplevel lambdas in quickmode
  * D6926949 Empty for(each) bodies should not have `Noop`
  * D6801921 Elide braces on XHP attribute expressions in the FFP lowerer
  * D6801924 Correctly lower qualified names in type hints
  * D6801929 Legacy compliance; include contents of PHP class bodies upto the first `var`
  * D6846499 Do not lower `;` on abstract methods as returning `Id ;`
  * D6801937 Deduplicate work on method parameter type hint lowering
  * D6801934 Correct Unsafe injection for Noop'd function bodies in FFP lowerer
  * D6912086 Pruning moved from quick mode to decl/php mode

Reviewed By: andrewjkennedy

Differential Revision: D6911678

fbshipit-source-id: a07cfe99683bb15469365f16a0e47f23f8a630fd
hphp/hack/src/hhbc/closure_convert.ml
hphp/hack/src/hhbc/emit_class.ml
hphp/hack/src/parser/ast.ml
hphp/hack/src/parser/ast.src.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/full_fidelity_ast.mli [new file with mode: 0644]
hphp/hack/src/parser/full_fidelity_declaration_parser.ml
hphp/hack/src/parser/full_fidelity_statement_parser.ml
hphp/hack/src/parser/parser_hack.ml