AAST cleanup: Remove the Any node
commit38a539f5f3bed10607b05bc446b6172cc35bb926
authorWilfred Hughes <wilfred@fb.com>
Fri, 11 Jun 2021 21:46:06 +0000 (11 14:46 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Jun 2021 21:47:12 +0000 (11 14:47 -0700)
treef96a774add826e40e6fe5792b07b5647037b6980
parentdc9ae0e564b169d55113682f767d31d1ffcfe5bf
AAST cleanup: Remove the Any node

Summary:
The `Any` node is used as a placeholder for malformed expressions or expressions that the toolchain does not understand. It's confusing and does not have well-defined semantics.

Remove this node. Where there isn't a valid expression available, use `(() ==> { throw new Exception("invalid expression"); })()` instead.

Reviewed By: shiqicao

Differential Revision: D29051231

fbshipit-source-id: 83a1624543872e7dd97b000223bb01316bd74de8
18 files changed:
hphp/hack/src/annotated_ast/aast.ml
hphp/hack/src/decl/direct_decl_smart_constructors.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_expression.rs
hphp/hack/src/ifc/ifc_utils.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/naming.mli
hphp/hack/src/naming/nast.ml
hphp/hack/src/oxidized/aast_visitor/mod.rs
hphp/hack/src/oxidized/aast_visitor/node_impl_gen.rs
hphp/hack/src/oxidized/aast_visitor/node_mut_impl_gen.rs
hphp/hack/src/oxidized/gen/aast.rs
hphp/hack/src/oxidized/impl_gen/aast_impl_gen.rs
hphp/hack/src/oxidized_by_ref/gen/aast.rs
hphp/hack/src/oxidized_by_ref/nast_visitor/node_impl_gen.rs
hphp/hack/src/server/serverExtractStandalone.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/tast_check/readonly_check.ml
hphp/hack/src/typing/typing.ml