Enable gradual migration of FFP errors away from CST
commitc8d2c8c7a76b7a67452cc32e865bded3e0cb39bd
authorLeo Osvald <leoo@fb.com>
Thu, 14 Feb 2019 16:28:01 +0000 (14 08:28 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 14 Feb 2019 16:50:45 +0000 (14 08:50 -0800)
tree80b1be5ca4f2ccfb94120b9a70c2f442149ee7ae
parentc6c99af25fd893fb678f34a22411c5cd2b9fa39c
Enable gradual migration of FFP errors away from CST

Summary:
Now that error reporting in lowering is decoupled from building AST
(by capturing side effects and replaying them via flush_parsing_errors),
reuse the same mechanism for prioritizing syntax errors emitted
from the Full_fidelity_syntax_errors module but also merge them
with errors from a *new* phase of error checking on lowered AST.

This way, existing error checks can be *gradually* moved from CST to AST
or to the parser itself (for those which cannot be detected after lowering).

Reviewed By: oulgen

Differential Revision: D13985463

fbshipit-source-id: 3f28889e6a6a4d8011d8dc24bab167d44f20d5a4
hphp/hack/src/parser/ast_check.ml
hphp/hack/src/parser/dune
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/test/integration_ml/saved_state/test_ide_cache.ml