diff options
| author | herbelin | 2000-11-24 20:03:00 +0000 |
|---|---|---|
| committer | herbelin | 2000-11-24 20:03:00 +0000 |
| commit | 74419b58adfb162bc104dbca112036c125ae9190 (patch) | |
| tree | 9f99c5620fc8a176f441d4a24292c10d6ce30923 | |
| parent | 0832467f0b4445f7b4c5f8e9ab417e585362ed9c (diff) | |
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
| -rw-r--r-- | parsing/q_coqast.ml4 | 9 |
1 files changed, 9 insertions, 0 deletions
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] -> |
