package js_of_ocaml-compiler

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Source_map.MappingsSource

Sourcetype decoded = map list
Sourcetype t

Represent the a list of mapping in its encoded form.

Sourceval empty : t

The empty mapping.

Sourceval of_string_unsafe : string -> t

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

Sourceval decode_exn : t -> decoded

Parse the mappings.

Sourceval encode : decoded -> t

Encode the mappings.

Sourceval encode_with_offset : decoded -> Offset.t * t

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

Sourceval number_of_lines : t -> int
Sourceval first_line : t -> int
Sourceval to_string : t -> string

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

OCaml

Innovation. Community. Security.