diff options
author | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2002-01-20 07:43:47 +0000 |
---|---|---|
committer | Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> | 2002-01-20 07:43:47 +0000 |
commit | f02797b36c0c3d63b6e3eed7a32421b611a402af (patch) | |
tree | 4ddc6f8d7c2f62b1dea34fc688c13a111b80879a /camlp4/ocaml_src/meta/pa_extend.ml | |
parent | 0b186092542c0472df927e8280188630f99cab7c (diff) |
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4276 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/ocaml_src/meta/pa_extend.ml')
-rw-r--r-- | camlp4/ocaml_src/meta/pa_extend.ml | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/camlp4/ocaml_src/meta/pa_extend.ml b/camlp4/ocaml_src/meta/pa_extend.ml index dabfccb56..f26aa14f7 100644 --- a/camlp4/ocaml_src/meta/pa_extend.ml +++ b/camlp4/ocaml_src/meta/pa_extend.ml @@ -650,6 +650,25 @@ let rec quot_expr e = mklistexp loc al) | _ -> e end + | MLast.ExRec (_, pel, None) -> + begin try + let lel = + List.map + (fun (p, e) -> + let lab = + match p with + MLast.PaLid (_, c) -> MLast.ExStr (loc, c) + | MLast.PaAcc (_, _, MLast.PaLid (_, c)) -> + MLast.ExStr (loc, c) + | _ -> raise Not_found + in + MLast.ExTup (loc, [lab; quot_expr e])) + pel + in + MLast.ExApp (loc, MLast.ExUid (loc, "Record"), mklistexp loc lel) + with + Not_found -> e + end | MLast.ExLid (_, s) -> if s = !(Stdpp.loc_name) then MLast.ExUid (loc, "Loc") else e | MLast.ExStr (_, s) -> @@ -1097,7 +1116,7 @@ let text_of_entry loc gmod gl e = | None -> MLast.ExUid (loc, "None") in let levels = - if !quotify && is_global e gl then + if !quotify && is_global e gl && e.pos = None then let rec loop = function [] -> [] |