File tree Expand file tree Collapse file tree 7 files changed +220
-182
lines changed Expand file tree Collapse file tree 7 files changed +220
-182
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ let options =
314314 ; sources = []
315315 ; sources_content = (if sourcemap_don't_inline_content then None else Some [] )
316316 ; names = []
317- ; mappings = []
317+ ; mappings = Source_map.Mappings. empty
318318 } )
319319 else None
320320 in
@@ -543,7 +543,7 @@ let options_runtime_only =
543543 ; sources = []
544544 ; sources_content = (if sourcemap_don't_inline_content then None else Some [] )
545545 ; names = []
546- ; mappings = []
546+ ; mappings = Source_map.Mappings. empty
547547 } )
548548 else None
549549 in
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ let options =
108108 ; sources = []
109109 ; sources_content = Some []
110110 ; names = []
111- ; mappings = []
111+ ; mappings = Source_map.Mappings. empty
112112 } )
113113 else None
114114 in
Original file line number Diff line number Diff line change @@ -1996,8 +1996,9 @@ let program ?(accept_unnamed_var = false) f ?source_map p =
19961996 | None -> filename
19971997 | Some _ -> Filename. concat " /builtin" filename)
19981998 in
1999+ let sm_mappings = Source_map.Mappings. decode sm.mappings in
19992000 let mappings =
2000- List. rev_append_map ! temp_mappings sm.mappings ~f: (fun (pos , m ) ->
2001+ List. rev_append_map ! temp_mappings sm_mappings ~f: (fun (pos , m ) ->
20012002 let gen_line = pos.PP. p_line + 1 in
20022003 let gen_col = pos.PP. p_col in
20032004 match m with
@@ -2012,6 +2013,7 @@ let program ?(accept_unnamed_var = false) f ?source_map p =
20122013 Source_map. Gen_Ori_Name
20132014 { gen_line; gen_col; ori_source; ori_line; ori_col; ori_name })
20142015 in
2016+ let mappings = Source_map.Mappings. encode mappings in
20152017 Some { sm with Source_map. sources; names; sources_content; mappings }
20162018 in
20172019 PP. check f;
You can’t perform that action at this time.
0 commit comments