Minor refactoring in autocompleteService.ml
commit1699303ee1831a8fcdc0ca6b3ae8b3d4e507b4cb
authorLucian Wischik <ljw@fb.com>
Fri, 14 Jul 2017 17:04:17 +0000 (14 10:04 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 14 Jul 2017 17:12:13 +0000 (14 10:12 -0700)
tree2f0bde5aecc3684527afb5e0c0bbbc6200ee88cc
parentc5cfb49fc23e349b3bc750015d53159947be764d
Minor refactoring in autocompleteService.ml

Summary:
The function "get_results" was pretty big. I've factored out an independent method to turn partial_autocomplete_results into complete_autocomplete_results results.

I also added a few type annotations along the way, and renamed "autocomplete_result" into "partial_autocomplete_result" to better indicate that it needs work.

This is all in pursuit of my larger goal - to be able to have namespaces in the autocomplete results. (They won't be partial since they have no type information).

Reviewed By: dabek

Differential Revision: D5345988

fbshipit-source-id: 7a6e9a6fde32f09c58379d9b7cfeff98ea40f5dc
hphp/hack/src/server/autocompleteService.ml