Ppxlib/ppx_tools + ReScript

So I’m working on my own ppx just to get my head further into ReScript and Ocaml.

Help me out - where do I even start? I’m trying to match expressions, but I have no idea how to do anything but guess. I see the the ReScript compiler is generating some marshalled AST files in /tmp. Can I print them somehow so I can figure out what to match on? Or am I going about this entirely wrong?