jon.recoil.org

Module Source_map.Mappings

type t

Represent the a list of mapping in its encoded form.

The empty mapping.

Test whether the mapping is empty.

val of_string_unsafe : string -> Js_of_ocaml_compiler.Source_map.Mappings.t

of_string_unsafe does not perform any validation of its argument, unlike decode_exn. It is guaranteed that of_string_unsafe and to_string are inverse functions. Time complexity O(1)

Encode the mappings shifted by the returned offset so that the encoded mapping is more compact. This is useful to combining multiple mappings into an Index.t

val number_of_lines : Js_of_ocaml_compiler.Source_map.Mappings.t -> int

Returns the mappings as a string in the Source map v3 format. Time complexity O(1)