diff options
| author | Alain Frisch <alain@frisch.fr> | 2012-04-18 07:17:58 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2012-04-18 07:17:58 +0000 |
| commit | 061ed556888aed2c84267caca6a6ab832eb2da46 (patch) | |
| tree | dd594255e06294b863e40a382af794adb60682aa /parsing/location.ml | |
| parent | 215e508e8bd53f7299ffd7d828794e2f4d4ba6f4 (diff) | |
| parent | 3930c2fd79e43bd02e3bc79d6b047f3aeab0effe (diff) | |
| download | ocaml-more_unboxing.tar.gz | |
Sync with trunk.more_unboxing
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/more_unboxing@12369 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/location.ml')
| -rw-r--r-- | parsing/location.ml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/parsing/location.ml b/parsing/location.ml index 02b135fae0..561a9060c4 100644 --- a/parsing/location.ml +++ b/parsing/location.ml @@ -223,8 +223,8 @@ let print_filename ppf file = let reset () = num_loc_lines := 0 -let (msg_file, msg_line, msg_chars, msg_to, msg_colon, msg_head) = - ("File \"", "\", line ", ", characters ", "-", ":", "") +let (msg_file, msg_line, msg_chars, msg_to, msg_colon) = + ("File \"", "\", line ", ", characters ", "-", ":") (* return file, line, char from the given position *) let get_pos_info pos = @@ -236,7 +236,7 @@ let print_loc ppf loc = let endchar = loc.loc_end.pos_cnum - loc.loc_start.pos_cnum + startchar in if file = "//toplevel//" then begin if highlight_locations ppf loc none then () else - fprintf ppf "Characters %i-%i:@." + fprintf ppf "Characters %i-%i" loc.loc_start.pos_cnum loc.loc_end.pos_cnum end else begin fprintf ppf "%s%a%s%i" msg_file print_filename file msg_line line; @@ -248,7 +248,8 @@ let print_loc ppf loc = let print ppf loc = if loc.loc_start.pos_fname = "//toplevel//" && highlight_locations ppf loc none then () - else fprintf ppf "%a%s@.%s" print_loc loc msg_colon msg_head + else fprintf ppf "%a%s@." print_loc loc msg_colon +;; let print_error ppf loc = print ppf loc; |
