1
1
(* * Code transformations using the parser/printer and ast operations *)
2
2
3
- let isBracedExpr = Res_parsetree_viewer. is_braced_expr
3
+ let isBracedExpr = Res_parsetree_viewer. isBracedExpr
4
4
5
5
let extractTypeFromExpr expr ~debug ~path ~currentFile ~full ~pos =
6
6
match
@@ -447,7 +447,7 @@ module ExpandCatchAllForVariants = struct
447
447
let newText =
448
448
missingConstructors
449
449
|> List. map (fun (c : SharedTypes.polyVariantConstructor ) ->
450
- Res_printer. polyvar_ident_to_string c.name
450
+ Res_printer. polyVarIdentToString c.name
451
451
^
452
452
match c.args with
453
453
| [] -> " "
@@ -504,7 +504,7 @@ module ExpandCatchAllForVariants = struct
504
504
(fun (c : SharedTypes.polyVariantConstructor ) ->
505
505
if currentConstructorNames |> List. mem c.name = false then
506
506
Some
507
- ( Res_printer. polyvar_ident_to_string c.name,
507
+ ( Res_printer. polyVarIdentToString c.name,
508
508
match c.args with
509
509
| [] -> false
510
510
| _ -> true )
841
841
842
842
let parseImplementation ~filename =
843
843
let {Res_driver. parsetree = structure; comments} =
844
- Res_driver. parsing_engine.parse_implementation ~for_printer :false ~filename
844
+ Res_driver. parsingEngine.parseImplementation ~for Printer :false ~filename
845
845
in
846
846
let filterComments ~loc comments =
847
847
(* Relevant comments in the range of the expression *)
@@ -853,28 +853,28 @@ let parseImplementation ~filename =
853
853
let printExpr ~(range : Protocol.range ) (expr : Parsetree.expression ) =
854
854
let structure = [Ast_helper.Str. eval ~loc: expr.pexp_loc expr] in
855
855
structure
856
- |> Res_printer. print_implementation ~width: ! Res_cli.ResClflags. width
856
+ |> Res_printer. printImplementation ~width: 80
857
857
~comments: (comments |> filterComments ~loc: expr.pexp_loc)
858
858
|> Utils. indent range.start.character
859
859
in
860
860
let printStructureItem ~(range : Protocol.range )
861
861
(item : Parsetree.structure_item ) =
862
862
let structure = [item] in
863
863
structure
864
- |> Res_printer. print_implementation ~width: ! Res_cli.ResClflags. width
864
+ |> Res_printer. printImplementation ~width: 80
865
865
~comments: (comments |> filterComments ~loc: item.pstr_loc)
866
866
|> Utils. indent range.start.character
867
867
in
868
868
let printStandaloneStructure ~(loc : Location.t ) structure =
869
869
structure
870
- |> Res_printer. print_implementation ~width: ! Res_cli.ResClflags. width
870
+ |> Res_printer. printImplementation ~width: 80
871
871
~comments: (comments |> filterComments ~loc )
872
872
in
873
873
(structure, printExpr, printStructureItem, printStandaloneStructure)
874
874
875
875
let parseInterface ~filename =
876
876
let {Res_driver. parsetree = structure; comments} =
877
- Res_driver. parsing_engine.parse_interface ~for_printer :false ~filename
877
+ Res_driver. parsingEngine.parseInterface ~for Printer :false ~filename
878
878
in
879
879
let filterComments ~loc comments =
880
880
(* Relevant comments in the range of the expression *)
@@ -887,7 +887,7 @@ let parseInterface ~filename =
887
887
(item : Parsetree.signature_item ) =
888
888
let signature_item = [item] in
889
889
signature_item
890
- |> Res_printer. print_interface ~width: ! Res_cli.ResClflags. width
890
+ |> Res_printer. printInterface ~width: 80
891
891
~comments: (comments |> filterComments ~loc: item.psig_loc)
892
892
|> Utils. indent range.start.character
893
893
in
0 commit comments