show documentation on hover for enum class and atom/label
commitaa66255e82ee8a21f0fa6e595a2c2bea008ef5d7
authorTom Yang <toyang@fb.com>
Fri, 9 Apr 2021 16:39:56 +0000 (9 09:39 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 9 Apr 2021 16:41:25 +0000 (9 09:41 -0700)
treefa431082bf6d47233f22baa96c74b7359149938c
parentaf79050cf5aab9d928b7ff8597047651b0df1146
show documentation on hover for enum class and atom/label

Summary:
Show the enum class's documentation when hovering over the enum class name and atom/label. E.g.

```
/**
 * My Foo docs
 */
enum class Foo : int {
  int LabelA = 12;
  ...
}

...

some_func#LabelA();
```
Hovering over `Foo` or `LabelA` will give "My Foo docs".

The one-line change builds on top of work done in D27406896 (https://github.com/facebook/hhvm/commit/9082ec5de3e34bdaf9663a0638513a7981e72c8a) and simply lets us find the right node in the FFP (CST) when finding docblocks.

Reviewed By: vsiles

Differential Revision: D27632357

fbshipit-source-id: 5ed5aa9d871d5668bb0e53dd6accdd91978930db
hphp/hack/src/server/serverSymbolDefinition.ml