Improve the ctyp quotation w.r.t to the "of" node
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7468 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
b7a2952e77
commit
ef50c2b1c0
|
@ -686,6 +686,7 @@ module Make (Syntax : Sig.Camlp4Syntax.S) = struct
|
|||
pp f "@[mutable@ %a :@ %a@]" o#ctyp t1 o#ctyp t2
|
||||
| <:ctyp< $t1$ : $t2$ >> -> pp f "@[<2>%a :@ %a@]" o#ctyp t1 o#ctyp t2
|
||||
| <:ctyp< $t1$; $t2$ >> -> pp f "%a;@ %a" o#ctyp t1 o#ctyp t2
|
||||
| <:ctyp< $t$ of $<:ctyp<>>$ >> -> o#ctyp f t
|
||||
| <:ctyp< $t1$ of $t2$ >> ->
|
||||
pp f "@[<h>%a@ @[<3>of@ %a@]@]" o#ctyp t1 o#constructor_type t2
|
||||
| <:ctyp< $t1$ of & $t2$ >> ->
|
||||
|
|
|
@ -920,7 +920,9 @@ Old (no more supported) syntax:
|
|||
] ]
|
||||
;
|
||||
constructor_arg_list:
|
||||
[ [ t1 = SELF; "and"; t2 = SELF -> <:ctyp< $t1$ and $t2$ >>
|
||||
[ [ `ANTIQUOT ("list" as n) s ->
|
||||
<:ctyp< $anti:mk_anti ~c:"ctypand" n s$ >>
|
||||
| t1 = SELF; "and"; t2 = SELF -> <:ctyp< $t1$ and $t2$ >>
|
||||
| t = ctyp -> t
|
||||
] ]
|
||||
;
|
||||
|
@ -1249,11 +1251,6 @@ Old (no more supported) syntax:
|
|||
| t = ctyp -> t
|
||||
] ]
|
||||
;
|
||||
and_ctyp:
|
||||
[ [ t1 = SELF; "and"; t2 = SELF -> <:ctyp< $t1$ and $t2$ >>
|
||||
| t = ctyp -> t
|
||||
] ]
|
||||
;
|
||||
amp_ctyp:
|
||||
[ [ t1 = SELF; "&"; t2 = SELF -> <:ctyp< $t1$ & $t2$ >>
|
||||
| t = ctyp -> t
|
||||
|
@ -1456,12 +1453,12 @@ Old (no more supported) syntax:
|
|||
[ [ x = more_ctyp; ","; y = comma_ctyp -> <:ctyp< $x$, $y$ >>
|
||||
| x = more_ctyp; ";"; y = sem_ctyp -> <:ctyp< $x$; $y$ >>
|
||||
| x = more_ctyp; "|"; y = pipe_ctyp -> <:ctyp< $x$ | $y$ >>
|
||||
| x = more_ctyp; "of"; y = and_ctyp -> <:ctyp< $x$ of $y$ >>
|
||||
| x = more_ctyp; "of"; y = constructor_arg_list -> <:ctyp< $x$ of $y$ >>
|
||||
| x = more_ctyp; "of"; "&"; y = amp_ctyp -> <:ctyp< $x$ of & $y$ >>
|
||||
| x = more_ctyp; ":"; y = more_ctyp -> <:ctyp< $x$ : $y$ >>
|
||||
| x = more_ctyp; "*"; y = star_ctyp -> <:ctyp< $x$ * $y$ >>
|
||||
| x = more_ctyp; "&"; y = amp_ctyp -> <:ctyp< $x$ & $y$ >>
|
||||
| x = more_ctyp; "and"; y = and_ctyp -> <:ctyp< $x$ and $y$ >>
|
||||
| x = more_ctyp; "and"; y = constructor_arg_list -> <:ctyp< $x$ and $y$ >>
|
||||
| x = more_ctyp -> x
|
||||
| -> <:ctyp<>>
|
||||
] ]
|
||||
|
|
Loading…
Reference in New Issue