git.annexia.org
/
ocaml-bitstring.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9933133
)
Allow '_' to be used to ignore more types of bitstring when matching.
author
Richard W.M. Jones
<rich@annexia.org>
Sun, 18 May 2008 16:13:09 +0000
(16:13 +0000)
committer
Richard W.M. Jones
<rich@annexia.org>
Sun, 18 May 2008 16:13:09 +0000
(16:13 +0000)
pa_bitmatch.ml
patch
|
blob
|
history
diff --git
a/pa_bitmatch.ml
b/pa_bitmatch.ml
index
d5945e0
..
9a25da8
100644
(file)
--- 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