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 | 0eed9c8cc0e8ec742489c5cbec73088dfdc485e0 (patch) | |
tree | 66856104165898678319a7588679cf1e151fe01d /perl_checker.src/info.ml | |
parent | 355143d4b44031b4aeea1684cba1b31bb30c03ba (diff) | |
download | perl_checker-0eed9c8cc0e8ec742489c5cbec73088dfdc485e0.tar perl_checker-0eed9c8cc0e8ec742489c5cbec73088dfdc485e0.tar.gz perl_checker-0eed9c8cc0e8ec742489c5cbec73088dfdc485e0.tar.bz2 perl_checker-0eed9c8cc0e8ec742489c5cbec73088dfdc485e0.tar.xz perl_checker-0eed9c8cc0e8ec742489c5cbec73088dfdc485e0.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) |