Skip to content

Commit

Permalink
restore compatibility with camlp5 < 6.00
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15881 85f007b7-540e-0410-9357-904b9bb8a0f7
  • Loading branch information
letouzey committed Oct 6, 2012
1 parent d099918 commit 8a068af
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions parsing/compat.ml4
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,20 @@ end

exception Exc_located = Ploc.Exc

IFDEF CAMLP5_6_00 THEN
let ploc_make_loc fname lnb pos bpep = Ploc.make_loc fname lnb pos bpep ""
let ploc_file_name = Ploc.file_name
ELSE
let ploc_make_loc fname lnb pos bpep = Ploc.make lnb pos bpep
let ploc_file_name _ = ""
END

let of_coqloc loc =
let (fname, lnb, pos, bp, ep) = Loc.represent loc in
Ploc.make_loc fname lnb pos (bp, ep) ""
ploc_make_loc fname lnb pos (bp,ep)

let to_coqloc loc =
Loc.create (Ploc.file_name loc) (Ploc.line_nb loc)
Loc.create (ploc_file_name loc) (Ploc.line_nb loc)
(Ploc.bol_pos loc) (Ploc.first_pos loc, Ploc.last_pos loc)

let make_loc = Ploc.make_unlined
Expand Down

0 comments on commit 8a068af

Please sign in to comment.