Add get_{fun,const,type} methods to ShallowDeclProvider
commit223fe06abd1050ebbceceaa79547c8ad69604b03
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Thu, 24 Feb 2022 00:39:08 +0000 (23 16:39 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 24 Feb 2022 00:39:08 +0000 (23 16:39 -0800)
treec4304efcf419a9141ebd2e0c49baa06efbf4dd1a
parent2d3ac5e83553b93921b854f59ae2ff90e2c9559d
Add get_{fun,const,type} methods to ShallowDeclProvider

Summary: Currently, decls of toplevel functions, global constants, and type aliases are inaccessible: they are stored in a ShallowDeclProvider's backing cache, but the ShallowDeclProvider interface doesn't provide a means of reading them (it only provides accessors for class decls). This diff adds APIs for fetching non-class decls.

Reviewed By: shayne-fletcher

Differential Revision: D34406673

fbshipit-source-id: 633a2ab3a29fbd72bb8b08eb0033b68086d1537c
hphp/hack/src/rupro/lib/decl_defs/mod.rs
hphp/hack/src/rupro/lib/shallow_decl_provider/cache.rs
hphp/hack/src/rupro/lib/shallow_decl_provider/mod.rs
hphp/hack/src/rupro/lib/shallow_decl_provider/provider.rs