Delete dead code in full_fidelity_parser_errors.ml
commit08185082e0590d8793fe59abe448edcfffb9485a
authorLucian Wischik <ljw@fb.com>
Fri, 6 Jul 2018 16:21:10 +0000 (6 09:21 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 6 Jul 2018 16:28:10 +0000 (6 09:28 -0700)
treeb65413f45924c0ed7dc83c138f1206b56ec91e5f
parent62816f1c1c0c939cfde9b9a8a74d10c81dbd66d6
Delete dead code in full_fidelity_parser_errors.ml

Summary:
In D8014342 we removed from FFP a bunch of parse error reporting - 2001, 2005, 2047, 2040, 2050, 2061, 2062, 2066.

Given that removal, there are a bunch of other dead functions to also remove:

* param_missing_default_value - called by default_value_params, called by params_errors to produce 2066
* parameter_type_is_required - the only caller used to be "missing_param_type_check" to produce SyntaxError.error2001, but that got deleted in D8014342.
* break_is_legal, continue_is_legal - These used to report SyntaxError.error2005, but that was removed in D8014342
* is_final_declaration,
abstract_final_parent_class,
property_modifier_contains_helper,
abstract_final_parent_class,
abstract_final_with_inst_var, abstract_final_with_method - used in abstract_final_class_nonstatic_var_error to produce 2061, and in abstract_final_class_nonstatic_method_error to produce 2062, but those were removed in D8014342
* extract_visibility_node, has_valid_interface_visibility - both were used in methodish_errors to report 2047, but that was removed in D8014342
* is_left_of_simple_assignment, is_invalid_list_expression - is_left_of_simple_assignment was used by is_invalid_list_expression used in turn by expression_errors to produce syntax error 2040, but that was removed in D8014342
* is_concrete_const - was used by concrete_no_initializer, used in const_decl_errors to produce syntax error 2050, but that was removed in D8014342

Is it correct to remove them? I asked jamesjwu in a messenger chat, "Given where we are now, are all those removals correct, or do we need to revisit them?" He replied:

> I restored a few of them since the SEV, but if any others are still dead code after that, yes they can be removed

Reviewed By: pittsw

Differential Revision: D8720486

fbshipit-source-id: 2fb321a4cef56890f8cf5087d24e64c3fd77459c
hphp/hack/src/parser/full_fidelity_parser_errors.ml