package melange

  1. Overview
  2. Docs
Toolchain to produce JS from Reason/OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

melange-2.2.0.tbz
sha256=23859d4598ca9e5faac09abd09892d0e6d6afcd727e146ec48978a997a191584
sha512=1ada6f9e81f3fbb388a09752725e0c8b61d2d9b0d1f5c147186870a271766e8353db4115b7b5d3eb2f916ae9a165e2f4480e44b69883c57a3e2420f47e002a19

doc/melange.js_parser/Js_parser/Loc/index.html

Module Js_parser.LocSource

Sourcetype position = {
  1. line : int;
  2. column : int;
}
Sourceval equal_position : position -> position -> bool
Sourcetype t = {
  1. source : File_key.t option;
  2. start : position;
  3. _end : position;
}
Sourceval none : t
Sourceval is_none : t -> bool
Sourceval is_none_ignore_source : t -> bool
Sourceval btwn : t -> t -> t
Sourceval char_before : t -> t
Sourceval first_char : t -> t
Sourceval contains : t -> t -> bool

contains loc1 loc2 returns true if loc1 entirely overlaps loc2

Sourceval intersects : t -> t -> bool

intersects loc1 loc2 returns true if loc1 intersects loc2 at all

Sourceval lines_intersect : t -> t -> bool

lines_intersect loc1 loc2 returns true if loc1 and loc2 cover any part of the same line, even if they don't actually intersect.

For example, if loc1 ends and then loc2 begins later on the same line, intersects loc1 loc2 is false, but lines_intersect loc1 loc2 is true.

Sourceval pos_cmp : position -> position -> int
Sourceval span_compare : t -> t -> int
Sourceval compare_ignore_source : t -> t -> int
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval debug_to_string : ?include_source:bool -> t -> string
Sourceval to_string_no_source : t -> string
Sourceval mk_loc : ?source:File_key.t -> (int * int) -> (int * int) -> t
Sourceval source : t -> File_key.t option
Sourceval cursor : File_key.t option -> int -> int -> t

Produces a zero-width Loc.t, where start = end

Sourceval start_loc : t -> t
Sourceval end_loc : t -> t
OCaml

Innovation. Community. Security.