1818
1919open StdLabels
2020open Migrate_parsetree
21- open OCaml_407 .Ast
21+ open OCaml_408 .Ast
2222open Ast_helper
2323open Asttypes
2424open Parsetree
@@ -44,10 +44,6 @@ let tuple ?loc ?attrs = function
4444
4545let str ?loc ?attrs s = Exp. constant ?loc ?attrs (Pconst_string (s, None ))
4646
47- module Pervasives = struct
48- let ( ! ) = ( ! )
49- end
50-
5147(* * Check if an expression is an identifier and returns it.
5248 Raise a Location.error if it's not.
5349*)
@@ -87,7 +83,10 @@ let inside_Js =
8783 It turns out not to be working properly, just hiding location instead of the all
8884 ast node.
8985*)
90- let merlin_noloc = {txt = " merlin.loc" ; loc = Location. none}, PStr []
86+ let merlin_noloc =
87+ { attr_name = {txt = " merlin.loc" ; loc = Location. none}
88+ ; attr_payload = PStr []
89+ ; attr_loc = Location. none }
9190
9291module Js : sig
9392 val type_ :
@@ -501,7 +500,10 @@ let preprocess_literal_object mappper fields : [`Fields of field_desc list | `Er
501500 | false , _ -> None
502501 | true , _ -> Some (`Unkown x)
503502 in
504- let jsoo_attributes = filter_map (fun ({txt; _} , _ ) -> parse_attribute txt) in
503+ let jsoo_attributes =
504+ filter_map (fun {attr_name = {txt; _} ; attr_payload = _ ; attr_loc = _ } ->
505+ parse_attribute txt)
506+ in
505507 let f (names , fields ) exp =
506508 match exp.pcf_desc with
507509 | Pcf_val (id , mut , Cfk_concrete (bang , body )) ->
@@ -754,5 +756,5 @@ let mapper =
754756let () =
755757 Driver. register
756758 ~name: " ppx_js"
757- Migrate_parsetree.Versions. ocaml_407
759+ Migrate_parsetree.Versions. ocaml_408
758760 (fun _config _cookies -> mapper)
0 commit comments