2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
11 (** For fields and locals, this is the type. For method and function calls, it
12 is the signature, including any inferred types for generics.
13 This is also the only part of the hover info to get displayed as code
14 rather than Markdown. *)
17 (** Additional information, such as doc string and declaration file. Displayed
19 addendum
: string list
;
21 (** Position of this result. *)
25 type result
= hover_info list
27 let string_of_result { snippet
; addendum
; pos
} =
28 Printf.sprintf
"{ snippet = %S; addendum = [%s]; pos = %s }"
30 (String.concat
"; " (List.map
(fun s
-> Printf.sprintf
"%S" s
) addendum
))
33 | Some p
-> Printf.sprintf
"Some %S" (Pos.multiline_string_no_file p
))