From 0eed9c8cc0e8ec742489c5cbec73088dfdc485e0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Nov 2002 23:37:43 +0000 Subject: *** empty log message *** --- perl_checker.src/info.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl_checker.src/info.ml') diff --git a/perl_checker.src/info.ml b/perl_checker.src/info.ml index 3d68439..d15d3c0 100644 --- a/perl_checker.src/info.ml +++ b/perl_checker.src/info.ml @@ -29,4 +29,10 @@ let pos2sfull pos = sprintf "File \"%s\", line %d, character %d-%d\n" file (line + 1) n1 n2 with Not_found -> failwith ("bad position " ^ pos2s pos) +let is_on_same_line file (a,b) = + let line_a, _ = raw_pos2raw_line file a in + let line_b, _ = raw_pos2raw_line file b in + line_a = line_b + +let is_on_same_line_current (a,b) = is_on_same_line !current_file (a,b) let pos2sfull_current a b = pos2sfull (!current_file, a, b) -- cgit v1.2.1