File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -894,6 +894,17 @@ module Index = struct
894894 | `Assoc fields -> (
895895 let string name json = Option. map ~f: string_of_stringlit (stringlit name json) in
896896 let file = string " file" fields in
897+ (match List. assoc " version" fields with
898+ | `Intlit v ->
899+ if not (Int. equal (int_of_string v) 3 )
900+ then
901+ invalid_arg
902+ (Printf. sprintf
903+ " Source_map.Index.of_json: sourcemap version %s not supported"
904+ v)
905+ | _ -> invalid_arg " Source_map.Index.of_json: non-integer `version` value"
906+ | exception Not_found ->
907+ warn " warning: Missing `version` field in sourcemap" );
897908 match List. assoc " sections" fields with
898909 | `List sections ->
899910 let sections = List. map ~f: section_of_json sections in
You can’t perform that action at this time.
0 commit comments