Absorb separate NullCoalesce (??) node into Binop node in AST
commit0eb457a6a412ad64bb2ba0787944b3d940785495
authorMarcy Park <marcypark@fb.com>
Thu, 14 Jun 2018 18:29:10 +0000 (14 11:29 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 14 Jun 2018 18:43:48 +0000 (14 11:43 -0700)
treece8839438962447058d760fd6fa737efbb359bd9
parent6889537ed101a98041f0a48ab6ea6c6eebc76e6c
Absorb separate NullCoalesce (??) node into Binop node in AST

Summary: Treat `??` as a `Binop` with `bop` `QuestionQuestion` instead of using a separate `NullCoalesce` constructor. This should set us up to add `??=`.

Reviewed By: oulgen

Differential Revision: D8368430

fbshipit-source-id: e622a972543caf0a95425e9276d4f6b0c0eb6a43
19 files changed:
hphp/hack/src/annotated_ast/aast.ml
hphp/hack/src/annotated_ast/aast_mapper.ml
hphp/hack/src/ast/ast_defs.ml
hphp/hack/src/hhbc/closure_convert.ml
hphp/hack/src/hhbc/emit_expression.ml
hphp/hack/src/hhbc/hhbc_hhas.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/nast_pos_mapper.ml
hphp/hack/src/parser/ast.ml
hphp/hack/src/parser/ast_visitor.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/parser_hack.ml
hphp/hack/src/typing/nastCheck.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_get_locals.ml
hphp/hack/src/typing/typing_mutability.ml
hphp/hack/src/typing/typing_sequencing.ml
hphp/hack/test/tast/null_coalesce.php.exp