From 74419b58adfb162bc104dbca112036c125ae9190 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 24 Nov 2000 20:03:00 +0000 Subject: Ajout d'un .:/opt/kde/bin:/home/herbelin/bin:/bin:/sbin:/usr/bin:/usr/etc:/usr/sbin:/usr/local/bin:/usr/X11/bin:/usr/games: comme macro des quotations d'ast git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@950 85f007b7-540e-0410-9357-904b9bb8a0f7 --- parsing/q_coqast.ml4 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/parsing/q_coqast.ml4 b/parsing/q_coqast.ml4 index 9272132802..256b48d6cb 100644 --- a/parsing/q_coqast.ml4 +++ b/parsing/q_coqast.ml4 @@ -33,6 +33,15 @@ let rec expr_of_ast = function | Coqast.Id loc id when is_meta id -> anti loc id | Coqast.Node _ "$VAR" [Coqast.Nvar loc x] -> <:expr< Coqast.Nvar loc $anti loc x$ >> + | Coqast.Node loc "$PATH" l -> + let extract_var = function + | Coqast.Nvar loc id -> id + | Coqast.Id loc id -> failwith ("Id"^id) + | Coqast.Node _ s _ -> failwith ("Node"^s) + | _ -> failwith "Path is not built from ast variables" in + let l = List.map extract_var l in + let l = expr_list_of_var_list l in + <:expr< Coqast.Path loc $l$ Names.CCI >> | Coqast.Node _ "$ID" [Coqast.Nvar loc x] -> <:expr< Coqast.Id loc $anti loc x$ >> | Coqast.Node _ "$STR" [Coqast.Nvar loc x] -> -- cgit v1.2.3