diff options
| author | Pascal Rigaux <pixel@mandriva.com> | 2002-11-14 23:37:43 +0000 |
|---|---|---|
| committer | Pascal Rigaux <pixel@mandriva.com> | 2002-11-14 23:37:43 +0000 |
| commit | ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d (patch) | |
| tree | c9b9b60b17f0289cf25fc56dde510bca4506c77f /perl_checker.src/info.ml | |
| parent | d22a970196e532292d20dbaa5dc25ed5c35f6bc1 (diff) | |
| download | perl-MDK-Common-ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d.tar perl-MDK-Common-ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d.tar.gz perl-MDK-Common-ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d.tar.bz2 perl-MDK-Common-ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d.tar.xz perl-MDK-Common-ba69827bc5850d8e2ffa3c83bd1cfc5b95eb8c5d.zip | |
*** empty log message ***
Diffstat (limited to 'perl_checker.src/info.ml')
| -rw-r--r-- | perl_checker.src/info.ml | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
