@@ -27,7 +27,7 @@ let btwn loc1 loc2 = { source = loc1.source; start = loc1.start; _end = loc2._en
2727(* Returns the position immediately before the start of the given loc. If the
2828 given loc is at the beginning of a line, return the position of the first
2929 char on the same line. *)
30- let char_before loc =
30+ (* let char_before loc =
3131 let start =
3232 let { line; column } = loc.start in
3333 let column =
@@ -39,14 +39,14 @@ let char_before loc =
3939 { line; column }
4040 in
4141 let _end = loc.start in
42- { loc with start; _end }
42+ { loc with start; _end } *)
4343
4444(* Returns the location of the first character in the given loc. Not accurate if the
4545 * first line is a newline character, but is still consistent with loc orderings. *)
46- let first_char loc =
46+ (* let first_char loc =
4747 let start = loc.start in
4848 let _end = { start with column = start.column + 1 } in
49- { loc with _end }
49+ { loc with _end } *)
5050
5151let pos_cmp a b =
5252 let k = a.line - b.line in
@@ -60,7 +60,7 @@ let pos_cmp a b =
6060 * If `b` starts before `a` (even if it ends inside), returns < 0.
6161 * If `b` ends after `a` (even if it starts inside), returns > 0.
6262 *)
63- let span_compare a b =
63+ (* let span_compare a b =
6464 let k = File_key.compare_opt a.source b.source in
6565 if k = 0 then
6666 let k = pos_cmp a.start b.start in
@@ -73,15 +73,15 @@ let span_compare a b =
7373 else
7474 1
7575 else
76- k
76+ k *)
7777
7878(* Returns true if loc1 entirely overlaps loc2 *)
79- let contains loc1 loc2 = span_compare loc1 loc2 = 0
79+ (* let contains loc1 loc2 = span_compare loc1 loc2 = 0 *)
8080
8181(* Returns true if loc1 intersects loc2 at all *)
82- let lines_intersect loc1 loc2 =
82+ (* let lines_intersect loc1 loc2 =
8383 File_key.compare_opt loc1.source loc2.source = 0
84- && not (loc1._end.line < loc2.start.line || loc1.start.line > loc2._end.line)
84+ && not (loc1._end.line < loc2.start.line || loc1.start.line > loc2._end.line) *)
8585
8686let compare loc1 loc2 =
8787 let k = File_key. compare_opt loc1.source loc2.source in
@@ -94,13 +94,13 @@ let compare loc1 loc2 =
9494 else
9595 k
9696
97- let equal loc1 loc2 = compare loc1 loc2 = 0
97+ (* let equal loc1 loc2 = compare loc1 loc2 = 0 *)
9898
9999(* *
100100 * This is mostly useful for debugging purposes.
101101 * Please don't dead-code delete this!
102102 *)
103- let debug_to_string ?(include_source = false ) loc =
103+ (* let debug_to_string ?(include_source = false) loc =
104104 let source =
105105 if include_source then
106106 Printf.sprintf
@@ -119,9 +119,9 @@ let debug_to_string ?(include_source = false) loc =
119119 loc._end.line
120120 loc._end.column
121121 in
122- source ^ pos
122+ source ^ pos *)
123123
124- let to_string_no_source loc =
124+ (* let to_string_no_source loc =
125125 let line = loc.start.line in
126126 let start = loc.start.column + 1 in
127127 let end_ = loc._end.column in
@@ -141,4 +141,4 @@ let make file line col =
141141
142142let start_loc loc = { loc with _end = loc.start }
143143
144- let end_loc loc = { loc with start = loc._end }
144+ let end_loc loc = { loc with start = loc._end } *)
0 commit comments