package merlin-lib

  1. Overview
  2. Docs
Merlin's libraries

Install

dune-project
 Dependency

Authors

Maintainers

Sources

merlin-5.7.1-504.tbz
sha256=139b073cf914b38b725c54f75b8b642f654c3498d0a4ba8cfa831ff02a8970d5
sha512=9391d3a0aaa5065a02c6f5faaf7149f8f800c748d9be5ccff6af800ce73bdf418ead72dbeaf6ee7a6cbeae2c8e56285fbe422740ed407bcc4edab889dd1c8f9c

doc/merlin-lib.kernel/Merlin_kernel/Msource/index.html

Module Merlin_kernel.MsourceSource

Sourcetype t

Merlin representation of a textual source code

It bundles filename and a content, and offers functions for computing positions in the source.

Sourcemodule Digest : sig ... end

Minimal Digest utilities around t

Sourceval make : string -> t

Making a content from name and contents.

Position management

Sourcetype position = [
  1. | `Start
  2. | `Offset of int
  3. | `Logical of int * int
  4. | `End
]
Sourceval equal_position : position -> position -> bool
Sourceval get_offset : t -> [< position ] -> [> `Offset of int ]
Sourceval get_logical : t -> [< position ] -> [> `Logical of int * int ]
Sourceval compare_position : t -> position -> position -> int
Sourceval get_lexing_pos : t -> filename:string -> [< position ] -> Lexing.position

Managing content

Sourceval substitute : t -> [< position ] -> [< position | `Length of int ] -> string -> t

Updating content

Sourceval text : t -> string

Source code of the file

Sourceval print_position : unit -> [< position ] -> string