Skip to content

Commit 0bfb41d

Browse files
committed
fix README
1 parent 753bc60 commit 0bfb41d

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ This generates:
146146
#### Smart reconstruction
147147
The pretty-printer intelligently handles alternations and optional fields:
148148
```ocaml
149-
let%mikmatch date_format = {| digit{4} '-' digit{2} '-' digit{2} ' ' digit{2} ':' digit{2} ':' digit{2} |}
150-
151-
type date = {%mikmatch| (date_format as date) |}
152-
153149
type mode =
154150
[ `A
155151
| `B
@@ -159,6 +155,8 @@ type mode =
159155
let mk_mode = function "a" -> `A | "b" -> `B | _ -> `Other
160156
let pp_mode fmt mode = Format.fprintf fmt @@ match mode with `A -> "a" | `B -> "b" | `Other -> "other"
161157
158+
let%mikmatch date_format = {| digit{4} '-' digit{2} '-' digit{2} ' ' digit{2} ':' digit{2} ':' digit{2} |}
159+
162160
type log = {%mikmatch|
163161
(date_format as date)
164162
" [" (upper+ as level) "]"

tests/test_ppx_regexp.ml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,6 @@ let test_mixed_matching _ =
520520
assert_raises (Failure "File tests/test_ppx_regexp.ml, lines 512-514, characters 24-33: String did not match any regex.") (fun () ->
521521
no_default_case "c")
522522

523-
let%mikmatch date_format = {| digit{4} '-' digit{2} '-' digit{2} ' ' digit{2} ':' digit{2} ':' digit{2} |}
524-
525-
type date = {%mikmatch| (date_format as date) |}
526-
527523
type mode =
528524
[ `A
529525
| `B
@@ -532,6 +528,7 @@ type mode =
532528

533529
let mk_mode = function "a" -> `A | "b" -> `B | _ -> `Other
534530
let pp_mode fmt mode = Format.fprintf fmt @@ match mode with `A -> "a" | `B -> "b" | `Other -> "other"
531+
let%mikmatch date_format = {| digit{4} '-' digit{2} '-' digit{2} ' ' digit{2} ':' digit{2} ':' digit{2} |}
535532

536533
type log =
537534
{%mikmatch| (date_format as date)

0 commit comments

Comments
 (0)