Migrate `stmt` naming to operate on the aast
commita6707df2bfa53a2f2b19d52568927117dd789a1f
authorThomas Jiang <thomasjiang@fb.com>
Fri, 1 Feb 2019 18:17:41 +0000 (1 10:17 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 1 Feb 2019 18:35:15 +0000 (1 10:35 -0800)
treef838f30a562f3965fb4d429ea9f8288eb6a034e2
parent0d989fc178620e0420578344c7b44d6237b67468
Migrate `stmt` naming to operate on the aast

Summary:
We want to remove the "legacy" AST and unify it with the AAST. To do this, we need to convert the `Naming` module, which currently operates over the legacy AST, to be able to use the AAST.

This diff converts the `stmt` functionality from using the AST to using the AAST.

To do this, we alias hint to use the Ast_to_nast module to convert the Ast.stmt to a Aast.stmt and then use the newly created function to perform naming.

`aast_stmt` was written in D13642183. This diff simply uses `aast_stmt` in place of `stmt` in all places, not just in `expr`.

Reviewed By: arun11111

Differential Revision: D13681620

fbshipit-source-id: 8278066bf415b99f2eb91a0e37d28e4d97b23f01
hphp/hack/src/naming/naming.ml