|
@@ -1,4 +1,5 @@
|
|
open Ast
|
|
open Ast
|
|
|
|
+open DisplayTypes.DisplayMode
|
|
open Type
|
|
open Type
|
|
open Common
|
|
open Common
|
|
|
|
|
|
@@ -85,6 +86,7 @@ type enum_type =
|
|
| IQuoteStatus
|
|
| IQuoteStatus
|
|
| IImportMode
|
|
| IImportMode
|
|
| IDisplayKind
|
|
| IDisplayKind
|
|
|
|
+ | IDisplayMode
|
|
| IMessage
|
|
| IMessage
|
|
| IFunctionKind
|
|
| IFunctionKind
|
|
| IStringLiteralKind
|
|
| IStringLiteralKind
|
|
@@ -381,6 +383,22 @@ and encode_display_kind dk =
|
|
in
|
|
in
|
|
encode_enum ~pos:None IDisplayKind tag pl
|
|
encode_enum ~pos:None IDisplayKind tag pl
|
|
|
|
|
|
|
|
+and encode_display_mode dm =
|
|
|
|
+ let tag, pl = match dm with
|
|
|
|
+ | DMNone -> 0, []
|
|
|
|
+ | DMDefault -> 1, []
|
|
|
|
+ | DMDefinition -> 2, []
|
|
|
|
+ | DMTypeDefinition -> 3, []
|
|
|
|
+ | DMImplementation -> 4, []
|
|
|
|
+ | DMPackage -> 5, []
|
|
|
|
+ | DMHover -> 6, []
|
|
|
|
+ | DMUsage (withDefinition,findDescendants,findBase) -> 7, [(vbool withDefinition); (vbool findDescendants); (vbool findBase)]
|
|
|
|
+ | DMModuleSymbols None -> 8, []
|
|
|
|
+ | DMModuleSymbols (Some s) -> 9, [(encode_string s)]
|
|
|
|
+ | DMSignature -> 10, []
|
|
|
|
+ in
|
|
|
|
+ encode_enum ~pos:None IDisplayMode tag pl
|
|
|
|
+
|
|
and encode_message (msg,p,_,sev) =
|
|
and encode_message (msg,p,_,sev) =
|
|
let tag, pl = match sev with
|
|
let tag, pl = match sev with
|
|
| Globals.MessageSeverity.Information -> 0, [(encode_string msg); (encode_pos p)]
|
|
| Globals.MessageSeverity.Information -> 0, [(encode_string msg); (encode_pos p)]
|
|
@@ -1952,6 +1970,9 @@ let macro_api ccom get_api =
|
|
else
|
|
else
|
|
encode_obj ["file",encode_string p.Globals.pfile;"pos",vint p.Globals.pmin]
|
|
encode_obj ["file",encode_string p.Globals.pfile;"pos",vint p.Globals.pmin]
|
|
);
|
|
);
|
|
|
|
+ "get_display_mode", vfun0 (fun() ->
|
|
|
|
+ encode_display_mode !Parser.display_mode
|
|
|
|
+ );
|
|
"apply_params", vfun3 (fun tpl tl t ->
|
|
"apply_params", vfun3 (fun tpl tl t ->
|
|
let tl = List.map decode_type (decode_array tl) in
|
|
let tl = List.map decode_type (decode_array tl) in
|
|
let tpl = List.map (fun v ->
|
|
let tpl = List.map (fun v ->
|