changement des locations

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2002-11-14 20:06:59 +00:00
parent 921202e4ac
commit d3de6bd186
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ open Location;;
open Parsetree;;
let fmt_position f l =
fprintf f "%s[%d,%d-%d]" l.pos_fname l.pos_lnum l.pos_cnum l.pos_bol
if l.pos_fname = "" && l.pos_lnum = 1
then fprintf f "%d" l.pos_cnum
else fprintf f "%s[%d,%d+%d]" l.pos_fname l.pos_lnum l.pos_bol
(l.pos_cnum - l.pos_bol)
;;
let fmt_location f loc =