From b3a50ac0edfb82672cd99511842ac0900585ba47 Mon Sep 17 00:00:00 2001 From: Jacques Garrigue Date: Wed, 6 Oct 2004 13:06:11 +0000 Subject: 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 --- camlp4/camlp4/ast2pt.ml | 5 +++-- camlp4/ocaml_src/camlp4/ast2pt.ml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'camlp4') 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)) -> -- cgit v1.2.1