From: Richard W.M. Jones Date: Sun, 18 May 2008 16:13:09 +0000 (+0000) Subject: Allow '_' to be used to ignore more types of bitstring when matching. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;ds=sidebyside;h=ae3c1353436cf7ee38dda67f742ab3a5dd745324;p=ocaml-bitstring.git Allow '_' to be used to ignore more types of bitstring when matching. --- diff --git a/pa_bitmatch.ml b/pa_bitmatch.ml index d5945e0..9a25da8 100644 --- a/pa_bitmatch.ml +++ b/pa_bitmatch.ml @@ -657,6 +657,7 @@ let output_bitmatch _loc bs cases = let ident = match fpatt with | <:patt< $lid:ident$ >> -> ident + | <:patt< _ >> -> "_" | _ -> Loc.raise _loc (Failure "cannot compare a bitstring to a constant") in @@ -676,6 +677,7 @@ let output_bitmatch _loc bs cases = let ident = match fpatt with | <:patt< $lid:ident$ >> -> ident + | <:patt< _ >> -> "_" | _ -> Loc.raise _loc (Failure "cannot compare a bitstring to a constant") in