diff options
author | Michel Mauny <Michel.Mauny@ensta.fr> | 2004-05-12 15:22:48 +0000 |
---|---|---|
committer | Michel Mauny <Michel.Mauny@ensta.fr> | 2004-05-12 15:22:48 +0000 |
commit | 77b491c3bc3a6513dda841da9f92db454b9267ce (patch) | |
tree | 7eadc7a93a675c8a2be0ab4b8e35a2717a4d00b6 /camlp4/meta/pa_r.ml | |
parent | c9840b7dd728b2fbaab8fb7b86f55b0638edd307 (diff) |
Introduction of OCaml "new" locations
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6290 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/meta/pa_r.ml')
-rw-r--r-- | camlp4/meta/pa_r.ml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/camlp4/meta/pa_r.ml b/camlp4/meta/pa_r.ml index dd6b499ac..8c6be50ad 100644 --- a/camlp4/meta/pa_r.ml +++ b/camlp4/meta/pa_r.ml @@ -901,10 +901,11 @@ EXTEND let x = try let i = String.index x ':' in - (int_of_string (String.sub x 0 i), + ({ (Lexing.dummy_pos) with Lexing.pos_cnum = int_of_string (String.sub x 0 i) } + , String.sub x (i + 1) (String.length x - i - 1)) with - [ Not_found | Failure _ -> (0, x) ] + [ Not_found | Failure _ -> ({(Lexing.dummy_pos) with Lexing.pos_cnum = 0}, x) ] in Pcaml.handle_expr_locate loc x | x = QUOTATION -> @@ -923,10 +924,11 @@ EXTEND let x = try let i = String.index x ':' in - (int_of_string (String.sub x 0 i), + ({(Lexing.dummy_pos) with Lexing.pos_cnum = int_of_string (String.sub x 0 i)} + , String.sub x (i + 1) (String.length x - i - 1)) with - [ Not_found | Failure _ -> (0, x) ] + [ Not_found | Failure _ -> ({(Lexing.dummy_pos) with Lexing.pos_cnum = 0}, x) ] in Pcaml.handle_patt_locate loc x | x = QUOTATION -> |