File tree Expand file tree Collapse file tree 7 files changed +38
-8
lines changed
ocamlmerlin_mlx/ocaml/preprocess Expand file tree Collapse file tree 7 files changed +38
-8
lines changed Original file line number Diff line number Diff line change 1919 - " 4.14"
2020 - " 5.1"
2121 - " 5.2"
22- - " ocaml-base-compiler.5.3.0~beta2"
22+ - " 5.3"
23+ - " 5.4"
2324
2425 runs-on : ${{ matrix.os }}
2526
Original file line number Diff line number Diff line change 11.PHONY : init
22init :
3- opam switch create . 5.3 .0 --no-install -y
3+ opam switch create . 5.4 .0 --no-install -y
44 opam install . --deps-only -y
55 opam install menhir.20201216 ocamlformat ocaml-lsp-server -y
66
Original file line number Diff line number Diff line change 22 (name pp)
33 (package mlx)
44 (public_name mlx-pp)
5+ (modules :standard \ mlx_shim)
56 (flags
6- (:standard -w -9-67 -open Astlib.Ast_501))
7+ (:standard -w -9-67 -open Astlib -open Astlib.Ast_501 -open Mlx_shim))
8+ (libraries ppxlib ocaml-compiler-libs.shadow mlx_shim))
9+
10+ (library
11+ (name mlx_shim)
12+ (package mlx)
13+ (modules mlx_shim)
14+ (flags
15+ (:standard -w -9-67 -open Astlib -open Astlib.Ast_501))
716 (libraries ppxlib ocaml-compiler-libs.shadow))
817
918(ocamllex lexer)
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ let make_loc (startpos, endpos) =
1111 Location. loc_ghost = false ;
1212 }
1313
14- let mkloc txt loc = { Location. txt; loc }
1514let mkexp ~loc d = Exp. mk ~loc: (make_loc loc) d
1615
1716let mkjsxexp ~loc :loc' e =
@@ -63,7 +62,7 @@ let make_jsx_element ~raise ~loc:_ ~tag ~end_tag ~props ~children () =
6362 in
6463 let props =
6564 let prop_exp ~loc name =
66- let id = mkloc (Lident name) (make_loc loc) in
65+ let id = Location. mkloc (Lident name) (make_loc loc) in
6766 mkexp ~loc (Pexp_ident id)
6867 in
6968 List. map
Original file line number Diff line number Diff line change 1+ module Pprintast = struct
2+ include Pprintast
3+
4+ let tyvar = Compiler_pprintast. tyvar
5+ end
6+
7+ module Location = struct
8+ include Location
9+
10+ let mkloc txt loc = { Location. txt; loc }
11+ let mknoloc txt = { Location. txt; loc = Location. none }
12+ end
13+
14+ module Longident = struct
15+ include Longident
16+
17+ let last = function
18+ | Lident s -> s
19+ | Ldot (_ , s ) -> s
20+ | Lapply (_ , _ ) -> Misc. fatal_error " Longident.last"
21+ end
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ let () =
2929 match str with
3030 | Ok str ->
3131 let str = Conv. copy_structure str in
32- if ! print_ml then Format. printf " %a@." Pprintast. structure str
32+ if ! print_ml then
33+ Format. printf " %a@." Compiler_pprintast. structure str
3334 else
3435 let oc = stdout in
3536 output_string oc
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ let make_loc (startpos, endpos) =
1212 Location. loc_ghost = false ;
1313 }
1414
15- let mkloc txt loc = { Location. txt; loc }
1615let mkexp ~loc d = Exp. mk ~loc: (make_loc loc) d
1716
1817let mkjsxexp ~loc :loc' e =
@@ -64,7 +63,7 @@ let make_jsx_element ~raise ~loc:_ ~tag ~end_tag ~props ~children () =
6463 in
6564 let props =
6665 let prop_exp ~loc name =
67- let id = mkloc (Lident name) (make_loc loc) in
66+ let id = Location. mkloc (Lident name) (make_loc loc) in
6867 mkexp ~loc (Pexp_ident id)
6968 in
7069 List. map
You can’t perform that action at this time.
0 commit comments