summaryrefslogtreecommitdiffstats
path: root/camlp4/meta/q_MLast.ml
diff options
context:
space:
mode:
authorDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-11-09 16:49:29 +0000
committerDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-11-09 16:49:29 +0000
commit7f945aae5c665de4f5f914bef1f25fe8f43d5bc9 (patch)
tree2e656e69df1ed2465debf4fd6064c54d0b7b514f /camlp4/meta/q_MLast.ml
parentdaad5a168ee5ccea386afacc62cddf3b7ea677aa (diff)
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4002 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/meta/q_MLast.ml')
-rw-r--r--camlp4/meta/q_MLast.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/camlp4/meta/q_MLast.ml b/camlp4/meta/q_MLast.ml
index ac189ece4..50188b94e 100644
--- a/camlp4/meta/q_MLast.ml
+++ b/camlp4/meta/q_MLast.ml
@@ -400,7 +400,12 @@ EXTEND
let p = Node "PaTyc" [p; t] in
Node "PaOlb" [i; p; Option e]
| "?"; i = lident ->
- Node "PaOlb" [i; Node "PaLid" [i]; Option None] ]
+ Node "PaOlb" [i; Node "PaLid" [i]; Option None]
+ | "?"; "("; i = lident; "="; e = expr; ")" ->
+ Node "PaOlb" [i; Node "PaLid" [i]; Option (Some e)]
+ | "?"; "("; i = lident; ":"; t = ctyp; "="; e = expr; ")" ->
+ let p = Node "PaTyc" [Node "PaLid" [i]; t] in
+ Node "PaOlb" [i; p; Option (Some e) ] ]
| "simple"
[ v = LIDENT -> Node "PaLid" [Str v]
| v = UIDENT -> Node "PaUid" [Str v]