~ubuntu-branches/ubuntu/trusty/sexplib310/trusty

« back to all changes in this revision

Viewing changes to lib/src_pos.mli

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2013-12-03 21:36:45 UTC
  • mfrom: (11.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20131203213645-h1if1c6hxual8p11
Tags: 109.20.00-2
* Team upload
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(** source positions, both relative and absolute *)
 
2
 
 
3
module Relative : sig
 
4
  type t = { row : int; col : int }
 
5
  val sexp_of_t : t -> Type.t
 
6
 
 
7
  val zero : t
 
8
  val add : t -> t -> t
 
9
  val sub : t -> t -> t
 
10
end
 
11
 
 
12
module Absolute : sig
 
13
  type t = { row : int; col : int }
 
14
  val sexp_of_t : t -> Type.t
 
15
 
 
16
  val origin : t (* first row, first column *)
 
17
 
 
18
  val of_lexing : Lexing.position -> t
 
19
 
 
20
  val diff : t -> t -> Relative.t
 
21
 
 
22
  val add : t -> Relative.t -> t
 
23
  val sub : t -> Relative.t -> t
 
24
 
 
25
  (*val compare : t -> t -> int*)
 
26
  val geq     : t -> t -> bool
 
27
end
 
28