summaryrefslogtreecommitdiff
path: root/camlp4
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2004-10-06 13:06:11 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2004-10-06 13:06:11 +0000
commitb3a50ac0edfb82672cd99511842ac0900585ba47 (patch)
treec55fc3f2f718c72132c57dc4255ecca37f956f87 /camlp4
parent6034f512576545580de7a659a10d8f1e6299787e (diff)
downloadocaml-b3a50ac0edfb82672cd99511842ac0900585ba47.tar.gz
add location info in Ptype_variant and Ptype_record
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6633 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4')
-rw-r--r--camlp4/camlp4/ast2pt.ml5
-rw-r--r--camlp4/ocaml_src/camlp4/ast2pt.ml4
2 files changed, 5 insertions, 4 deletions
diff --git a/camlp4/camlp4/ast2pt.ml b/camlp4/camlp4/ast2pt.ml
index 44ad62f4c2..4e16961d41 100644
--- a/camlp4/camlp4/ast2pt.ml
+++ b/camlp4/camlp4/ast2pt.ml
@@ -243,8 +243,9 @@ value mktype loc tl cl tk tm =
;
value mkmutable m = if m then Mutable else Immutable;
value mkprivate m = if m then Private else Public;
-value mktrecord (_, n, m, t) = (n, mkmutable m, ctyp (mkpolytype t));
-value mkvariant (_, c, tl) = (c, List.map ctyp tl);
+value mktrecord (loc, n, m, t) =
+ (n, mkmutable m, ctyp (mkpolytype t), mkloc loc);
+value mkvariant (loc, c, tl) = (c, List.map ctyp tl, mkloc loc);
value type_decl tl cl =
fun
[ TyMan loc t (TyRec _ pflag ltl) ->
diff --git a/camlp4/ocaml_src/camlp4/ast2pt.ml b/camlp4/ocaml_src/camlp4/ast2pt.ml
index 786075527c..b3c9f6477c 100644
--- a/camlp4/ocaml_src/camlp4/ast2pt.ml
+++ b/camlp4/ocaml_src/camlp4/ast2pt.ml
@@ -226,8 +226,8 @@ let mktype loc tl cl tk tm =
;;
let mkmutable m = if m then Mutable else Immutable;;
let mkprivate m = if m then Private else Public;;
-let mktrecord (_, n, m, t) = n, mkmutable m, ctyp (mkpolytype t);;
-let mkvariant (_, c, tl) = c, List.map ctyp tl;;
+let mktrecord (loc, n, m, t) = n, mkmutable m, ctyp (mkpolytype t), mkloc loc;;
+let mkvariant (loc, c, tl) = c, List.map ctyp tl, mkloc loc;;
let type_decl tl cl =
function
TyMan (loc, t, TyRec (_, pflag, ltl)) ->