[camlp4] [FIXED] Use numeric also for floats PR#4434.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8550 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
3f1f575f02
commit
0e09dcc7f8
|
@ -503,11 +503,11 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
|
|||
| <:expr< for $s$ = $e1$ $to:df$ $e2$ do { $e3$ } >> ->
|
||||
pp f "@[<hv0>@[<hv2>@[<2>for %a =@ %a@ %a@ %a@ do@]@ %a@]@ done@]"
|
||||
o#var s o#expr e1 o#direction_flag df o#expr e2 o#seq e3
|
||||
| <:expr< $int:s$ >> -> pp f "%a" o#numeric s
|
||||
| <:expr< $int:s$ >> -> o#numeric f s
|
||||
| <:expr< $nativeint:s$ >> -> pp f "%an" o#numeric s
|
||||
| <:expr< $int64:s$ >> -> pp f "%aL" o#numeric s
|
||||
| <:expr< $int32:s$ >> -> pp f "%al" o#numeric s
|
||||
| <:expr< $flo:s$ >> -> pp f "%s" s
|
||||
| <:expr< $flo:s$ >> -> o#numeric f s
|
||||
| <:expr< $chr:s$ >> -> pp f "'%s'" (ocaml_char s)
|
||||
| <:expr< $id:i$ >> -> o#var_ident f i
|
||||
| <:expr< { $b$ } >> ->
|
||||
|
@ -612,8 +612,8 @@ module Make (Syntax : Sig.Camlp4Syntax) = struct
|
|||
| <:patt< $nativeint:s$ >> -> pp f "%an" o#numeric s
|
||||
| <:patt< $int64:s$ >> -> pp f "%aL" o#numeric s
|
||||
| <:patt< $int32:s$ >> -> pp f "%al" o#numeric s
|
||||
| <:patt< $int:s$ >> -> pp f "%a" o#numeric s
|
||||
| <:patt< $flo:s$ >> -> pp f "%s" s
|
||||
| <:patt< $int:s$ >> -> o#numeric f s
|
||||
| <:patt< $flo:s$ >> -> o#numeric f s
|
||||
| <:patt< $chr:s$ >> -> pp f "'%s'" (ocaml_char s)
|
||||
| <:patt< ~ $s$ >> -> pp f "~%s" s
|
||||
| <:patt< ` $uid:s$ >> -> pp f "`%a" o#var s
|
||||
|
|
Loading…
Reference in New Issue