File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,27 @@ let parse s =
3030 so as not to crash the toplevel (see Genprintval) *)
3131 | Some v -> v
3232
33+ let rec to_504_plus lid =
34+ let loc = Location. none in
35+ match lid with
36+ | Lident s -> Longident_504. Lident s
37+ | Ldot (lid , s ) ->
38+ Longident_504. Ldot ({txt = to_504_plus lid; loc}, { txt = s; loc})
39+ | Lapply (lid , lid2 ) ->
40+ Longident_504. Lapply
41+ ({txt = to_504_plus lid; loc}, {txt= to_504_plus lid2; loc})
42+
43+ let rec from_504_plus lid =
44+ match lid with
45+ | Longident_504. Lident s -> Lident s
46+ | Longident_504. Ldot (lid , s ) -> Ldot (from_504_plus lid.txt, s.txt)
47+ | Longident_504. Lapply (lid , lid2 ) ->
48+ Lapply (from_504_plus lid.txt, from_504_plus lid2.txt)
49+
3350let to_compiler lid =
3451 (* IF_NOT_AT_LEAST 504 lid *)
35- (* IF_AT_LEAST 504 Migrate_503_504.copy_Longident_t lid *)
52+ (* IF_AT_LEAST 504 to_504_plus lid *)
3653
3754let from_compiler lid =
3855 (* IF_NOT_AT_LEAST 504 lid *)
39- (* IF_AT_LEAST 504 Migrate_504_503.copy_Longident_t lid *)
56+ (* IF_AT_LEAST 504 from_504_plus lid *)
You can’t perform that action at this time.
0 commit comments