From 16cccfdf5590db45c98ec98176fbedc9d7249748 Mon Sep 17 00:00:00 2001 From: kevin defargoth Date: Thu, 7 Nov 2024 20:27:12 +0100 Subject: [PATCH] fix: typos in code in "a- Context free" --- .../2 - Writing PPXs/a - Context Free/README.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/examples/2 - Writing PPXs/a - Context Free/README.md b/examples/2 - Writing PPXs/a - Context Free/README.md index 0a7f25e..dc24dd8 100644 --- a/examples/2 - Writing PPXs/a - Context Free/README.md +++ b/examples/2 - Writing PPXs/a - Context Free/README.md @@ -243,7 +243,7 @@ let from_string = function - **Match the type declaration with pattern matching:** ```ocaml - let enum2 ~ctxt ast = + let enum ~ctxt ast = let loc = Expansion_context.Deriver.derived_item_loc ctxt in match ast with | ( _, @@ -253,20 +253,7 @@ let from_string = function ptype_kind = Ptype_variant variants; _; }; - ] ) -> - (* the structure_item we are looking for is a PStr_type *) - match structure_item with - | ( - (* Doesn't matter the rec_flag for us *) - _, - [ - { - ptype_name = { txt = type_name; _ }; - ptype_kind = Ptype_variant variants; - _; - }; - ] ) -> (* ... *) - | _ -> (* ... *) + ] ) -> (*...*) ``` - **Create functions to generate the patterns:**