fix location bug PR#6170

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14116 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Hongbo Zhang 2013-09-12 14:18:01 +00:00
parent 2b9f8f34ea
commit 3501cb4d96
1 changed files with 4 additions and 4 deletions

View File

@ -694,10 +694,10 @@ value varify_constructors var_names =
| ExAcc loc _ _ | <:expr@loc< $id:<:ident< $_$ . $_$ >>$ >> as e -> | ExAcc loc _ _ | <:expr@loc< $id:<:ident< $_$ . $_$ >>$ >> as e ->
let (e, l) = let (e, l) =
match sep_expr_acc [] e with match sep_expr_acc [] e with
[ [(loc, ml, <:expr@sloc< $uid:s$ >>) :: l] -> [ [(loc, ml, <:expr< $uid:s$ >>) :: l] ->
(mkexp loc (Pexp_construct (mkli sloc (conv_con s) ml) None), l) (mkexp loc (Pexp_construct (mkli loc (conv_con s) ml) None), l)
| [(loc, ml, <:expr@sloc< $lid:s$ >>) :: l] -> | [(loc, ml, <:expr< $lid:s$ >>) :: l] ->
(mkexp loc (Pexp_ident (mkli sloc s ml)), l) (mkexp loc (Pexp_ident (mkli loc s ml)), l)
| [(_, [], e) :: l] -> (expr e, l) | [(_, [], e) :: l] -> (expr e, l)
| _ -> error loc "bad ast in expression" ] | _ -> error loc "bad ast in expression" ]
in in