Module Fang_tiger.Source_span

type t = source_span
type point = int * int

A location in a Tiger source file, defined by row and column indicies.

Both indicies are one-based.

exception Invalid of point * point
val v : point -> point -> t

Define a span bounded by the two points.

Raises Invalid if the pair of points don't form a valid span.

val from_lexing_positions : Stdlib.Lexing.position -> Stdlib.Lexing.position -> t
val compare : t -> t -> int
val compare_point : point -> point -> int
val equal : t -> t -> bool
val pp : t Fmt.t
val origin : t -> point
val terminus : t -> point
val line : point -> int
val column : point -> int
module Map : Stdlib.Map.S with type Map.key = t