Default case of switch node in AST to keep pos
commit6cd6efad74796bcc08c72dacd147353f1a53071b
authorMartyna Siejba <tysia2512@fb.com>
Fri, 6 Sep 2019 16:23:08 +0000 (6 09:23 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 6 Sep 2019 16:25:23 +0000 (6 09:25 -0700)
tree33e6d40c8ed72248f78b310775bd1f3ba6c5a0d5
parenta8da686f2a358daae7e6cf275181af3e734e1d90
Default case of switch node in AST to keep pos

Summary: The purpose of this diff is to enable raising errors related to the use of default case in switch pointing to the `default` token. It is used and tested in the diff above (D16951057).

Reviewed By: periodic1236

Differential Revision: D16973626

fbshipit-source-id: b7bc2300a93ac67397db945f583c029aba3885f8
15 files changed:
hphp/hack/src/annotated_ast/aast.ml
hphp/hack/src/annotated_ast/ast_to_aast.ml
hphp/hack/src/ast/ast.ml
hphp/hack/src/hhbc/closure_convert.ml
hphp/hack/src/hhbc/emit_statement.ml
hphp/hack/src/hhbc/jump_targets.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/naming/nast.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/pocket_universes/pocket_universes.ml
hphp/hack/src/typing/nastInitCheck.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_gather_defined.ml
hphp/hack/src/typing/typing_get_locals.ml
hphp/hack/src/typing/typing_sequencing.ml