diff --git a/compiler/tests-sourcemap/dump_sourcemap.ml b/compiler/tests-sourcemap/dump_sourcemap.ml index 0ee2388520..bf6b8ba46f 100644 --- a/compiler/tests-sourcemap/dump_sourcemap.ml +++ b/compiler/tests-sourcemap/dump_sourcemap.ml @@ -72,7 +72,7 @@ let print_mapping lines ~line_offset (sm : Source_map.t) = | _ -> ())) let print_sourcemap lines = function - | `Standard sm -> print_mapping ~offset:0 lines sm + | `Standard sm -> print_mapping ~line_offset:0 lines sm | `Index l -> List.iter l.Source_map.Index.sections diff --git a/tools/sourcemap/jsoo_sourcemap.ml b/tools/sourcemap/jsoo_sourcemap.ml index 571a06384b..51587506af 100644 --- a/tools/sourcemap/jsoo_sourcemap.ml +++ b/tools/sourcemap/jsoo_sourcemap.ml @@ -45,4 +45,7 @@ let () = | _ -> failwith "unable to find sourcemap" in let sm = Js_of_ocaml_compiler.Source_map.of_string content in - print_endline (Js_of_ocaml_compiler.Source_map.to_string sm) + print_endline + (match sm with + | `Standard sm -> Js_of_ocaml_compiler.Source_map.to_string sm + | `Index sm -> Js_of_ocaml_compiler.Source_map.Index.to_string sm)