diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2003-03-12 16:33:38 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2003-03-12 16:33:38 +0000 |
commit | ded35d5bcef7c6ec3196bba7eaef39ae5bf7a921 (patch) | |
tree | fd4dbd0b30555522dffe336b3a2672b62cb74758 /parsing/parser.mly | |
parent | d98aa4b06d0a76e57fe37c025b2b7795a616882f (diff) |
PR#1584
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/parser.mly')
-rw-r--r-- | parsing/parser.mly | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index b2d480c30..4b4b08cae 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -72,10 +72,10 @@ let neg_float_string f = else "-" ^ f let mkuminus name arg = - match arg.pexp_desc with - Pexp_constant(Const_int n) -> + match name, arg.pexp_desc with + | "-", Pexp_constant(Const_int n) -> mkexp(Pexp_constant(Const_int(-n))) - | Pexp_constant(Const_float f) -> + | _, Pexp_constant(Const_float f) -> mkexp(Pexp_constant(Const_float(neg_float_string f))) | _ -> mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, ["", arg])) |